(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/image-upload"],{"0eee":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return a}));var a={uIcon:function(){return Promise.all([i.e("common/vendor"),i.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(i.bind(null,"da7f"))}},n=function(){var e=this.$createElement,t=(this._self._c,!this.detail&&this.lists.length1024*i*1024)t.$u.toast("最大允许上传"+i+"MB的图片");else if(t.lists.length>=a)t.$u.toast("最多允许上传"+a+"张图片");else{var u=e.tempFilePaths[0];n?t.uploadWaterMarkImage(u):t.uploadImage(u)}})).catch((function(e){t.$emit("on-choose-fail",e)}))},uploadImage:function(t){var i=this;e.getImageInfo({src:t,success:function(t){n.default.storge.getPolicy({bucket:"public-aaf-shenzhen-file"}).then((function(a){var n=a.data,o=t.path.substring(t.path.lastIndexOf("/")+1);t.name=o;var u=n.dir+o,s={key:u,policy:n.policy,OSSAccessKeyId:n.accessid,success_action_status:"200",signature:n.signature,file:t};e.uploadFile({url:n.host,filePath:t.path,name:"file",formData:s,complete:function(e){var t="".concat(n.host,"/").concat(n.dir).concat(o);i.lists.push({fileUrl:t,fileName:o}),i.$emit("update: ossFileDTOList",i.lists)}})}))}})},uploadWaterMarkImage:function(t){var i=this;e.getImageInfo({src:t,success:function(t){i.imageWidth=t.width,i.imageHeight=t.height;var a=e.createCanvasContext("canone",i);t.type,t.height,t.width}})},uploadError:function(e){this.$emit("on-error",e,this.lists)},checkFileType:function(e){var t,i;return i=e.path.replace(/.+\./,"").toLowerCase(),t=this.limitType.some((function(e){return(null===e||void 0===e?void 0:e.toLowerCase())===i})),t}}};t.default=o}).call(this,i("543d")["default"])},fce2:function(e,t,i){}}]); ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'components/image-upload-create-component', { 'components/image-upload-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('543d')['createComponent'](__webpack_require__("7a08")) }) }, [['components/image-upload-create-component']] ]);