diff --git a/src/views/store/index.vue b/src/views/store/index.vue
index 78a4f53..898a5fe 100644
--- a/src/views/store/index.vue
+++ b/src/views/store/index.vue
@@ -18,7 +18,8 @@
删除
功能模块
编辑
- 删除商品
+ 删除商品
+ 删除分类
@@ -100,7 +101,7 @@ export default {
{
title: '操作',
dataIndex: 'action',
- width: '340px',
+ width: '400px',
scopedSlots: { customRender: 'action' },
},
],
@@ -178,14 +179,14 @@ export default {
/**
* 删除商品
*/
- handleDeleteGoods(item) {
+ handleDeleteGoods(item, type) {
const app = this
app.$confirm({
- title: '您确定要删除该商品吗?',
+ title: type == 1 ? '您确定要删除该商品吗?' : '您确定要删除该分类吗?',
// okType: 'danger',
onOk() {
// 确认删除
- return app.onSubmitDeleteGoods(item)
+ return app.onSubmitDeleteGoods(item, type)
},
})
},
@@ -201,8 +202,8 @@ export default {
/**
* 确认删除商品
*/
- onSubmitDeleteGoods(item) {
- return Api.deleteGoods({ storeId: item['store_id'] }).then((result) => {
+ onSubmitDeleteGoods(item,type) {
+ return Api.deleteGoods({ storeId: item['store_id'], type: type == 1 ? 'goods' : 'cate' }).then((result) => {
this.$message.success(result.message)
this.handleRefresh()
})