(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/form/MutiUploadVideos"],{"0967":function(t,e,n){"use strict";n.r(e);var r=n("d2ce"),i=n.n(r);for(var u in r)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(u);e["default"]=i.a},bec1:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return r}));var r={uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"9429"))}},i=function(){var t=this.$createElement,e=(this._self._c,this.list.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},u=[]},ca70:function(t,e,n){},d2ce:function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("7eb4")),u=r(n("7ca3")),c=r(n("ee10"));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){(0,u.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var o={name:"MutiUploadVideos",props:{title:{type:String,default:""},value:{type:Array,default:function(){return[]}},bg:{type:String,default:""}},data:function(){return{list:[],width:"634rpx",background:this.bg}},watch:{value:function(t,e){t.length>0?this.list=t.filter((function(t){return""!=t})).map((function(t){return{status:"success",message:"",url:t}})):this.list=[]}},mounted:function(){var e=this,n=t.createSelectorQuery().in(this);n.select("#form_item").boundingClientRect((function(t){e.width=t.width+"px"})).exec(),this.background||(this.background=this.$icoUrl+"common/bg.png")},methods:{afterRead:function(t){var e=this;return(0,c.default)(i.default.mark((function n(){var r,u,c,a,o,l,f,d;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=[].concat(t.file),u=e.list.length,r.map((function(t){e.list.push(s(s({},t),{},{status:"uploading",message:"上传中"}))})),c=0;case 4:if(!(c<r.length)){n.next=22;break}return n.prev=5,n.next=8,e.uploadFilePromise(r[c].url);case 8:a=n.sent,1==a.code&&(o=a.data.fullurl,l=e.list[u],e.list.splice(u,1,Object.assign(l,{status:"success",message:"",url:o})),u++),n.next=19;break;case 12:n.prev=12,n.t0=n["catch"](5),f=e.list[u],e.list.splice(u,1,Object.assign(f,{status:"failed",message:"上传失败",url:""})),u++,e.$util.toast(n.t0.msg);case 19:c++,n.next=4;break;case 22:d=e.list.map((function(t){return t.url})),e.$emit("input",JSON.parse(JSON.stringify(d)));case 24:case"end":return n.stop()}}),n,null,[[5,12]])})))()},deletePic:function(t){this.list.splice(t.index,1);var e=this.list.map((function(t){return t.url}));this.$emit("input",JSON.parse(JSON.stringify(e)))},uploadFilePromise:function(t){var e=this;return new Promise((function(n,r){e.$util.upload("common/upload",{filePath:t}).then((function(t){1==t.code?n(t):r(t)})).catch((function(t){r({code:0,msg:"网络错误"})}))}))}}};e.default=o}).call(this,n("df3c")["default"])},f684:function(t,e,n){"use strict";n.r(e);var r=n("bec1"),i=n("0967");for(var u in i)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(u);n("f862");var c=n("828b"),a=Object(c["a"])(i["default"],r["b"],r["c"],!1,null,"7bab2599",null,!1,r["a"],void 0);e["default"]=a.exports},f862:function(t,e,n){"use strict";var r=n("ca70"),i=n.n(r);i.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/form/MutiUploadVideos-create-component',
    {
        'components/form/MutiUploadVideos-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("f684"))
        })
    },
    [['components/form/MutiUploadVideos-create-component']]
]);
