启程易购后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qicheng_shop_backend/public/static/js/pages-admin-scan-index.7f52...

1 line
13 KiB

8 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-admin-scan-index"],{"27a7":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("ade3")),r=i(n("c7eb")),o=i(n("1da1"));n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("14d9"),n("a434"),n("d81d");var d=i(n("2243")),c=n("f26a"),s=(n("316e"),i(n("2e02"))),u={components:{easyLoadimage:d.default},data:function(){return{uploading:!0,domain:c.HTTP_REQUEST_URL,imgList:[],fileList:[],token:"",images:[],mer_id:0,allSize:0,limit:20}},onLoad:function(e){this.token=e.token,this.mer_id=e.mer_id||0},onShow:function(){},methods:{add:function(){var e=this;uni.chooseImage({count:100,sizeType:["compressed"],sourceType:["album","camera"],success:function(t){for(var n=function(n){uni.getImageInfo({src:t.tempFilePaths[n],success:function(i){var a=i.width,r=i.height,o=a/r;a>400&&(a=400,r=Math.floor(a/o));var d=document.createElement("img");d.src=t.tempFilePaths[n];var c=document.createElement("canvas"),s=c.getContext("2d");c.width=a,c.height=r,s.drawImage(d,0,0,a,r),c.toBlob((function(i){new File([i],t.tempFiles[n].name,{type:i.type});var a=window.URL.createObjectURL(i);e.images.push({img:a,name:t.tempFiles[n].name});var r=i.size,o=r/1024/1024;e.imgList.length<20&&(e.imgList.push({src:a,size:o}),e.allSize+=o)}),"image/jpeg",.8)},fail:function(e){}})},i=0;i<t.tempFiles.length;i++)n(i)}})},submitUpload:function(){var e=this;return(0,o.default)((0,r.default)().mark((function t(){var n,i;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=e,i=0;case 2:if(!(i<n.images.length)){t.next=9;break}return t.next=5,n.uploadImages(n.images[i]);case 5:i==n.imgList.length-1&&(n.uploading=!1,n.loading=!1);case 6:i++,t.next=2;break;case 9:case"end":return t.stop()}}),t)})))()},uploadImages:function(e){var t=this;return new Promise(function(){var n=(0,o.default)((0,r.default)().mark((function n(i){return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:uni.showLoading({title:"上传中..."}),uni.uploadFile({url:c.HTTP_REQUEST_URL+"/api/scan_upload/image/field/"+t.token,filePath:e.img,name:"field",formData:{name:e.name,mer_id:t.mer_id},header:(0,a.default)({},c.TOKENNAME,"Bearer "+s.default.state.app.token),success:function(e){if(uni.hideLoading(),403==e.statusCode)t.$util.Tips({title:e.message});else{var n=e.data?JSON.parse(e.data):{};200==n.status?i(n):t.$util.Tips({title:e.message})}},fail:function(e){uni.hideLoading(),t.$util.Tips({title:e})}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},DelPic:function(e){this.imgList.splice(e,1),this.images.splice(e,1),this.getImageSize()},getImageSize:function(){var e=0;this.imgList.length?(this.imgList.map((function(t){e+=t.size})),this.allSize=e):this.allSize=0},again:function(){this.uploading=!0,this.imgList=[],this.images=[],this.allSize=0}},onHide:function(){}};t.default=u},"28ed":function(e,t,n){"use strict";var i=n("3d69"),a=n.n(i);a.a},"316e":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.computeRefundPrice=function(e,t){return a.default.post("server/".concat(e,"/refund/compute"),t,{login:!0})},t.confirmRefundApi=function(e,t){return a.default.post("server/".concat(e,"/refund/create"),t,{login:!0})},t.getAdminOrderDelivery=function(e){return a.default.get("admin/order/delivery/gain/"+e,{},{login:!0})},t.getAdminOrderDetail=function(e,t){return a.default.get("admin/"+e+"/order/"+t,{},{login:!0})},t.getAdminOrderList=function(e){return a.default.get("admin/order/list",e,{login:!0})},t.getDeliveryStoreLst=function(e){return a.default.get("admin/".concat(e,"/delivery_options"))},t.getLogistics=function(){return a.default.get("logistics",{},{login:!1})},t.getOrderList=function(e,t){return a.default.get("admin/".concat(t,"/order_list"),e,{login:!0})},t.getRefundOrderApi=function(e,t){return a.default.get("server/".concat(e,"/refund/check/").concat(t),{},{login:!0})},t.getRefundOrderDetail=function(e,