love_php/public/dist/static/js/7.aea619bbf28216e863f5.js

2 lines
14 KiB
JavaScript
Raw Permalink Normal View History

2026-04-02 09:20:51 +08:00
webpackJsonp([7],{"2itz":function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var n=o("VGry"),a=i(n),r=o("7eSe"),l=i(r),u=o("wVqk"),p=i(u),A=o("E8Nc"),s=i(A),d=o("TQ5/"),f=i(d),c=o("EuEE");t.default={components:{Flexbox:a.default,FlexboxItem:l.default,Previewer:p.default,InlineLoading:s.default},model:{prop:"images",event:"change"},props:{images:{type:Array,default:function(){return[]}},readonly:{type:Boolean,default:!1},max:{type:Number,default:9},beforeUpload:Function,withCredentials:{type:Boolean,default:!1},headers:{type:Object,default:function(){return{Authorization:"Bearer "+localStorage.getItem("ACCESS_TOKEN"),"Content-Type":"multipart/form-data; boundary=----WebKitFormBoundary7nlA2zLUZKtJLFvz"}}},data:{type:Object,default:function(){return{}}},url:{type:String,required:!1},span:{type:Number,default:4},accept:{type:String,default:"image/*"},capture:{type:String,default:"*"},preview:{type:Boolean,default:!0},compress:Object},data:function(){return{loading:!1,ossConfig:{},host:"",file:{}}},watch:{loading:function(e){e||(this.$refs.file.value="")}},methods:{onChange:function(e){this.file=e.target.files[0],this.file&&((0,c.$loadingShow)("上传中..."),this.uploadFile(this.file))},uploadFile:function(e){var t=this;if(!(this.images.length>=this.max))if(this.beforeUpload&&"function"==typeof this.beforeUpload){var o=this.beforeUpload(e);o&&o.then?o.then(function(o){var i=Object.prototype.toString.call(o);"[object File]"===i||"[object Blob]"===i?t.post(o):t.post(e)}):!1!==o&&this.post(e)}else this.post(e)},post:function(e){var t=this;this.loading=!0;var o=this,i=new FormData,n=f.default.encode(o.file.name)+"."+o.file.type.split("/").pop().toLowerCase(),a=o.host+"/"+o.ossConfig.dir+n;i.append("name",o.ossConfig.dir+n),i.append("key",o.ossConfig.dir+n),i.append("policy",o.ossConfig.policy),i.append("OSSAccessKeyId",o.ossConfig.accessid),i.append("success_action_status","200"),i.append("signature",o.ossConfig.signature),i.append("file",o.file),i.append("filename",o.file.name),this.$http.post(this.host,i,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){e.data;console.log(a),t.$emit("filePath",a),(0,c.$toastSuccess)("上传成功"),(0,c.$loadingHide)()}).catch(function(e){(0,c.$toastWarn)(e),(0,c.$loadingHide)()})},onSuccess:function(e,t){this.$emit("success",e,t)},onError:function(e,t){this.$emit("error",e,t)},onRemove:function(e,t){t.stopPropagation(),this.$emit("remove",e)},getSignature:function(){var e=this;this.$http.get("/upload/signature").then(function(t){var o=t.data;e.ossConfig=o,e.host=o.host}).catch(function(e){console.log(e)})}},mounted:function(){this.getSignature()}}},"J/jq":function(e,t,o){"use strict";var i=function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{staticClass:"weui-uploader__input",attrs:{type:"file"},on:{change:e.onChange}})},n=[],a={render:i,staticRenderFns:n};t.a=a},"TQ5/":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1),a=function(e){var t,o,n,a,r,l;for(n=e.length,o=0,t="";o<n;){if(a=255&e.charCodeAt(o++),o==n){t+=i.charAt(a>>2),t+=i.charAt((3&a)<<4),t+="==";break}if(r=e.charCodeAt(o++),o==n){t+=i.charAt(a>>2),t+=i.charAt((3&a)<<4|(240&r)>>4),t+=i.charAt((15&r)<<2),t+="=";break}l=e.charCodeAt(o++),t+=i.charAt(a>>2),t+=i.charAt((3&a)<<4|(240&r)>>4),t+=i.charAt((15&r)<<2|(192&l)>>6),t+=i.charAt(63&l)}return t},r=function(e){var t,o,i,a,r,l,u;for(l=e.length,r=0,u="";r<l;){do{t=n[255&e.charCodeAt(r++)]}while(r<l&&-1==t);if(-1==t)break;do{o=n[255&e.charCodeAt(r++)]}while(r<l&&-1==o);if(-1==o)break;u+=String.
//# sourceMappingURL=7.aea619bbf28216e863f5.js.map