cr 3 anos atrás
pai
commit
12f0c3e1fd
2 arquivos alterados com 10 adições e 5 exclusões
  1. 1 1
      src/common/api/index.js
  2. 9 4
      src/pages/yx/brand.vue

+ 1 - 1
src/common/api/index.js

@@ -99,7 +99,7 @@ export default {
99 99
      * @param url
100 100
      * @returns {Promise<any>}
101 101
      */
102
-    delete(url, data = {query: ''}) {
102
+    delete(url, data = {query: ''}, config = {}) {
103 103
         if (data.query) {
104 104
             url = url + '?' + qs.stringify(data)
105 105
             delete data.query

+ 9 - 4
src/pages/yx/brand.vue

@@ -140,11 +140,11 @@
140 140
                                         </div>
141 141
                                         <div
142 142
                                             class="btn"
143
-                                            @click="pushGive(item)"
143
+                                            @click="edit(item)"
144 144
                                         >
145 145
                                             编辑
146 146
                                         </div>
147
-                                        <div class="btn" @click="item(item)">
147
+                                        <div class="btn" @click="remove(item)">
148 148
                                             删除
149 149
                                         </div>
150 150
                                     </div>
@@ -398,9 +398,10 @@ export default {
398 398
         remove(val) {
399 399
             let sendData = {
400 400
                 id: val._id,
401
+                query:true
401 402
             };
402 403
             this.api
403
-                .get("/Supplier/RemoveActivity", sendData, {
404
+                .delete("/Supplier/RemoveActivity", sendData, {
404 405
                     pass: true,
405 406
                 })
406 407
                 .then((res) => {
@@ -411,7 +412,7 @@ export default {
411 412
                                 arr.push(item);
412 413
                             }
413 414
                         }
414
-                        this.activityList = [...this.activityList];
415
+                        this.activityList = [...arr];
415 416
                         this.fn.showToast("删除成功");
416 417
                     } else {
417 418
                         this.fn.showModal({
@@ -423,6 +424,10 @@ export default {
423 424
                 });
424 425
         },
425 426
 
427
+        edit(val){
428
+
429
+        },
430
+
426 431
         // 搜索
427 432
         search() {
428 433
             if (this.searchVal) {