Ver código fonte

小改动 接口简化

Changpeng Duan 5 anos atrás
pai
commit
b1e17c8fda
3 arquivos alterados com 11 adições e 4 exclusões
  1. 4 0
      pc/src/api/getApiRes.js
  2. 5 2
      pc/src/views/appoint.vue
  3. 2 2
      tv/src/Mock/index.js

+ 4 - 0
pc/src/api/getApiRes.js

@@ -801,3 +801,7 @@ export function VipUserAssociatedPhoneDel(postdata) {
     let url = headapi + 'v1/User/VipUserAssociatedPhoneDel ';
     return getApiBasic(url, postdata);
 }
+export function ClassSimpleQuery(postdata) {
+    let url = headapi + 'v1/Class/ClassSimpleQuery ';
+    return getApiBasic(url, postdata);
+}

+ 5 - 2
pc/src/views/appoint.vue

@@ -321,6 +321,7 @@
         WaitingBeginClassList,
         ShopWxStatusEdit,
         ClassListQuery,
+        ClassSimpleQuery,
         VipUserSimpleQuery
     } from "../api/getApiRes";
 
@@ -480,9 +481,11 @@
                     token: localStorage.token,
                 };
                 let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
+                ClassSimpleQuery(postdata).then(res => {
+                // ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
+                        console.log(json.Rs);
                         if (json.Rs == null) return false
                         that.panel.classOptions = turnClassResToOption(json.Rs);
                         that.panel.classOptions.unshift({value: '0', label: '全部'})
@@ -1358,12 +1361,12 @@
         watch: {
             $route(to) {
                 if (to.name == 'appoint') {
+                    this.panelSelect();
                     if (this.$route.query.page == 'second') {
                         this.activeName = 'second';
                         this.panel.name = this.$route.query.name;
                         // second
                         this.getTableQuery2();
-                        this.panelSelect();
                     }
                 }
 

+ 2 - 2
tv/src/Mock/index.js

@@ -189,9 +189,9 @@ if (t == 1) {
 
     Mock.mock('/api/getUserList', 'post', getUserList());
     // 学生列表
-    Mock.mock('http://192.168.0.74:8080/UserListInfo', 'post', testStudent(1));
+    Mock.mock('http://192.168.0.74:8080/UserListInfo', 'post', testStudent(8));
     // 下课排名
-    Mock.mock('http://192.168.0.74:8080/ClassUserRank', 'post', testStudent(1));
+    Mock.mock('http://192.168.0.74:8080/ClassUserRank', 'post', testStudent(8));
     // 上课状态
     Mock.mock('http://192.168.0.74:8080/ClassStatQuery', 'post', getClassStat());
     // 新同学 0 999