更新优化
This commit is contained in:
parent
7ffc142dc2
commit
e3e2cf0613
@ -290,11 +290,11 @@
|
|||||||
methods: {
|
methods: {
|
||||||
addGoods(item={}) {
|
addGoods(item={}) {
|
||||||
item = JSON.parse(JSON.stringify(item));
|
item = JSON.parse(JSON.stringify(item));
|
||||||
if(this.isNullImage(item.image)||
|
// if(this.isNullImage(item.image)||
|
||||||
( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
|
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
|
||||||
return Toast('请先上传商品图片后再加入店铺');
|
// return Toast('请先上传商品图片后再加入店铺');
|
||||||
}
|
// }
|
||||||
if(item.update) return Toast('请保存修改后再添加');
|
// if(item.update) return Toast('请保存修改后再添加');
|
||||||
this.putGoods.id = item.id;
|
this.putGoods.id = item.id;
|
||||||
this.putGoods.price = '';
|
this.putGoods.price = '';
|
||||||
this.putGoods.stock = '';
|
this.putGoods.stock = '';
|
||||||
|
@ -413,17 +413,24 @@
|
|||||||
async initClasiffy() {
|
async initClasiffy() {
|
||||||
this.merchantClassification = (await storeClassifyLst(this.merId)).data;
|
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);
|
categoryList(this.merId).then((res)=>{
|
||||||
data.forEach((item1) => {
|
res.data.forEach((item1) => {
|
||||||
item1.children.forEach((item2) => {
|
item1.children.forEach((item2) => {
|
||||||
item2.children = null;
|
item2.children = null;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.platformClassificationData = data;
|
this.platformClassificationData = res.data;
|
||||||
|
}).catch(e=>{
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 更新商品条码
|
// 更新商品条码
|
||||||
updateCode(e) {
|
updateCode(e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user