(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/upload/uploadP"],{"0ce0":function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return o}));var o={uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,"9f6a"))},uRadio:function(){return t.e("uview-ui/components/u-radio/u-radio").then(t.bind(null,"8ccd"))}},a=function(){var e=this.$createElement,n=(this._self._c,this.imageList.length);this.$mp.data=Object.assign({},{$root:{g0:n}})},i=[]},3610:function(e,n,t){},5540:function(e,n,t){"use strict";t.r(n);var o=t("d70b"),a=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=a.a},"6dad":function(e,n,t){"use strict";t.r(n);var o=t("0ce0"),a=t("5540");for(var i in a)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(i);t("b100");var c=t("f0c5"),u=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=u.exports},b100:function(e,n,t){"use strict";var o=t("3610"),a=t.n(o);a.a},d70b:function(e,n,t){"use strict";(function(e){var o=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t("9523")),i=t("26cb");function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var u={components:{classify:function(){t.e("pages/upload/child/classify").then(function(){return resolve(t("9e9a"))}.bind(null,t)).catch(t.oe)}},data:function(){return{imageList:[],name:"",list:["单规格","多规格"],isdan:"",chooseClass:[],classify:[{value:26,label:"|-----化妆品",disabled:0},{value:38,label:"|-----|-----防晒",disabled:1},{value:30,label:"|-----|-----洗护类",disabled:1},{value:31,label:"|-----|-----精华乳",disabled:1},{value:24,label:"|-----首饰",disabled:0},{value:25,label:"|-----|-----手表",disabled:1},{value:17,label:"|-----生活用品",disabled:0},{value:37,label:"|-----|-----衣架",disabled:1}]}},computed:function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,a.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},(0,i.mapState)(["baseURL"])),onLoad:function(){},onShow:function(){},onReachBottom:function(){},onReady:function(){},methods:{upLoad:function(n){var t=this;return e.showLoading({title:"图片上传中",mask:!0}),new Promise((function(o,a){e.uploadFile({url:t.baseURL+"/api/upload/image",filePath:n,name:"file",header:{"Authori-zation":"Bearer "+e.getStorageSync("token")},success:function(e){"string"===typeof e.data?o(JSON.parse(e.data).data):o(e.data.data)},complete:function(){e.hideLoading()}})}))},navCroper:function(n,t){var o=this;this.onImg().then((function(a){e.navigateTo({url:"/pages/set/cropper?width=".concat(n,"&height=").concat(t),events:{uploadSuccess:function(e){o.upLoad(e).then((function(e){o.imageList.push(e.url)}))}},success:function(e){e.eventChannel.emit("urlNext",{url:a})}})}))},onImg:function(n){var t=this;return new Promise((function(n,o){e.showActionSheet({itemList:["拍照","选择一张照片"],success:function(e){t.chooseImage(e.tapIndex).then((function(e){n(e)})).catch((function(e){o(e)}))},fail:function(e){o(e),console.log(e.errMsg)}})}))},chooseImage:function(n){return new Promise((function(t,o){var a=0===n?["camera"]:["album"];e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:a,success:function(e){t(e.tempFilePaths[0])},fail:function(n){e.showModal({title:"文件打开错误",content:"请设置授权文件存储权限",showCancel:!1}),o(n)}})}))},radioGroupChange:function(e){this.isdan="单规格"==e?0:1,console.log(this.isdan)},chooseClasswc:function(e){console.log(this.chooseClass,"123456")},delImg:function(n){var t=this;e.showModal({content:"确定删除这张吗",success:function(e){e.confirm?t.imageList.splice(n,1):e.cancel}})}}};n.default=u}).call(this,t("543d")["default"])},f71a:function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("d1cd");o(t("66fd"));var a=o(t("6dad"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(a.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])}},[["f71a","common/runtime","common/vendor"]]]);