添加商品时,没有多规格,提示

This commit is contained in:
cc_zbp 2023-06-01 17:55:07 +08:00
parent 68ba0e8ac9
commit 389ec632ee

View File

@ -163,7 +163,7 @@
</checkbox-group> </checkbox-group>
</view> </view>
<view class="popup_group_item" > <view class="popup_group_item">
<view class="popup_group_item_label">是否包邮</view> <view class="popup_group_item_label">是否包邮</view>
<view class="popup_group_item_value"> <view class="popup_group_item_value">
<view class="popup_group_item_message"> <view class="popup_group_item_message">
@ -242,7 +242,7 @@
import { import {
categoryBrandlist, categoryBrandlist,
categorySelect, categorySelect,
storeClassifyLst, storeClassifyLst,
categoryList, categoryList,
attrList, attrList,
templateList, templateList,
@ -411,7 +411,7 @@
if (this.step == 2) { if (this.step == 2) {
this.secoundModel = !this.secoundModel; this.secoundModel = !this.secoundModel;
} }
this.initClasiffy(); this.initClasiffy();
}, },
watch: { watch: {
@ -432,10 +432,10 @@
}, },
methods: { methods: {
// //
async initClasiffy() { async initClasiffy() {
// //
this.merchantClassification = (await storeClassifyLst(this.merId)).data; this.merchantClassification = (await storeClassifyLst(this.merId)).data;
}, },
async initData() { async initData() {
if (getStorage('addGoodsFormData')) { if (getStorage('addGoodsFormData')) {
this.setFormData = getStorage('addGoodsFormData'); this.setFormData = getStorage('addGoodsFormData');
@ -669,6 +669,7 @@
// //
selectSpecification() { selectSpecification() {
attrList(this.merId, { page: 1, limit: 10000 }).then(res => { attrList(this.merId, { page: 1, limit: 10000 }).then(res => {
if (res.data.list.length < 1) return Toast('暂无规格可选');
this.specificationClassification = res.data.list; this.specificationClassification = res.data.list;
this.classified['attr'] = this.specificationClassification; this.classified['attr'] = this.specificationClassification;
this.specificationClassification.forEach(item => { this.specificationClassification.forEach(item => {
@ -773,7 +774,7 @@
// //
handleNextStep() { handleNextStep() {
console.log(this.setFormData.setSpecificaValue) console.log(this.setFormData.setSpecificaValue)
let canJumpFlag = true; let canJumpFlag = true;
let requireData = { let requireData = {
image: '请选择主图', image: '请选择主图',
@ -801,7 +802,7 @@
Toast('请选择送货方式'); Toast('请选择送货方式');
return; return;
} }
if (this.setFormData.imageList.length < 2 ) { if (this.setFormData.imageList.length < 2) {
Toast('请添加最少两张图片用于展示'); Toast('请添加最少两张图片用于展示');
return; return;
} }