You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.6 KiB
1 lines
2.6 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/life/addGoods/index"],{"1f1c":function(t,e,i){"use strict";i.r(e);var n=i("8413"),a=i.n(n);for(var s in n)"default"!==s&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},"31aa":function(t,e,i){"use strict";i.r(e);var n=i("cf9a"),a=i("1f1c");for(var s in a)"default"!==s&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("d09a");var o,r=i("f0c5"),c=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],o);e["default"]=c.exports},5629:function(t,e,i){"use strict";(function(t){i("ef82");n(i("66fd"));var e=n(i("31aa"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},8413:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("b6d1"),a=i("2df4"),s={data:function(){return{store_name:"",unit_name:"",image:"",slider_image:["","",""],description:"",tempId:1,attrs:[{pic:"",price:"",ot_orice:"",stock:"",weight:"",volume:""}],state:0}},methods:{uploadImg:function(t){var e=this;(0,n.chooseImage)((function(i){e.$set(e.slider_image,t,i)}))},uploadSkuImg:function(t){var e=this;(0,n.chooseImage)((function(i){e.$set(e.attrs,t,{pic:i})}))},toGoodsDetails:function(){t.navigateTo({url:"/pages/life/goodsDetails/index?desc="+encodeURIComponent(this.description)})},addSku:function(){var t={pic:"",price:"",ot_orice:"",stock:"",weight:"",volume:""};this.attrs.push(t)},delSku:function(t){this.attrs.splice(t,1)},radioChange:function(t){this.state=t.detail.value},submit:function(){var t=this,e={store_name:this.store_name,unit_name:this.unit_name,image:this.slider_image[0],slider_image:this.slider_image,description:this.description,tempId:1,attrs:this.attrs,state:this.state,spec_type:this.attrs.length>1?1:0};""!=e.store_name?""!=e.slider_image[0]?""!=e.description&&""!=e.description?(e.attrs.forEach((function(e,i){""!=e.price?""!=e.stock||t.alertMessage("请商品规格库存"):t.alertMessage("请商品规格价格")})),(0,a.addProduct)(e).then((function(t){})),console.log(e,"form")):this.alertMessage("请填写商品详情"):this.alertMessage("请至少上传一张商品图片"):this.alertMessage("请填写商品名称")},alertMessage:function(e){t.showToast({title:e,icon:"none"})}}};e.default=s}).call(this,i("543d")["default"])},b66c:function(t,e,i){},cf9a:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement;t._self._c},s=[]},d09a:function(t,e,i){"use strict";var n=i("b66c"),a=i.n(n);a.a}},[["5629","common/runtime","common/vendor"]]]); |