Commit 99cd55f4 authored by lvweichao's avatar lvweichao

update: deploy script

parent a36caab5
......@@ -30,4 +30,7 @@ fi
if [ $env == "development" ]
then
pm2 logs $name
echo "{\"pm2-logrotate\":{\"max_size\":\"524288000\",\"interval\":\"7\",\"retain\":\"10\"},\"module-db\":{\"pm2-logrotate\":true}}" > /root/.pm2/module_conf.json
port=8055
pm2 start pm2.json
fi
\ No newline at end of file
......@@ -2,7 +2,7 @@
"apps": [
{
"name": "opwebservice",
"script": "index.js",
"script": "app.js",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"cwd": "/home/worker/opservice.yidianzixun.com/htdocs",
"exec_mode": "cluster",
......
......@@ -3,15 +3,16 @@
{
"name": "opwebservice",
"script": "app.js",
"cwd": "",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"cwd": "/home/worker/opservice.yidianzixun.com/htdocs",
"exec_mode": "cluster",
"instances": 0,
"error_file": "/home/worker/opservice.yidianzixun.com/logs/opwebservice.err.log",
"out_file": "/home/worker/opservice.yidianzixun.com/logs/opwebservice.out.log",
"max_memory_restart": "1G",
"autorestart": true,
"node_args": [],
"args": [],
"env": {
"NODE_ENV": "production"
"NODE_ENV": "production",
"PORT": "8055"
}
}
]
......
a,blockquote,body,code,dd,div,dl,dt,em,fieldset,form,h1,h2,h3,h4,h5,h6,iframe,img,input,label,li,object,ol,p,q,small,span,strong,table,tbody,td,th,tr,ul{margin:0;padding:0;border:0}*{-webkit-box-sizing:border-box;box-sizing:border-box}body,html{-webkit-font-smoothing:antialiased}body,html{font-size:100%}body{line-height:1.5;margin:0 auto;font-family:Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,微软雅黑,Arial,sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}a,a:active,a:focus,a:hover,a:visited{text-decoration:none}a,img{-webkit-touch-callout:none}img{border:0}li,ol,ul{list-style:none}button,input:focus,textarea:focus{outline:none}input,textarea{-webkit-appearance:none}#loading{position:fixed;top:0;left:0;height:100%;width:100%;background-color:#fff;z-index:1000}#loading,#loading:after{background-position:50%;background-repeat:no-repeat}#loading:after{content:"";display:block;background-image:url(//si1.go2yd.com/get-image/0fOxKQtpE80);position:fixed;background-repeat:no-repeat;z-index:1001;left:50%;top:50%;height:28px;width:140px;margin-left:-70px;margin-top:-25px;background-size:100% 100%}.yidian-night #loading{background-color:#333}.yidian-night #loading:after{background-image:url(//si1.go2yd.com/get-image/0fOxY9asGmm)}#app,#root,body,html{height:100%}body{margin:0}.user-info[data-v-e635a4fa]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.user-name[data-v-e635a4fa]{margin-left:12px;color:#fff}.menu-router{display:inline-block;line-height:60px;width:100%}.header-menu .user-menu{float:right!important;margin-right:20px}.layout{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%}.main{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.setUp{position:absolute;right:20px;-webkit-transform:translate(-50%,25%);-ms-transform:translate(-50%,25%);transform:translate(-50%,25%)}.enterprise_card{padding:50px}.enterprise_card .enterprise_form{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.enterprise_card .enterprise_form .formItem{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.enterprise_card .enterprise_form .formButton{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.enterprise_card .enterprise_form .formButton .inquire{margin-right:10px}.audit{padding:50px;padding-bottom:0}.audit .audit_area,.audit .submit_area{margin:20px 0}.audit .button_area{margin-top:20px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.audit .life_area{margin:20px 0;margin-bottom:50px}.audit .edit_button_area{margin:20px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.audit thead th{background-color:#add8e6;color:#000}.mgtb20{margin:20px 0}.title{padding:20px}.establish{padding:50px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.establish .el-form{width:50%}.life-no[data-v-566ea21e]{margin:30px}.life-no .search_life[data-v-566ea21e]{width:280px}.life-no-detail[data-v-1da29aa1]{margin:50px}.life-no-detail .titleInfo[data-v-1da29aa1]{margin-top:10px}.life-no-detail .box-card[data-v-1da29aa1]{width:100%}.life-no-detail .accountRoleList[data-v-1da29aa1],.life-no-detail .management[data-v-1da29aa1]{margin-top:20px}.block{margin-top:50px}.form-val{margin-left:20px;width:300px}.form-val.el-input{width:80%}.user[data-v-b0e89f24]{padding:50px}.user .search_life[data-v-b0e89f24]{width:280px}.user .func-btn[data-v-b0e89f24]{float:right}.user-detail[data-v-1b6c6673]{margin:50px}.user-detail .role[data-v-1b6c6673]{margin:10px;font-weight:700}.addRole[data-v-f6d2ea16]{margin:50px}.addRole .back[data-v-f6d2ea16]{margin:20px 0}.creatRole[data-v-27551e6d]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.role_management[data-v-27551e6d]{padding:20px}.role_management .el-button[data-v-27551e6d]{margin:0 2px}.user-detail[data-v-66a7f69f]{margin:50px}.user-detail .role_account_list[data-v-66a7f69f]{padding:10px;color:#909399;background:#fafafa;font-weight:400;line-height:1.5}.user-detail .management[data-v-66a7f69f],.user-detail .tree[data-v-66a7f69f]{margin-top:20px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="https://static.yidianzixun.com/img/faviconred.ico"><title>运营管理系统</title><link href="/dist/css/chunk-vendors.e35ad216.css" rel="stylesheet"><link href="/dist/css/app.23f69f0d.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 运营管理系统 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/dist/js/chunk-vendors.dcd2bca2.js"></script><script src="/dist/js/app.26d83f12.js"></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["enterprise"],{"13be":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),c=Object(o["m"])(" 没有权限! ");function r(e,t,n,r,a,i){var u=Object(o["N"])("layout");return Object(o["E"])(),Object(o["j"])("div",null,[Object(o["n"])(u,null,{default:Object(o["cb"])((function(){return[c]})),_:1})])}var a=n("3ab0"),i={components:{Layout:a["a"]}};i.render=r;t["default"]=i},"26ad":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),c=Object(o["m"])(" 页面不存在! ");function r(e,t,n,r,a,i){var u=Object(o["N"])("layout");return Object(o["E"])(),Object(o["j"])("div",null,[Object(o["n"])(u,null,{default:Object(o["cb"])((function(){return[c]})),_:1})])}var a=n("3ab0"),i={components:{Layout:a["a"]}};i.render=r;t["default"]=i},"358c":function(e,t){t.KS3_CONST={AccessKeyID:"AKLTTpZx6fNBQsGSKe5chqHdXA",AccessKeySecret:"OG9Bk93RUHwaH71U9K+OtWkvx44AdMheywjFlifILikvh96jNGgznJm+AyR5l4wPhw==",DOMAIN:"ks3-cn-beijing.ksyun.com"}},"80ad":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),c=Object(o["gb"])("data-v-445e1d37");Object(o["H"])("data-v-445e1d37");var r=Object(o["m"])("点击上传"),a=Object(o["n"])("div",{class:"el-upload__tip"},"只能上传 jpg/png 文件,且不超过 500kb",-1),i=Object(o["n"])("input",{type:"file",id:"imgFile2"},null,-1);Object(o["F"])();var u=c((function(e,t,n,u,l,s){var d=Object(o["N"])("el-button"),p=Object(o["N"])("el-upload");return Object(o["E"])(),Object(o["j"])(o["b"],null,[Object(o["n"])(p,{class:"upload-demo",action:"https://jsonplaceholder.typicode.com/posts/","on-preview":s.handlePreview,"on-remove":s.handleRemove,"before-remove":e.beforeRemove,multiple:"",limit:3,"on-exceed":s.handleExceed,"file-list":l.fileList},{tip:c((function(){return[a]})),default:c((function(){return[Object(o["n"])(d,{size:"small",type:"primary"},{default:c((function(){return[r]})),_:1})]})),_:1},8,["on-preview","on-remove","before-remove","on-exceed","file-list"]),i,Object(o["n"])("button",{onClick:t[1]||(t[1]=function(){return s.handleclick&&s.handleclick.apply(s,arguments)})},"Put上传")],64)}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function l(e){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}n("99af");var s=n("1da1"),d=(n("96cf"),n("b775"));function p(){return f.apply(this,arguments)}function f(){return f=Object(s["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,d["a"].get("/api/v1/image/get_ks3_config");case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))),f.apply(this,arguments)}var b=n("358c");function m(e){return j.apply(this,arguments)}function j(){return j=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n,o,c,r,a,i,u,l,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:return n=e.sent,o=n.bucket,c=n.objectId,r=n.policy,a=n.signature,i="https:"===window.location.protocol?"https":"http",u="".concat(i,"://").concat(b["KS3_CONST"].DOMAIN,"/").concat(o),l=new FormData,l.append("acl","public-read"),l.append("key",c),l.append("signature",a),l.append("KSSAccessKeyId",b["KS3_CONST"].AccessKeyID),l.append("policy",r),l.append("file",t),console.log("ksOssUpload url::",u),e.next=19,Object(d["a"])({url:u,method:"post",data:l,withCredentials:!1}).then((function(e){console.log("ksOssUpload res::",e)}));case 19:return s=e.sent,e.abrupt("return",s);case 21:case"end":return e.stop()}}),e)}))),j.apply(this,arguments)}var h={data:function(){return{fileList:[{name:"food.jpeg",url:"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"},{name:"food2.jpeg",url:"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"}]}},beforeMount:function(){},methods:{handleclick:function(){var e=document.getElementById("imgFile2").files[0];console.log(33334444,e)},handleRemove:function(e,t){console.log(e,t)},handlePreview:function(e){var t=e.raw;console.log("handlePreview:::",e,"undefined"===typeof File?"undefined":l(File)),console.log(222,t),m(t)},handleExceed:function(e,t){this.$message.warning("当前限制选择 3 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))}}};h.render=u,h.__scopeId="data-v-445e1d37";t["default"]=h}}]);
//# sourceMappingURL=enterprise.0c91af0c.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/pages/Catch/forbidden.vue","webpack:///./src/pages/Catch/forbidden.vue?15ac","webpack:///./src/pages/Catch/notFound.vue","webpack:///./src/pages/Catch/notFound.vue?058b","webpack:///./src/config/constant.js","webpack:///./src/pages/DemoImageUpload/index.vue","webpack:///./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./src/service/image.js","webpack:///./src/service/ks3Image.js","webpack:///./src/pages/DemoImageUpload/index.vue?8f5c"],"names":["components","Layout","render","exports","KS3_CONST","AccessKeyID","AccessKeySecret","DOMAIN","class","type","id","action","on-preview","handlePreview","on-remove","handleRemove","before-remove","beforeRemove","multiple","limit","on-exceed","handleExceed","file-list","fileList","tip","size","handleclick","_typeof","obj","Symbol","iterator","constructor","prototype","getKs3Config","axios","get","res","ksOssUpload","file","bucket","objectId","policy","signature","protocal","window","location","protocol","uploadURL","formData","FormData","append","console","log","url","method","data","withCredentials","then","name","beforeMount","methods","document","getElementById","files","raw","File","this","$message","warning","length","__scopeId"],"mappings":"sJAEY,W,+EADV,eAEM,YADJ,eAAwB,Q,yBAAhB,iBAAO,C,8BAMJ,GACbA,WAAY,CACVC,OAAA,SCPJ,EAAOC,OAASA,EAED,gB,4ECHH,Y,+EADV,eAIM,YAHJ,eAES,Q,yBAFD,iBAER,C,8BAMa,GACbF,WAAY,CACVC,OAAA,SCTN,EAAOC,OAASA,EAED,gB,qBCLfC,EAAQC,UAAY,CAClBC,YAAa,6BACbC,gBAAiB,uEACjBC,OAAQ,6B,uJCWiC,Q,EAErC,eAA4D,OAAvDC,MAAM,kBAAiB,8BAA0B,G,EAI1D,eAAiC,SAA1BC,KAAK,OAAOC,GAAG,Y,6KAjBtB,eAeY,GAdVF,MAAM,cACNG,OAAO,8CACNC,aAAY,EAAAC,cACZC,YAAW,EAAAC,aACXC,gBAAe,EAAAC,aAChBC,SAAA,GACCC,MAAO,EACPC,YAAW,EAAAC,aACXC,YAAW,EAAAC,U,CAGDC,IAAG,GACZ,iBAA4D,CAA5D,M,WAFF,iBAAuD,CAAvD,eAAuD,GAA5CC,KAAK,QAAQhB,KAAK,W,YAAU,iBAAI,C,2FAM7C,EACA,eAA2C,UAAlC,QAAK,8BAAE,EAAAiB,aAAA,EAAAA,YAAA,sBAAa,U,mECrBhB,SAASC,EAAQC,GAa9B,OATED,EADoB,oBAAXE,QAAoD,kBAApBA,OAAOC,SACtC,SAAiBF,GACzB,cAAcA,GAGN,SAAiBA,GACzB,OAAOA,GAAyB,oBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,GAItHD,EAAQC,G,kDCWV,SAAeK,IAAtB,+B,8DAAO,oHACaC,OAAMC,IAAI,gCADvB,cACCC,EADD,yBAEEA,GAFF,2C,wCCVA,SAAeC,EAAtB,kC,8DAAO,WAA2BC,GAA3B,uHACiDL,IADjD,uBACGM,EADH,EACGA,OAAQC,EADX,EACWA,SAAUC,EADrB,EACqBA,OAAQC,EAD7B,EAC6BA,UAE5BC,EAAwC,WAA7BC,OAAOC,SAASC,SAAwB,QAAU,OAC7DC,EAJD,UAIgBJ,EAJhB,cAI8BvC,eAAUG,OAJxC,YAIkDgC,GAIjDS,EAAW,IAAIC,SACrBD,EAASE,OAAO,MAAO,eACvBF,EAASE,OAAO,MAAOV,GACvBQ,EAASE,OAAO,YAAaR,GAC7BM,EAASE,OAAO,iBAAkB9C,eAAUC,aAC5C2C,EAASE,OAAO,SAAUT,GAC1BO,EAASE,OAAO,OAAQZ,GACxBa,QAAQC,IAAI,oBAAqBL,GAf5B,UAgBab,eAAM,CAAEmB,IAAKN,EAAWO,OAAQ,OAAQC,KAAMP,EAAUQ,iBAAiB,IAASC,MAAK,SAAArB,GACvGe,QAAQC,IAAI,oBAAqBhB,MAjB9B,eAgBCA,EAhBD,yBAmBEA,GAnBF,4C,wBHcQ,OACbmB,KADa,WAEX,MAAO,CACLhC,SAAU,CAAC,CAACmC,KAAM,YAAaL,IAAK,gIAAiI,CAACK,KAAM,aAAcL,IAAK,mIAGnMM,YANa,aAQbC,QAAS,CACPlC,YADO,WAEL,IAAIY,EAAOuB,SAASC,eAAe,YAAYC,MAAM,GAErDZ,QAAQC,IAAI,SAAUd,IAExBvB,aANO,SAMMuB,EAAMf,GACjB4B,QAAQC,IAAId,EAAMf,IAEpBV,cATO,SASOyB,GACZ,IAAQ0B,EAAQ1B,EAAR0B,IACRb,QAAQC,IAAI,mBAAoBd,EAAhC,qBAA6C2B,KAA7C,cAA6CA,OAE7Cd,QAAQC,IAAI,IAAKY,GAEjB3B,EAAY2B,IAEd3C,aAjBO,SAiBM0C,EAAOxC,GAClB2C,KAAKC,SAASC,QAAd,6BAA4CL,EAAMM,OAAlD,qBAAqEN,EAAMM,OAAS9C,EAAS8C,OAA7F,YInDN,EAAOnE,OAASA,EAChB,EAAOoE,UAAY,kBAEJ","file":"js/enterprise.0c91af0c.js","sourcesContent":["<template>\n <div>\n <layout> 没有权限! </layout>\n </div>\n</template>\n\n<script>\nimport Layout from '@/layouts';\nexport default {\n components: {\n Layout,\n },\n};\n</script>\n\n<style lang=\"less\">\n</style>\n","import { render } from \"./forbidden.vue?vue&type=template&id=55e10778\"\nimport script from \"./forbidden.vue?vue&type=script&lang=js\"\nexport * from \"./forbidden.vue?vue&type=script&lang=js\"\nscript.render = render\n\nexport default script","<template>\n <div>\n <layout>\n 页面不存在!\n </layout>\n </div>\n</template>\n\n<script>\n import Layout from '@/layouts';\n export default {\n components: {\n Layout,\n },\n };\n</script>\n\n<style lang=\"less\">\n</style>\n","import { render } from \"./notFound.vue?vue&type=template&id=1d928b4d\"\nimport script from \"./notFound.vue?vue&type=script&lang=js\"\nexport * from \"./notFound.vue?vue&type=script&lang=js\"\nscript.render = render\n\nexport default script","exports.KS3_CONST = {\n AccessKeyID: 'AKLTTpZx6fNBQsGSKe5chqHdXA',\n AccessKeySecret: 'OG9Bk93RUHwaH71U9K+OtWkvx44AdMheywjFlifILikvh96jNGgznJm+AyR5l4wPhw==',\n DOMAIN: 'ks3-cn-beijing.ksyun.com'\n}","\n<template>\n\n <el-upload\n class=\"upload-demo\"\n action=\"https://jsonplaceholder.typicode.com/posts/\"\n :on-preview=\"handlePreview\"\n :on-remove=\"handleRemove\"\n :before-remove=\"beforeRemove\"\n multiple\n :limit=\"3\"\n :on-exceed=\"handleExceed\"\n :file-list=\"fileList\"\n >\n <el-button size=\"small\" type=\"primary\">点击上传</el-button>\n <template #tip>\n <div class=\"el-upload__tip\">只能上传 jpg/png 文件,且不超过 500kb</div>\n </template>\n </el-upload>\n\n <input type=\"file\" id=\"imgFile2\">\n <button @click=\"handleclick\">Put上传</button>\n</template>\n\n<script>\nimport { ksOssUpload } from '@/service/ks3Image'\n// import { uploadImageToKs3 } from '@/service/image'\n\nexport default {\n data () {\n return {\n fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]\n }\n },\n beforeMount() {\n },\n methods: {\n handleclick() {\n var file = document.getElementById('imgFile2').files[0];\n debugger;\n console.log(33334444, file);\n },\n handleRemove(file, fileList) {\n console.log(file, fileList);\n },\n handlePreview(file) {\n const { raw } = file;\n console.log('handlePreview:::', file, typeof File);\n\n console.log(222, raw)\n // uploadImageToKs3(raw)\n ksOssUpload(raw)\n },\n handleExceed(files, fileList) {\n this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);\n },\n // beforeRemove(file, fileList) {\n // return this.$confirm(`确定移除 ${ file.name }?`);\n // },\n }\n}\n</script>\n<style lang=\"less\" scoped>\n</style>\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import axios from '../utils/request';\n\nexport async function getImgId() {\n const res = await axios.get(\"/api/v1/image/get_image_id\")\n return res;\n}\n\nexport async function getImgBucket() {\n const res = await axios.get(\"/api/v1/image/get_bucket\")\n return res;\n}\n\nexport async function getImgToken() {\n const res = await axios.get(\"/api/v1/image/get_token\")\n return res;\n}\n\nexport async function uploadImageToKs3(file) {\n const formData = new FormData();\n formData.append(\"file\", file);\n const res = await axios.post(\"/api/v1/image/upload_ks3_image\", formData)\n return res;\n}\n\nexport async function getKs3Config() {\n const res = await axios.get(\"/api/v1/image/get_ks3_config\")\n return res;\n}","import { getKs3Config } from \"@/service/image\";\nimport { KS3_CONST } from \"@/config/constant\";\nimport axios from '../utils/request';\n\n// async function getRemoteConfig() {\n// const imgId = await getImgId();\n// const bucket = await getImgBucket();\n// return {imgId, bucket}\n// }\n// const protocal = window.location.protocol === 'https:' ? 'https' : 'http';\n// const { imgId, bucket } = await getRemoteConfig();\n\n\n\nexport async function ksOssUpload(file) {\n const { bucket, objectId, policy, signature } = await getKs3Config();\n\n const protocal = window.location.protocol === 'https:' ? 'https' : 'http';\n const uploadURL = `${protocal}://${KS3_CONST.DOMAIN}/${bucket}`;\n // return new Promise((resolve, reject) => {\n // CommonServer.getKsOssSign().then(res => {\n // const { accessid, policy, signature } = res\n const formData = new FormData()\n formData.append('acl', 'public-read')\n formData.append('key', objectId)\n formData.append('signature', signature)\n formData.append('KSSAccessKeyId', KS3_CONST.AccessKeyID)\n formData.append('policy', policy)\n formData.append('file', file)\n console.log('ksOssUpload url::', uploadURL)\n const res = await axios({ url: uploadURL, method: 'post', data: formData, withCredentials: false }).then(res => {\n console.log('ksOssUpload res::', res)\n })\n return res;\n}","import { render } from \"./index.vue?vue&type=template&id=445e1d37&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nscript.render = render\nscript.__scopeId = \"data-v-445e1d37\"\n\nexport default script"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment