(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/mch/mch/goods-detail/goods-detail"],{"3c96":function(e,t,n){"use strict";n.r(t);var o=n("a0c4"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"460f":function(e,t,n){"use strict";var o,i=function(){var e=this,t=e.$createElement;e._self._c},a=[];n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}))},7837:function(e,t,n){"use strict";n.r(t);var o=n("460f"),i=n("3c96");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("f894");var r,c=n("f0c5"),u=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"b290c390",null,!1,o["a"],r);t["default"]=u.exports},a0c4:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-layout/app-layout")]).then(function(){return resolve(n("3dd6"))}.bind(null,n)).catch(n.oe)},u={data:function(){return{tempFilePaths:"",imgheight:0,img:[],iphone_x:!1}},components:{"app-layout":c},computed:a({},(0,o.mapState)({theme:function(e){return e.mallConfig.theme},userInfo:function(e){return e.user.info},adminImg:function(e){return e.mallConfig.__wxapp_img.app_admin}})),methods:{add:function(){var t=this,n=6-t.img.length;e.chooseImage({count:n,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(n){var o=n.tempFilePaths,i=t.img;o.forEach((function(n,a){e.showLoading({title:"上传中..."});var r="";e.uploadFile({url:t.$api.upload.file,filePath:n,name:"file",fileType:"image",formData:{file:n,file_name:r},success:function(n){var r=JSON.parse(n.data);console.log(r),console.log(i);var c={pic_url:r.data.url,id:r.data.id};0==r.code&&i.push(c),t.img=i,e.setStorage({key:"goods_mch_detail",data:i}),a==o.length-1&&e.hideLoading()}})}))}})},imageLoad:function(e,t){var n=t.detail.height,o=t.detail.width,i=n*(702/o);this.img[e].height=i+"rpx",this.$forceUpdate(),console.log(this.img)},clear:function(t){this.img.splice(t,1),e.setStorage({key:"goods_mch_detail",data:this.img})}},onLoad:function(t){var n=this;e.getStorage({key:"goods_mch_detail",success:function(e){e.data&&(n.img=e.data)}}),e.getSystemInfo({success:function(e){(e.model.indexOf("iPhone X")>-1||e.model.indexOf("iPhone 11")>-1||e.model.indexOf("iPhone11")>-1||e.model.indexOf("iPhone12")>-1||e.model.indexOf("Unknown Device")>-1)&&(n.iphone_x=!0)}})}};t.default=u}).call(this,n("543d")["default"])},c5dc:function(e,t,n){"use strict";(function(e){n("8748");o(n("66fd"));var t=o(n("7837"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},d831:function(e,t,n){},f894:function(e,t,n){"use strict";var o=n("d831"),i=n.n(o);i.a}},[["c5dc","common/runtime","common/vendor"]]]);