|
|
|
@ -204,33 +204,34 @@ |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
//商品上下架 |
|
|
|
upDown(type, data) { |
|
|
|
upDown(type, data) { |
|
|
|
let that = this |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定将此款商品" + type == 0 ? "下架" : "上架" + "吗?", |
|
|
|
success: function(res) { |
|
|
|
if (type == 0) { //下架 |
|
|
|
this.tui.request("/app/product/down", "POST", { |
|
|
|
that.tui.request("/app/product/down", "POST", { |
|
|
|
id: data.id |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("下架成功") |
|
|
|
that.tui.toast("下架成功") |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
that.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} else { //上架 |
|
|
|
this.tui.request("/app/product/up", "POST", { |
|
|
|
that.tui.request("/app/product/up", "POST", { |
|
|
|
id: id |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("上架成功") |
|
|
|
that.tui.toast("上架成功") |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
that.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} |
|
|
|
this.getShareList(data.categoryId) |
|
|
|
that.getShareList(data.categoryId) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|