Files
BlockChainH5/unpackage/dist/build/h5/static/js/pages-goods-add.c3e70d8a.js
2021-09-30 17:23:05 +08:00

1 line
30 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-add"],{"1d64":function(e,t,i){"use strict";i.r(t);var a=i("b00d"),o=i("9ac6");for(var s in o)"default"!==s&&function(e){i.d(t,e,(function(){return o[e]}))}(s);i("2ed8");var n,r=i("f0c5"),c=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"7e85741a",null,!1,a["a"],n);t["default"]=c.exports},"1de5":function(e,t,i){"use strict";e.exports=function(e,t){return t||(t={}),e=e&&e.__esModule?e.default:e,"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},"1f56":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABACAMAAAC3B3BDAAAAM1BMVEUAAADb29vc3Nzb29vb29vb29vc3Nzb29vc3Nza2trb29vb29vb29va2trd3d3b29vb29u1O//tAAAAEHRSTlMAv9LHt4TgXz438nHGmUwq97zaPgAAAHhJREFUWMPt1bsOgCAMhWGQcvfC+z+tNjrK1JJgPP/W5RuaJjUIIYTQfEWiOEBtV/ouMWvV2YXZoM46Zhewv2X3zd4VZssz+CxTU+uURKzvsXYMSyI299hDuFz7hro854GB/S476OkQs6s6W5mtRj0fgjcIIYTQdJ2WxQ1J9tuhiAAAAABJRU5ErkJggg=="},"2ed8":function(e,t,i){"use strict";var a=i("6573"),o=i.n(a);o.a},"57dc":function(e,t,i){e.exports=i.p+"static/fonts/uni.75745d34.ttf"},"5f33":function(e,t,i){"use strict";i.r(t);var a=i("caa6"),o=i.n(a);for(var s in a)"default"!==s&&function(e){i.d(t,e,(function(){return a[e]}))}(s);t["default"]=o.a},6573:function(e,t,i){var a=i("e23e");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=i("4f06").default;o("74876fac",a,!0,{sourceMap:!1,shadowMode:!1})},6876:function(e,t,i){"use strict";var a;i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return a}));var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-text",{staticClass:"uni-icons",class:[e.fontFamily,e.fontFamily?e.type:""],style:{color:e.color,"font-size":e.size+"px"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e._onClick.apply(void 0,arguments)}}},[e._v(e._s(e.fontFamily?"":e.icons[e.type]))])},s=[]},"89ef":function(e,t,i){var a=i("24fb"),o=i("1de5"),s=i("57dc");t=a(!1);var n=o(s);t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-218f84fe]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-218f84fe]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-218f84fe]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-218f84fe]{padding-top:0}.vertical[data-v-218f84fe]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-218f84fe]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-218f84fe]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-218f84fe]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */@font-face{font-family:uniicons;src:url('+n+') format("truetype")}.uni-icons[data-v-218f84fe]{font-family:uniicons;text-decoration:none;text-align:center}',""]),e.exports=t},"99ac":function(e,t,i){"use strict";var a=i("a9a0"),o=i.n(a);o.a},"9a7b":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.managesGoodsExtends=t.managesGoodsPut=t.managesCreate=t.managesGoodsEdit=t.managesGoodsDelete=t.managesGoodsAuth=t.managesCategory=t.managesGoodsCreate=t.managesGoodsCreateBefore=t.managesGoodsBurn=t.managesGoodsMint=t.managesGoodsIndex=void 0;var a=i("89d9"),o=function(e){return(0,a.request)({url:"manages/goods/index",data:e})};t.managesGoodsIndex=o;var s=function(e){return(0,a.request)({url:"manages/goods/"+e.id+"/mint",data:e,method:"POST"})};t.managesGoodsMint=s;var n=function(e){return(0,a.request)({url:"manages/goods/"+e.id+"/burn",data:e,method:"POST"})};t.managesGoodsBurn=n;var r=function(){return(0,a.request)({url:"manages/goods/create"})};t.managesGoodsCreateBefore=r;var c=function(e){return(0,a.request)({url:"manages/goods",method:"POST",data:e})};t.managesGoodsCreate=c;var l=function(){return(0,a.request)({url:"manages/goods/category"})};t.managesCategory=l;var u=function(e){return(0,a.request)({url:"manages/goods/create",data:e})};t.managesCreate=u;var d=function(e,t){return(0,a.request)({url:"manages/goods/"+e+"/extends",method:"POST",data:t})};t.managesGoodsAuth=d;var f=function(e){return(0,a.request)({url:"manages/goods/"+e,method:"DELETE"})};t.managesGoodsDelete=f;var p=function(e){return(0,a.request)({url:"manages/goods/"+e})};t.managesGoodsEdit=p;var v=function(e,t){return(0,a.request)({url:"manages/goods/"+e,method:"PUT",data:t})};t.managesGoodsPut=v;var m=function(e){return(0,a.request)({url:"manages/goods/"+e+"/extends"})};t.managesGoodsExtends=m},"9ac6":function(e,t,i){"use strict";i.r(t);var a=i("d1b9"),o=i.n(a);for(var s in a)"default"!==s&&function(e){i.d(t,e,(function(){return a[e]}))}(s);t["default"]=o.a},a9a0:function(e,t,i){var a=i("89ef");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=i("4f06").default;o("2acee188",a,!0,{sourceMap:!1,shadowMode:!1})},b00d:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return a}));var a={uniIcons:i("f1a7").default,uniPopup:i("1788").default},o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"content"},[a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-upd"},[a("v-uni-view",{staticClass:"form-title"},[e._v("商品轮播图"),a("v-uni-text",[e._v("(首图封面图,点击预览,长按删除)")])],1),a("v-uni-view",{staticClass:"form-imgs"},[e._l(e.pictures,(function(t,i){return a("v-uni-view",{key:i,staticClass:"item",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openImg(i,"pictures")},longpress:function(t){arguments[0]=t=e.$handleEvent(t),e.removeImg(i,"pictures")}}},[a("v-uni-image",{staticClass:"item-cover",attrs:{src:t.showpath,mode:"aspectFill"}})],1)})),a("v-uni-view",{staticClass:"item item-add",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.updCover("pictures")}}},[a("v-uni-image",{staticClass:"item-cover",attrs:{src:i("1f56"),mode:"aspectFill"}})],1)],2)],1)],1),a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-box inputs-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("商品标题")]),a("v-uni-input",{attrs:{type:"text",placeholder:"输入商品标题"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),a("v-uni-view",{staticClass:"form-box inputs-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("商品描述")]),a("v-uni-input",{attrs:{type:"text",placeholder:"输入商品描述"},model:{value:e.description,callback:function(t){e.description=t},expression:"description"}})],1),a("v-uni-view",{staticClass:"form-box inputs-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("规格单位")]),a("v-uni-input",{attrs:{type:"text",placeholder:"输入规格单位 如:件"},model:{value:e.skus_unit,callback:function(t){e.skus_unit=t},expression:"skus_unit"}})],1),a("v-uni-view",{staticClass:"form-upd"},[a("v-uni-view",{staticClass:"form-title"},[e._v("商品详情(点击预览,长按删除)")]),a("v-uni-view",{staticClass:"form-imgs"},[e._l(e.content,(function(t,i){return a("v-uni-view",{key:i,staticClass:"item",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openImg(i,"content")},longpress:function(t){arguments[0]=t=e.$handleEvent(t),e.removeImg(i,"content")}}},[a("v-uni-image",{staticClass:"item-cover",attrs:{src:t.showpath,mode:"aspectFill"}})],1)})),a("v-uni-view",{staticClass:"item item-add",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.updCover("content")}}},[a("v-uni-image",{staticClass:"item-cover",attrs:{src:i("1f56"),mode:"aspectFill"}})],1)],2)],1)],1),a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-box inputs-flex input-unit"},[a("v-uni-label",{staticClass:"form-label"},[e._v("市场价格")]),a("v-uni-input",{attrs:{type:"digit",placeholder:"0.00"},model:{value:e.skus_cost,callback:function(t){e.skus_cost=t},expression:"skus_cost"}}),a("v-uni-text",{staticClass:"units"},[e._v("元"+e._s(""!=e.skus_unit?"/"+e.skus_unit:""))])],1),a("v-uni-view",{staticClass:"form-box inputs-flex input-unit"},[a("v-uni-label",{staticClass:"form-label"},[e._v("销售价格")]),a("v-uni-input",{attrs:{type:"digit",placeholder:"0.00"},model:{value:e.skus_price,callback:function(t){e.skus_price=t},expression:"skus_price"}}),a("v-uni-text",{staticClass:"units"},[e._v("元"+e._s(""!=e.skus_unit?"/"+e.skus_unit:""))])],1),a("v-uni-view",{staticClass:"form-box inputs-flex input-unit"},[a("v-uni-label",{staticClass:"form-label"},[e._v("分销佣金")]),a("v-uni-input",{attrs:{type:"digit",placeholder:"0.00"},model:{value:e.skus_charge,callback:function(t){e.skus_charge=t},expression:"skus_charge"}}),a("v-uni-text",{staticClass:"units"},[e._v("元"+e._s(""!=e.skus_unit?"/"+e.skus_unit:""))])],1)],1),a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-box inputs-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("发行权证数")]),a("v-uni-input",{attrs:{type:"number",placeholder:"输入商品发行权证数"},model:{value:e.skus_stock,callback:function(t){e.skus_stock=t},expression:"skus_stock"}})],1)],1),a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-box picker-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("配送方式")]),a("v-uni-picker",{attrs:{range:e.logisticArr,"range-key":"text",value:e.logisticType},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"logisticType")}}},[a("v-uni-view",{staticClass:"picker-text"},[e._v(e._s(e.logisticArr[e.logisticType].text)),a("uni-icons",{staticClass:"picker-icon",attrs:{type:"arrowright",color:"#999"}})],1)],1)],1),1===e.logisticType?a("v-uni-view",{staticClass:"form-box picker-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("关联店铺")]),a("v-uni-view",{staticClass:"picker-text",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opnePopup("storePopup")}}},[e._v("已关联"+e._s(e.stores.length)+"家店铺"),a("uni-icons",{staticClass:"picker-icon",attrs:{type:"arrowright",color:"#999"}})],1)],1):e._e(),a("v-uni-view",{staticClass:"form-box picker-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("允许售后")]),a("v-uni-view",{staticClass:"picker-switch"},[a("v-uni-switch",{attrs:{checked:e.isPostSale,color:"#8b64fd"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"isPostSale")}}})],1)],1),a("v-uni-view",{staticClass:"form-box picker-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("可选服务")]),a("v-uni-view",{staticClass:"picker-text",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.opnePopup("categoryPopup")}}},[e._v("已选"+e._s(e.services.length)+"项服务"),a("uni-icons",{staticClass:"picker-icon",attrs:{type:"arrowright",color:"#999"}})],1)],1)],1),2==e.type?a("v-uni-view",{staticClass:"form-block"},[a("v-uni-view",{staticClass:"form-box picker-flex"},[a("v-uni-label",{staticClass:"form-label"},[e._v("到期时间")]),a("v-uni-picker",{attrs:{mode:"date",value:e.expiriedAt},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"expiriedAt")}}},[a("v-uni-view",{staticClass:"picker-text"},[e._v(e._s(e.expiriedAt||"选择服务到期时间")),a("uni-icons",{staticClass:"picker-icon",attrs:{type:"arrowright",color:"#999"}})],1)],1)],1)],1):e._e(),a("uni-popup",{ref:"categoryPopup"},[a("v-uni-view",{staticClass:"category-popup"},[a("v-uni-view",{staticClass:"header"},[a("v-uni-view",{staticClass:"title"},[e._v("选择商品服务")])],1),a("v-uni-view",{staticClass:"category-flex"},e._l(e.servicesArr,(function(t,i){return a("v-uni-view",{key:i,staticClass:"category-flex-item",class:{show:t.check},on:{click:function(i){arguments[0]=i=e.$handleEvent(i),t.check=!t.check}}},[a("v-uni-view",{staticClass:"category-name"},[e._v(e._s(t.name))]),a("v-uni-view",{staticClass:"category-content"},[e._v(e._s(t.content))])],1)})),1),a("v-uni-view",{staticClass:"btns"},[a("v-uni-button",{attrs:{type:"default",size:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.affirmCategory("services","categoryPopup")}}},[e._v("确定")])],1)],1)],1),a("uni-popup",{ref:"storePopup"},[a("v-uni-view",{staticClass:"category-popup"},[a("v-uni-view",{staticClass:"header"},[a("v-uni-view",{staticClass:"title"},[e._v("选择店铺")])],1),a("v-uni-view",{staticClass:"category-flex"},e._l(e.storesArr,(function(t,i){return a("v-uni-view",{key:i,staticClass:"category-flex-item",class:{show:t.check},on:{click:function(i){arguments[0]=i=e.$handleEvent(i),t.check=!t.check}}},[a("v-uni-view",{staticClass:"category-name"},[e._v(e._s(t.name))]),a("v-uni-view",{staticClass:"category-content"},[e._v(e._s(t.address))])],1)})),1),a("v-uni-view",{staticClass:"btns"},[a("v-uni-button",{attrs:{type:"default",size:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.affirmCategory("stores","storePopup")}}},[e._v("确定")])],1)],1)],1),a("v-uni-view",{staticClass:"ios-bottom"}),a("v-uni-view",{staticClass:"footer"},[a("v-uni-button",{staticClass:"footer-btn",attrs:{type:"default"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submitAdd.apply(void 0,arguments)}}},[e._v(e._s(2==e.type?"发布":"发布并认证"))]),a("v-uni-view",{staticClass:"ios-bottom"})],1)],1)},s=[]},b85c:function(e,t,i){"use strict";i("a4d3"),i("e01a"),i("d28b"),i("d3b7"),i("3ca3"),i("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var a=o(i("06c5"));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var i;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=(0,a.default)(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var o=0,s=function(){};return{s:s,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r=!0,c=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){c=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(c)throw n}}}}},caa6:function(e,t,i){"use strict";var a=i("4ea4");i("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(i("e437")),s={name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},fontFamily:{type:String,default:""}},data:function(){return{icons:o.default}},methods:{_onClick:function(){this.$emit("click")}}};t.default=s},d1b9:function(e,t,i){"use strict";var a=i("4ea4");i("a4d3"),i("e01a"),i("c740"),i("d81d"),i("a434"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(i("b85c")),s=a(i("5530")),n=i("9a7b"),r=i("ef1b"),c={data:function(){return{categoryId:"",categoryCid:"",name:"",pictures:[],content:[],description:"",isPostSale:!1,services:[],skus_cost:"",skus_price:"",skus_number:1,skus_unit:"件",skus_charge:"",skus_stock:"",isChange:!1,stores:[],expiriedAt:"",logisticType:0,logisticArr:[{text:"快递",type:1},{text:"自提",type:2}],storesArr:[],tags:[],tagsIndex:0,servicesArr:[],type:1}},created:function(){var e=this;this.$Route.query.type&&"edit"===this.$Route.query.type?(0,n.managesGoodsEdit)(this.$Route.query.id).then((function(t){var i=[],a=[],o=t.services.map((function(e){var a=t.data.services.findIndex((function(t){return t.service_id===e.service_id}))>=0;return a&&i.push(e.service_id),(0,s.default)({check:a},e)})),n=t.stores.map((function(e){var i=t.data.stores.findIndex((function(t){return t.store_id===e.store_id}))>=0;return i&&a.push(e.store_id),(0,s.default)({check:i},e)}));e.categoryId=t.data.category.category_id,e.categoryCid=t.data.category_sub.category_id,e.name=t.data.name,e.content=t.data.content,e.description=t.data.description,e.pictures=t.data.pictures,e.skus_cost=t.data.skus[0].cost,e.skus_price=t.data.skus[0].price,e.skus_number=t.data.skus[0].number,e.skus_unit=t.data.skus[0].unit,e.skus_charge=t.data.skus[0].charge,e.skus_stock=t.data.skus[0].stock,e.isPostSale=0==t.data.is_post_sale,e.isChange=0==t.data.is_change,e.logisticType=e.logisticArr.findIndex((function(e){return e.type===t.data.logistic_type})),e.servicesArr=o,e.storesArr=n,e.services=i,e.stores=a})).catch((function(e){uni.showToast({title:e.message,icon:"none"})})):(0,n.managesCreate)({category_cid:this.$Route.query.cid}).then((function(t){t.services=t.services.map((function(e){return(0,s.default)({check:!1},e)})),t.stores=t.stores.map((function(e){return(0,s.default)({check:!1},e)})),e.storesArr=t.stores,e.tags=t.tags,e.servicesArr=t.services,e.type=t.type,e.categoryId=e.$Route.query.id,e.categoryCid=e.$Route.query.cid})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))},methods:{opnePopup:function(e){this.$refs[e].open("bottom")},affirmCategory:function(e,t){var i="services"==e?"servicesArr":"storesArr";this[e]=[];var a,s=(0,o.default)(this[i]);try{for(s.s();!(a=s.n()).done;){var n=a.value;n.check&&this[e].push(n.service_id||n.store_id)}}catch(r){s.e(r)}finally{s.f()}this.$refs[t].close()},pickerChange:function(e,t){this[t]=e.detail.value},openImg:function(e,t){var i=this[t].map((function(e){return e.showpath}));uni.previewImage({urls:i,current:e,indicator:"number"})},removeImg:function(e,t){this[t].splice(e,1)},updCover:function(e){var t=this;uni.chooseImage({success:function(i){var a=i.tempFiles.map((function(e,t){return{name:"uploads"+t,uri:e.path}}));(0,r.uploads)(a).then((function(i){for(var a in i.path)t[e].push({path:i.path[a],showpath:i.url[a]})})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))}})},submitAdd:function(){var e=this,t=this.pictures.map((function(e){return e.path})),i=this.content.map((function(e){return e.path}));if(this.pictures.length<=0)uni.showToast({title:"商品轮播图不能为空",icon:"none"});else{var a={name:this.name,cover:this.pictures[0].path,category_id:this.categoryId,category_cid:this.categoryCid,pictures:t,content:i,description:this.description,is_post_sale:this.isPostSale?0:1,services:this.services,skus_cost:this.skus_cost,skus_price:this.skus_price,skus_number:this.skus_number,skus_unit:this.skus_unit,skus_charge:this.skus_charge,skus_stock:this.skus_stock,is_change:this.isChange?0:1,logistic_type:this.logisticArr[this.logisticType].type,stores:this.stores,expiried_at:this.expiriedAt},o="edit"===this.$Route.query.type?(0,n.managesGoodsPut)(this.$Route.query.id,a):(0,n.managesGoodsCreate)(a);o.then((function(t){2!==e.type?uni.showModal({title:"提示",content:"edit"===e.$Route.query.type?"商品权证已更新,是否立即补充产品附加信息认证?":"商品权证已发布,是否立即补充产品附加信息认证?",cancelText:"稍后认证",confirmText:"立即认证",success:function(i){if(i.cancel&&e.$Router.back("edit"===e.$Route.query.type?1:2),i.confirm){var a="edit"===e.$Route.query.type?e.$Route.query.id:t;console.log(a),e.$Router.push({name:"goodsAddAuth",params:{id:a,type:"goodsAdd",edit:"edit"===e.$Route.query.type}})}}}):uni.showModal({title:"提示",content:"商品权证已发布,请耐心等待平台审核",showCancel:!1,success:function(t){t.confirm&&e.$Router.back("edit"===e.$Route.query.type?1:2)}})})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))}}}};t.default=c},e23e:function(e,t,i){var a=i("24fb");t=a(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-7e85741a]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-7e85741a]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-7e85741a]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-7e85741a]{padding-top:0}.vertical[data-v-7e85741a], .category-popup .header[data-v-7e85741a]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-7e85741a], .form-block .picker-flex .picker-text[data-v-7e85741a]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-7e85741a], .category-popup .category-flex .category-flex-item .category-content[data-v-7e85741a]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-7e85741a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-7e85741a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-7e85741a]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.content[data-v-7e85741a]{padding-bottom:%?150?%}.form-block[data-v-7e85741a]{background:#fff;margin-top:%?20?%}.form-block .form-box[data-v-7e85741a]{position:relative;padding-left:%?240?%;padding-right:%?30?%;font-size:%?30?%;min-height:%?80?%}.form-block .form-box[data-v-7e85741a]::after{position:absolute;bottom:0;left:%?30?%;right:0;height:%?1?%;content:" ";background:#ddd}.form-block .form-box[data-v-7e85741a]:last-child::after{display:none}.form-block .form-box .form-label[data-v-7e85741a]{position:absolute;left:%?30?%;line-height:%?80?%;top:0;width:calc(%?240?% - %?30?%)}.form-block .inputs-flex uni-input[data-v-7e85741a]{height:%?80?%;line-height:%?80?%}.form-block .input-unit[data-v-7e85741a]{padding-right:%?200?%}.form-block .input-unit .units[data-v-7e85741a]{position:absolute;right:0;top:0;line-height:%?80?%;height:%?80?%;width:%?200?%;padding-right:%?30?%;text-align:right;box-sizing:border-box}.form-block .picker-flex .picker-text[data-v-7e85741a]{position:relative;line-height:%?80?%;min-height:%?80?%;padding-right:%?80?%}.form-block .picker-flex .picker-text .picker-icon[data-v-7e85741a]{right:0;position:absolute}.form-block .picker-flex .picker-switch[data-v-7e85741a]{line-height:%?80?%;min-height:%?80?%;text-align:right;margin-right:%?-15?%}.form-block .picker-flex .picker-switch uni-switch[data-v-7e85741a]{-webkit-transform:scale(.7);transform:scale(.7)}.form-block .form-upd .form-title[data-v-7e85741a]{font-size:%?30?%;line-height:%?80?%;padding:0 %?30?%}.form-block .form-upd .form-title uni-text[data-v-7e85741a]{font-size:80%;color:#555}.form-block .form-upd .form-imgs[data-v-7e85741a]{margin-top:%?-10?%;padding:0 %?20?% %?20?%;display:flex;flex-wrap:wrap}.form-block .form-upd .form-imgs .item[data-v-7e85741a]{width:calc(20% - %?14?%);padding-top:calc(20% - %?14?%);margin:%?7?%;position:relative}.form-block .form-upd .form-imgs .item .item-cover[data-v-7e85741a]{position:absolute;top:0;left:0;width:100%;height:100%}.form-block .form-upd .form-imgs .item-add[data-v-7e85741a]{border:dashed %?2?% #ddd;box-sizing:border-box}.form-block .form-upd .form-imgs .item-add .item-cover[data-v-7e85741a]{top:calc(15% - %?2?%);left:calc(15% - %?2?%);width:70%;height:70%}.footer[data-v-7e85741a]{background:#fff;position:fixed;bottom:0;left:0;right:0;padding:%?20?% %?30?%;box-shadow:0 0 %?4?% %?4?% rgba(0,0,0,.02);z-index:9}.footer .footer-btn[data-v-7e85741a]{border:none;border-radius:0;background:#8b64fd;height:%?90?%;line-height:%?90?%;font-weight:700;font-size:%?32?%;color:#fff}.footer .footer-btn[data-v-7e85741a]::after{border:none}.category-popup[data-v-7e85741a]{background:#f5f5f5;padding:0 %?60?% %?60?% %?60?%}.category-popup .header[data-v-7e85741a]{padding:%?60?% 0;box-sizing:border-box}.category-popup .header .title[data-v-7e85741a]{text-align:center;font-size:%?46?%;font-weight:700;line-height:%?90?%}.category-popup .header .subtitle[data-v-7e85741a]{font-size:%?28?%;color:#555;text-align:center}.category-popup .category-flex[data-v-7e85741a]{max-height:50vh;overflow-y:scroll}.category-popup .category-flex .category-flex-item[data-v-7e85741a]{margin-bottom:%?30?%;padding:%?30?%;background:#fff;border:solid %?1?% #fff;box-sizing:border-box}.category-popup .category-flex .category-flex-item .category-name[data-v-7e85741a]{padding-bottom:%?15?%;font-weight:700;font-size:%?30?%}.category-popup .category-flex .category-flex-item .category-content[data-v-7e85741a]{font-size:%?26?%;color:#555}.category-popup .category-flex .category-flex-item.show[data-v-7e85741a]{color:#8b64fd;border:solid %?1?% #8b64fd}.category-popup .category-flex .category-flex-item[data-v-7e85741a]:last-child{margin-bottom:0}.category-popup .btns[data-v-7e85741a]{padding-top:%?60?%}.category-popup .btns uni-button[data-v-7e85741a]{background:#8b64fd;border-radius:0;height:%?90?%;line-height:%?90?%;font-size:%?32?%;color:#fff;font-weight:700}.category-popup .btns uni-button[data-v-7e85741a]::after{border:none}',""]),e.exports=t},e437:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a={pulldown:"",refreshempty:"",back:"",forward:"",more:"","more-filled":"",scan:"",qq:"",weibo:"",weixin:"",pengyouquan:"",loop:"",refresh:"","refresh-filled":"",arrowthindown:"",arrowthinleft:"",arrowthinright:"",arrowthinup:"","undo-filled":"",undo:"",redo:"","redo-filled":"",bars:"",chatboxes:"",camera:"","chatboxes-filled":"","camera-filled":"","cart-filled":"",cart:"","checkbox-filled":"",checkbox:"",arrowleft:"",arrowdown:"",arrowright:"","smallcircle-filled":"",arrowup:"",circle:"","eye-filled":"","eye-slash-filled":"","eye-slash":"",eye:"","flag-filled":"",flag:"","gear-filled":"",reload:"",gear:"","hand-thumbsdown-filled":"","hand-thumbsdown":"","hand-thumbsup-filled":"","heart-filled":"","hand-thumbsup":"",heart:"",home:"",info:"","home-filled":"","info-filled":"","circle-filled":"","chat-filled":"",chat:"","mail-open-filled":"","email-filled":"","mail-open":"",email:"",checkmarkempty:"",list:"","locked-filled":"",locked:"","map-filled":"","map-pin":"","map-pin-ellipse":"",map:"","minus-filled":"","mic-filled":"",minus:"",micoff:"",mic:"",clear:"",smallcircle:"",close:"",closeempty:"",paperclip:"",paperplane:"","paperplane-filled":"","person-filled":"","contact-filled":"",person:"",contact:"","images-filled":"",phone:"",images:"",image:"","image-filled":"","location-filled":"",location:"","plus-filled":"",plus:"",plusempty:"","help-filled":"",help:"","navigate-filled":"",navigate:"","mic-slash-filled":"",search:"",settings:"",sound:"","sound-filled":"","spinner-cycle":"","download-filled":"","personadd-filled":"","videocam-filled":"",personadd:"",upload:"","upload-filled":"",starhalf:"","star-filled":"",star:"",trash:"","phone-filled":"",compose:"",videocam:"","trash-filled":"",download:"","chatbubble-filled":"",chatbubble:"","cloud-download":"","cloud-upload-filled":"","cloud-upload":"","cloud-download-filled":"",headphones:"",shop:""};t.default=a},ef1b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploads=void 0;var a=i("89d9"),o=function(e){return(0,a.uploading)(e)};t.uploads=o},f1a7:function(e,t,i){"use strict";i.r(t);var a=i("6876"),o=i("5f33");for(var s in o)"default"!==s&&function(e){i.d(t,e,(function(){return o[e]}))}(s);i("99ac");var n,r=i("f0c5"),c=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"218f84fe",null,!1,a["a"],n);t["default"]=c.exports}}]);