Browse Source

优惠码接口更改

秦鹏 3 years ago
parent
commit
978458aa6a
1 changed files with 8 additions and 7 deletions
  1. 8 7
      src/views/teacher-devEntering/discountCodeList.vue

+ 8 - 7
src/views/teacher-devEntering/discountCodeList.vue

@@ -109,7 +109,7 @@
 <script>
 <script>
 import Header from "@/components/Header";
 import Header from "@/components/Header";
 import Nav from "@/components/teacher-devEntering/Nav";
 import Nav from "@/components/teacher-devEntering/Nav";
-import { BookgetContent ,LearnWebSI} from "@/api/api";
+import { BookgetContent, LearnWebSI } from "@/api/api";
 import { getToken } from "@/utils/auth";
 import { getToken } from "@/utils/auth";
 import { encodeURL } from "js-base64";
 import { encodeURL } from "js-base64";
 export default {
 export default {
@@ -134,13 +134,13 @@ export default {
       },
       },
       exportRadio: -1,
       exportRadio: -1,
       exportLoading: false,
       exportLoading: false,
-      goods_type:null,
+      goods_type: null,
     };
     };
   },
   },
   created() {
   created() {
     const _this = this;
     const _this = this;
     _this.bookId = this.$route.query.bookId;
     _this.bookId = this.$route.query.bookId;
-    _this.goods_type =  this.$route.query.goods_type;
+    _this.goods_type = this.$route.query.goods_type;
     this.getList();
     this.getList();
   },
   },
   methods: {
   methods: {
@@ -163,7 +163,7 @@ export default {
           "order-discount_manager-BatchCreateDiscountCodeFoGoods";
           "order-discount_manager-BatchCreateDiscountCodeFoGoods";
         let data = {
         let data = {
           goods_id: this.bookId,
           goods_id: this.bookId,
-          goods_type: this.goods_type,
+          goods_type: this.goods_type * 1,
           count: Number(this.discountNumber),
           count: Number(this.discountNumber),
         };
         };
         LearnWebSI(MethodName, data)
         LearnWebSI(MethodName, data)
@@ -190,14 +190,15 @@ export default {
     },
     },
     // 查询数据列表
     // 查询数据列表
     getList() {
     getList() {
-      let MethodName = "page_query-PageQueryBookDiscountCodeList";
+      let MethodName = "page_query-PageQueryGoodsDiscountCodeList";
       let data = {
       let data = {
-        book_id: this.bookId,
+        goods_id: this.bookId,
         page_capacity: this.page_capacity,
         page_capacity: this.page_capacity,
         cur_page: this.currentPage,
         cur_page: this.currentPage,
         use_status: -1,
         use_status: -1,
+        goods_type: this.goods_type * 1,
       };
       };
-      BookgetContent(MethodName, data).then((res) => {
+      LearnWebSI(MethodName, data).then((res) => {
         let _this = this;
         let _this = this;
         _this.tableData = res.discount_code_list;
         _this.tableData = res.discount_code_list;
         _this.courseTotal = res.total_count;
         _this.courseTotal = res.total_count;