소스 검색

我的题库 排序修复

Tang 3 년 전
부모
커밋
c83d0d9f5e
2개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 4
      src/axios.js
  2. 6 2
      src/pages/person-center/my-bank/bank-detailCopy/index.vue

+ 4 - 4
src/axios.js

@@ -1,17 +1,17 @@
 import axios from 'axios'
 import store from './store'
 import { Message } from 'element-ui'
-// export const BASE_URL = 'https://api.xyyxt.net'   //release
+export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test
-export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
 // export const BASE_URL = 'http://192.168.1.24:5055'    //dev
 // export const BASE_URL = 'http://120.79.166.78:19012'    //测试-外网
 export const tenantId = '867735392558919680'
 
 
 //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 import tools from './common/tools'
 import router from './router'

+ 6 - 2
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -920,6 +920,9 @@ export default {
                         goodsId: this.goodsId,
                       })
                       .then((res) => {
+                        res.data.sort((a, b) => {
+                          return a.sort - b.sort;
+                        });
                         this.$set(
                           this.bankList[DW].list[DWChapter],
                           "showList",
@@ -946,7 +949,6 @@ export default {
                   }
                 });
             } else if (this.bankList[DW].type == 2) {
-              console.log(2);
               this.$request
                 .bankExamExamList({
                   orderGoodsId: this.orderGoodsId,
@@ -955,6 +957,9 @@ export default {
                   goodsId: this.goodsId,
                 })
                 .then((res) => {
+                  res.data.sort((a, b) => {
+                    return a.sort - b.sort;
+                  });
                   this.$set(
                     this.bankList[DW],
                     "showList",
@@ -1152,7 +1157,6 @@ export default {
             res.data.sort((a, b) => {
               return a.sort - b.sort;
             });
-            console.log(res, "res");
             chapter.showList = !chapter.showList;
             chapter.list = res.data;
             resolve();