From 389ec632ee2c2306aea951ae15222b2fe6f45f5c Mon Sep 17 00:00:00 2001 From: cc_zbp <487602586@qq.com> Date: Thu, 1 Jun 2023 17:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=A4=9A=E8=A7=84=E6=A0=BC=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/product/addGoods/index.vue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) 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; }