更新优化

This commit is contained in:
weipengfei 2023-11-23 16:17:14 +08:00
parent 7ffc142dc2
commit e3e2cf0613
2 changed files with 19 additions and 12 deletions

View File

@ -290,11 +290,11 @@
methods: {
addGoods(item={}) {
item = JSON.parse(JSON.stringify(item));
if(this.isNullImage(item.image)||
( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
return Toast('请先上传商品图片后再加入店铺');
}
if(item.update) return Toast('请保存修改后再添加');
// if(this.isNullImage(item.image)||
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
// return Toast('');
// }
// if(item.update) return Toast('');
this.putGoods.id = item.id;
this.putGoods.price = '';
this.putGoods.stock = '';

View File

@ -413,17 +413,24 @@
async initClasiffy() {
this.merchantClassification = (await storeClassifyLst(this.merId)).data;
},
async initData() {
initData() {
//
this.brand = (await categoryBrandlist(this.merId)).data;
categoryBrandlist(this.merId).then((res)=>{
this.brand = res.data;
}).catch(e=>{
console.log(e);
});
//
let { data } = await categoryList(this.merId);
data.forEach((item1) => {
item1.children.forEach((item2) => {
item2.children = null;
categoryList(this.merId).then((res)=>{
res.data.forEach((item1) => {
item1.children.forEach((item2) => {
item2.children = null;
})
})
this.platformClassificationData = res.data;
}).catch(e=>{
console.log(e);
})
this.platformClassificationData = data;
},
//
updateCode(e) {