Przeglądaj źródła

Merge branch 'five-second-add' of http://120.79.166.78:19005/zhongzheng-edu/saas_entrepot_admin into six

Tang 3 lat temu
rodzic
commit
62f74d5a09

+ 8 - 0
src/newApi/activityRecommend.js

@@ -16,6 +16,14 @@ export default {
             data
         })
     },
+    //删除商品推荐
+    removeactivityrecommend(data) {
+        return request({
+            url: '/activity/recommend/remove',
+            method: 'post',
+            data
+        })
+    },
     //查询商品推荐列表
     inquireactivityrecommendList(data) {
         return request({

+ 24 - 2
src/views/2Cport/referralManageMent/tab1/tab1.vue

@@ -50,7 +50,7 @@
                   placement="right"
                   trigger="click"
                 >
-                  <ul style="overflow: auto; max-height: 500px;margin:0px;">
+                  <ul style="overflow: auto; max-height: 500px; margin: 0px">
                     <li
                       v-for="(itm, inds) in scope.row[item.prop]"
                       :key="inds"
@@ -78,6 +78,8 @@
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="editList(scope.row)"
               >修改</el-button
+            ><el-button type="text" size="small" @click="del(scope.row)"
+              >删除</el-button
             >
           </template>
         </el-table-column>
@@ -144,7 +146,7 @@ export default {
       this.$api
         .inquireactivityrecommendList({
           platform: 1,
-          type: this.activeName === "first" ? 1 : 2,
+          type: this.activeName === "first" ? 1 : 2
         })
         .then((res) => {
           this.tableData = res.rows;
@@ -162,6 +164,26 @@ export default {
     editList(row) {
       this.$refs.addGL.openBox(0, row.recommendId);
     },
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            recommendId: v.recommendId
+          };
+          this.$api.removeactivityrecommend(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search();
+          });
+        })
+        .catch(() => {
+        });
+    },
   },
 };
 </script>

+ 22 - 1
src/views/2Cport/referralManageMent/tab2/tab2.vue

@@ -50,7 +50,7 @@
                   placement="right"
                   trigger="click"
                 >
-                  <ul style="overflow: auto; max-height: 500px;margin:0px;">
+                  <ul style="overflow: auto; max-height: 500px; margin: 0px">
                     <li
                       v-for="(itm, inds) in scope.row[item.prop]"
                       :key="inds"
@@ -78,6 +78,8 @@
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="editList(scope.row)"
               >修改</el-button
+            ><el-button type="text" size="small" @click="del(scope.row)"
+              >删除</el-button
             >
           </template>
         </el-table-column>
@@ -162,6 +164,25 @@ export default {
     editList(row) {
       this.$refs.addGL.openBox(0, row.recommendId);
     },
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            recommendId: v.recommendId,
+          };
+          this.$api.removeactivityrecommend(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search();
+          });
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>