1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f178ae8"],{"05d8":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a}));n("d401"),n("4de4"),n("4160"),n("b64b"),n("d3b7"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("25f0"),n("4d90"),n("5319"),n("159b");function r(t,e){var n,r={"Y+":e.getFullYear().toString(),"m+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"M+":e.getMinutes().toString(),"S+":e.getSeconds().toString()};for(var i in r)n=new RegExp("("+i+")").exec(t),n&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=0,i=0;t>86400&&(n=Math.floor(t/86400),t%=86400),t>3600&&(r=Math.floor(t/3600),t%=3600),t>60&&(i=Math.floor(t/60),t%=60);var a=t+"秒";return(i>0||r>0||n>0)&&(a=i+"分"+(e?a:"")),(r>0||n>0)&&(a=r+"小时"+(e?a:"")),n>0&&(a=n+"天"+(e?a:"")),a}function a(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]}},"408a":function(t,e,n){"use strict";var r=n("e330");t.exports=r(1..valueOf)},"4d48":function(t,e,n){"use strict";n("68ef"),n("bf60")},"4de4":function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").filter,a=n("1dde"),o=a("filter");r({target:"Array",proto:!0,forced:!o},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"51eb":function(t,e,n){"use strict";var r=n("825a"),i=n("485a"),a=TypeError;t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new a("Incorrect hint");return i(this,t)}},"7a82f":function(t,e,n){"use strict";var r=n("23e7"),i=n("83ab"),a=n("9bf2").f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},"7b0a":function(t,e,n){},8107:function(t,e,n){"use strict";n("9e88")},8172:function(t,e,n){"use strict";var r=n("e065"),i=n("57b9");r("toPrimitive"),i()},"81e6":function(t,e,n){"use strict";n("68ef"),n("7b0a")},8941:function(t,e,n){"use strict";var r=function(){var t=this,e=t._self._c;return e("div",[e("van-field",{attrs:{readonly:"",border:t.border,label:t.label,placeholder:t.placeholder,disabled:t.disabled},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-uploader",{attrs:{accept:t.accept,"before-read":t.beforeUpload,"after-read":t.afterRead,disabled:t.disabled,"show-upload":t.edit,deletable:t.edit},on:{delete:t.update},scopedSlots:t._u([{key:"preview-cover",fn:function(n){return[n.url&&"mp4"==n.url.split("/").pop().split(".").pop()?e("div",{staticClass:"w-full h-full overflow-hidden flex justify-center items-center"},[e("video",{staticClass:"min-w-full min-h-full",attrs:{src:n.url},on:{click:function(e){return t.videoPlay(n.url)}}},[t._v(" 您的浏览器不支持视频播放 ")])]):t._e()]}}]),model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})]},proxy:!0}])}),t.videoShow?e("van-overlay",{staticClass:"flex justify-center items-center",attrs:{show:t.videoShow,"z-index":"1000"}},[e("video",{staticClass:"max-w-full max-h-full",attrs:{src:t.videoUrl,controls:""}},[t._v(" 您的浏览器不支持视频播放 ")]),e("i",{staticClass:"van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-right",attrs:{role:"button"},on:{click:function(e){t.videoShow=!1}}})]):t._e()],1)},i=[],a=(n("9a83"),n("f564")),o=n("ade3"),s=(n("f1dc"),n("6e47")),u=(n("e930"),n("8f80")),c=(n("4de4"),n("4160"),n("d81d"),n("b64b"),n("d3b7"),n("159b"),n("d319")),f={name:"UploadList",components:Object(o["a"])(Object(o["a"])({},u["a"].name,u["a"]),s["a"].name,s["a"]),props:{value:{type:Array,default:function(){return[]}},label:{type:String,default:""},placeholder:{type:String,default:""},accept:{type:String,default:"image/*"},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},edit:{type:Boolean,default:!0}},watch:{value:{deep:!0,imediate:!0,handler:function(t){this.fileList=t.map((function(t){return{url:t}}))}}},data:function(){return{dataObj:{},fileList:[],videoShow:!1,videoUrl:""}},created:function(){this.fileList=this.value.map((function(t){return{url:t}}))},methods:{videoPlay:function(t){this.videoUrl=t,this.videoShow=!0},beforeUpload:function(t){if("video/mp4"===t.type){if(t.size/1024/1024>30)return Object(a["a"])({type:"danger",message:"上传视频大小不能超过 30MB!"}),!1}else if(t.size/1024/1024>5)return Object(a["a"])({type:"danger",message:"上传图片大小不能超过 5MB!"}),!1;var e="";if(console.log(t.type),"image/png"===t.type)e="png";else if("image/jpeg"===t.type)e="jpg";else{if("video/mp4"!==t.type)return Object(a["a"])({type:"danger",message:"上传格式有误!"}),!1;e="mp4"}var n=this;return new Promise((function(r,i){Object(c["b"])({file_type:e}).then((function(e){var i=e.data.key,a=e.data.token;n._data.dataObj.token=a,n._data.dataObj.key=i,r(t)})).catch((function(t){console.log(t),i()}))}))},afterRead:function(t){var e=this;console.log(t),t.status="uploading",t.message="上传中...";var n=new FormData;n.append("file",t.file),Object.keys(this.dataObj).forEach((function(t){n.append(t,e.dataObj[t])})),this.$axios({method:"post",url:"https://upload.qiniup.com",data:n}).then((function(n){console.log(n),console.log("image url:"+e.$store.getters.setting.img_host),t.url=e.$store.getters.setting.img_host+n.data.key,t.status="done",t.message="上传成功",e.update()})).catch((function(n){console.log("上传失败",n),t.status="failed",t.message="上传失败",e.update()}))},update:function(){var t=this.fileList.filter((function(t){return!t.status||"done"==t.status})).map((function(t){return t.url}));console.log("image value",t),this.$emit("input",t),console.log(t)}}},l=f,d=(n("8107"),n("2877")),p=Object(d["a"])(l,r,i,!1,null,"839f07ca",null);e["a"]=p.exports},"9e88":function(t,e,n){},"9ffb":function(t,e,n){"use strict";var r=n("d282"),i=n("9884"),a=Object(r["a"])("col"),o=a[0],s=a[1];e["a"]=o({mixins:[Object(i["a"])("vanRow")],props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{style:function(){var t=this.index,e=this.parent||{},n=e.spaces;if(n&&n[t]){var r=n[t],i=r.left,a=r.right;return{paddingLeft:i?i+"px":null,paddingRight:a?a+"px":null}}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,e=arguments[0],n=this.span,r=this.offset;return e(this.tag,{style:this.style,class:s((t={},t[n]=n,t["offset-"+r]=r,t)),on:{click:this.onClick}},[this.slots()])}})},a9e3:function(t,e,n){"use strict";var r=n("23e7"),i=n("c430"),a=n("83ab"),o=n("cfe9"),s=n("428f"),u=n("e330"),c=n("94ca"),f=n("1a2d"),l=n("7156"),d=n("3a9b"),p=n("d9b5"),g=n("c04e"),h=n("d039"),b=n("241c").f,v=n("06cf").f,m=n("9bf2").f,y=n("408a"),S=n("58a8").trim,w="Number",j=o[w],O=s[w],N=j.prototype,_=o.TypeError,k=u("".slice),x=u("".charCodeAt),I=function(t){var e=g(t,"number");return"bigint"==typeof e?e:E(e)},E=function(t){var e,n,r,i,a,o,s,u,c=g(t,"number");if(p(c))throw new _("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=S(c),e=x(c,0),43===e||45===e){if(n=x(c,2),88===n||120===n)return NaN}else if(48===e){switch(x(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=k(c,2),o=a.length,s=0;s<o;s++)if(u=x(a,s),u<48||u>i)return NaN;return parseInt(a,r)}return+c},A=c(w,!j(" 0o1")||!j("0b1")||j("+0x1")),L=function(t){return d(N,t)&&h((function(){y(t)}))},M=function(t){var e=arguments.length<1?0:j(I(t));return L(this)?l(Object(e),this,M):e};M.prototype=N,A&&!i&&(N.constructor=M),r({global:!0,constructor:!0,wrap:!0,forced:A},{Number:M});var P=function(t,e){for(var n,r=a?b(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)f(e,n=r[i])&&!f(t,n)&&m(t,n,v(e,n))};i&&O&&P(s[w],O),(A||i)&&P(s[w],j)},ade3:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("7a82f");var r=n("53ca");n("8172"),n("d9e2"),n("d401"),n("efec"),n("a9e3");function i(t,e){if("object"!=Object(r["a"])(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Object(r["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function a(t){var e=i(t,"string");return"symbol"==Object(r["a"])(e)?e:e+""}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},bf60:function(t,e,n){},d1e1:function(t,e,n){"use strict";var r=n("d282"),i=n("9884"),a=Object(r["a"])("row"),o=a[0],s=a[1];e["a"]=o({mixins:[Object(i["b"])("vanRow")],props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},computed:{spaces:function(){var t=Number(this.gutter);if(t){var e=[],n=[[]],r=0;return this.children.forEach((function(t,e){r+=Number(t.span),r>24?(n.push([e]),r-=24):n[n.length-1].push(e)})),n.forEach((function(n){var r=t*(n.length-1)/n.length;n.forEach((function(n,i){if(0===i)e.push({right:r});else{var a=t-e[n-1].right,o=r-a;e.push({left:a,right:o})}}))})),e}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,e=arguments[0],n=this.align,r=this.justify,i="flex"===this.type;return e(this.tag,{class:s((t={flex:i},t["align-"+n]=i&&n,t["justify-"+r]=i&&r,t)),on:{click:this.onClick}},[this.slots()])}})},d319:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r=n("6456");function i(t){return Object(r["a"])({url:"qiniu/token",method:"get",params:t})}function a(t){return Object(r["a"])({url:"send_verify_code",method:"get",params:t})}},d81d:function(t,e,n){"use strict";var r=n("23e7"),i=n("b727").map,a=n("1dde"),o=a("map");r({target:"Array",proto:!0,forced:!o},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},efec:function(t,e,n){"use strict";var r=n("1a2d"),i=n("cb2d"),a=n("51eb"),o=n("b622"),s=o("toPrimitive"),u=Date.prototype;r(u,s)||i(u,s,a)},f4b3:function(t,e,n){"use strict";var r=n("23e7"),i=n("d039"),a=n("7b0b"),o=n("c04e"),s=i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));r({target:"Date",proto:!0,arity:1,forced:s},{toJSON:function(t){var e=a(this),n=o(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})}}]);
|