diff --git a/pages/product/addGoods/index.vue b/pages/product/addGoods/index.vue index 5351da5..5ba3b6e 100644 --- a/pages/product/addGoods/index.vue +++ b/pages/product/addGoods/index.vue @@ -163,7 +163,7 @@ - + 是否包邮 @@ -242,7 +242,7 @@ import { categoryBrandlist, categorySelect, - storeClassifyLst, + storeClassifyLst, categoryList, attrList, templateList, @@ -411,7 +411,7 @@ if (this.step == 2) { this.secoundModel = !this.secoundModel; } - this.initClasiffy(); + this.initClasiffy(); }, watch: { @@ -432,10 +432,10 @@ }, methods: { // 获取数据 - async initClasiffy() { - //获取商户分类 - this.merchantClassification = (await storeClassifyLst(this.merId)).data; - }, + async initClasiffy() { + //获取商户分类 + this.merchantClassification = (await storeClassifyLst(this.merId)).data; + }, async initData() { if (getStorage('addGoodsFormData')) { this.setFormData = getStorage('addGoodsFormData'); @@ -669,6 +669,7 @@ // 选择规格弹窗 selectSpecification() { attrList(this.merId, { page: 1, limit: 10000 }).then(res => { + if (res.data.list.length < 1) return Toast('暂无规格可选'); this.specificationClassification = res.data.list; this.classified['attr'] = this.specificationClassification; this.specificationClassification.forEach(item => { @@ -773,7 +774,7 @@ // 开始下一步 handleNextStep() { - console.log(this.setFormData.setSpecificaValue) + console.log(this.setFormData.setSpecificaValue) let canJumpFlag = true; let requireData = { image: '请选择主图', @@ -800,8 +801,8 @@ if (!this.setFormData.delivery_way.length) { Toast('请选择送货方式'); return; - } - if (this.setFormData.imageList.length < 2 ) { + } + if (this.setFormData.imageList.length < 2) { Toast('请添加最少两张图片用于展示'); return; }