<<<<<<<< HEAD:dist/assets/index-legacy.b63b6b33.js !function(){function e(e,t,a,n,o,l,r){try{var i=e[l](r),u=i.value}catch(d){return void a(d)}i.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var a=this,n=arguments;return new Promise((function(o,l){var r=t.apply(a,n);function i(t){e(r,o,l,i,u,"next",t)}function u(t){e(r,o,l,i,u,"throw",t)}i(void 0)}))}}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a1?(e.$emit("update:modelValue",[].concat(a(e.modelValue),[t.fileUrl])),e.onUploadChange([].concat(a(e.modelValue),[t.fileUrl]))):(e.$emit("update:modelValue",[t.fileUrl]),e.onUploadChange([t.fileUrl]))}))}},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024-1&&(a.splice(n,1),this.$emit("update:modelValue",a),this.onUploadChange()),e.stopPropagation()},getFile:function(e){var a=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.uploadFile(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()},uploadFile:function(e){var n=this;return t(regeneratorRuntime.mark((function t(){var o,l,p,m,f,g,h,b,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,"SCHOOL"===i.platformType?i.platformApi="/api-school":"TEACHER"===i.platformType?i.platformApi="/api-teacher":"STUDENT"===i.platformType&&(i.platformApi="/api-student"),o=i.platformApi+"/open/getUploadSign",l=e.name||"",p=n.path+"/"+(l&&l.replace(/ /gi,"_")),m=(new Date).getTime()+p,console.log(e),t.next=9,u.post(o,{data:{filename:p,bucketName:n.bucket,postData:{filename:p,acl:"public-read",key:m,unknowValueField:[]}}});case 9:for(b in f=t.sent,d({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),g={policy:f.data.policy,signature:f.data.signature,key:m,KSSAccessKeyId:f.data.kssAccessKeyId,acl:"public-read",name:p},h=new FormData,g)h.append(b,g[b]);return h.append("file",e,p),t.next=17,s(c(n.bucket),{method:"POST",data:h});case 17:console.log(c(n.bucket)+m),y=c(n.bucket)+m,r(),n.maxCount>1?(n.$emit("update:modelValue",[].concat(a(n.modelValue),[y])),n.onUploadChange([].concat(a(n.modelValue),[y]))):(n.$emit("update:modelValue",[y]),n.onUploadChange([y])),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(0),console.log(t.t0,"uploadFile");case 26:case"end":return t.stop()}}),t,null,[[0,23]])})))()}},render:function(){var e=this;return p((function(){return e.modelValue})),m("div",{class:y["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map((function(t){return m("div",{class:[y.uploader,y[e.size]]},[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:y["img-close"]},null),m("div",{class:["van-uploader__upload"]},["IMAGE"===e.uploadType?m(h,{src:t,class:y.previewImg,fit:"cover"},null):m("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:y.previewImg,src:t+"#t=1,4"},null)])])})),this.native?this.maxCount>1?m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[this.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[this.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,disabled:this.modelValue.length===this.maxCount||this.disabled,accept:this.accept},null):m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,accept:this.accept,disabled:this.disabled},{default:function(){return[e.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[e.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:e.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}})])}}))}}}))}(); ======== !function(){function e(e,t,a,n,o,l,r){try{var i=e[l](r),u=i.value}catch(d){return void a(d)}i.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var a=this,n=arguments;return new Promise((function(o,l){var r=t.apply(a,n);function i(t){e(r,o,l,i,u,"next",t)}function u(t){e(r,o,l,i,u,"throw",t)}i(void 0)}))}}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a1?(e.$emit("update:modelValue",[].concat(a(e.modelValue),[t.fileUrl])),e.onUploadChange([].concat(a(e.modelValue),[t.fileUrl]))):(e.$emit("update:modelValue",[t.fileUrl]),e.onUploadChange([t.fileUrl]))}))}},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024-1&&(a.splice(n,1),this.$emit("update:modelValue",a),this.onUploadChange()),e.stopPropagation()},getFile:function(e){var a=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.uploadFile(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()},uploadFile:function(e){var n=this;return t(regeneratorRuntime.mark((function t(){var o,l,p,m,f,g,h,b,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,"SCHOOL"===i.platformType?i.platformApi="/api-school":"TEACHER"===i.platformType?i.platformApi="/api-teacher":"STUDENT"===i.platformType&&(i.platformApi="/api-student"),o=i.platformApi+"/open/getUploadSign",l=e.name||"",p=n.path+"/"+(l&&l.replace(/ /gi,"_")),m=(new Date).getTime()+p,console.log(e),t.next=9,u.post(o,{data:{filename:p,bucketName:n.bucket,postData:{filename:p,acl:"public-read",key:m,unknowValueField:[]}}});case 9:for(b in f=t.sent,d({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),g={policy:f.data.policy,signature:f.data.signature,key:m,KSSAccessKeyId:f.data.kssAccessKeyId,acl:"public-read",name:p},h=new FormData,g)h.append(b,g[b]);return h.append("file",e,p),t.next=17,s(c(n.bucket),{method:"POST",data:h});case 17:console.log(c(n.bucket)+m),y=c(n.bucket)+m,r(),n.maxCount>1?(n.$emit("update:modelValue",[].concat(a(n.modelValue),[y])),n.onUploadChange([].concat(a(n.modelValue),[y]))):(n.$emit("update:modelValue",[y]),n.onUploadChange([y])),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(0),console.log(t.t0,"uploadFile");case 26:case"end":return t.stop()}}),t,null,[[0,23]])})))()}},render:function(){var e=this;return p((function(){return e.modelValue})),m("div",{class:y["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map((function(t){return m("div",{class:[y.uploader,y[e.size]]},[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:y["img-close"]},null),m("div",{class:["van-uploader__upload"]},["IMAGE"===e.uploadType?m(h,{src:t,class:y.previewImg,fit:"cover"},null):m("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:y.previewImg,src:t+"#t=1,4"},null)])])})),this.native?this.maxCount>1?m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[this.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[this.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,disabled:this.modelValue.length===this.maxCount||this.disabled,accept:this.accept},null):m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,accept:this.accept,disabled:this.disabled},{default:function(){return[e.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[e.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:e.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}})])}}))}}}))}(); >>>>>>>> online:dist/assets/index-legacy.dd0eceb6.js