Browse Source

修改产品类目状态启用/停用

1018653686@qq.com 1 year ago
parent
commit
aa64651e4a
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/views/XMHJC/product/category/index.vue

+ 1 - 6
src/views/XMHJC/product/category/index.vue

@@ -311,11 +311,7 @@ const submitForm = () => {
 };
 
 const changeStatus = (row) => {
-  modalType.value = "edit";
   let status = row.status == "1" ? 0 : 1;
-  proxy.post("/productCategory/detail", { id: row.id }).then((res) => {
-    res.status = status;
-    formData.data = res;
     ElMessageBox.confirm("你是否确认此操作?", "提示", {
       confirmButtonText: "确定",
       cancelButtonText: "取消",
@@ -323,7 +319,7 @@ const changeStatus = (row) => {
     }).then(() => {
       // 更新状态
       proxy
-        .post("/productCategory/" + modalType.value, formData.data)
+        .post("/productCategory/changeStatus", {id:row.id,status:status})
         .then((res) => {
           ElMessage({
             message: "操作成功",
@@ -332,7 +328,6 @@ const changeStatus = (row) => {
           getList();
         });
     });
-  });
 };
 
 //编辑详情