This commit is contained in:
@@ -282,8 +282,7 @@ export default {
|
|||||||
async toggleStatus(item) {
|
async toggleStatus(item) {
|
||||||
const newStatus = item.status === 1 ? 0 : 1
|
const newStatus = item.status === 1 ? 0 : 1
|
||||||
try {
|
try {
|
||||||
await productApi.updateProduct({
|
await productApi.updateProduct(item.productId, {
|
||||||
productId: item.productId,
|
|
||||||
status: newStatus
|
status: newStatus
|
||||||
})
|
})
|
||||||
uni.showToast({ title: newStatus === 1 ? '已上架' : '已下架', icon: 'success' })
|
uni.showToast({ title: newStatus === 1 ? '已上架' : '已下架', icon: 'success' })
|
||||||
|
|||||||
Reference in New Issue
Block a user