Explorar o código

2. app端,修改选课界面样式已上传,已更新 √

Changpeng Duan %!s(int64=5) %!d(string=hai) anos
pai
achega
8c2f26cb66

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

@@ -469,7 +469,7 @@
                         }
                     })
                 }).catch(() => {
-                    this.appoint = "0"
+                    this.appoint = "0";
                     this.$message({
                         type: 'info',
                         message: '已取消当前操作'
@@ -486,8 +486,7 @@
                 // ClassListQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        console.log(json.Rs);
-                        if (json.Rs == null) return false
+                        if (json.Rs == null) return false;
                         that.panel.classOptions = turnClassResToOption(json.Rs);
                         that.panel.classOptions.unshift({value: '0', label: '全部'})
                     } else {

+ 5 - 6
tv/src/Mock/index.js

@@ -293,7 +293,7 @@ let testHerosRankingQuery = function (num) {
                 {
                     "UserName": "@cname",
                     "Sex": 1,
-                    "Head": "http://192.168.0.2/flyhead.png",
+                    "Head": "",
                     "Values": "4034",
                     "Unite": "千卡",
                     "Message": ""
@@ -301,7 +301,7 @@ let testHerosRankingQuery = function (num) {
                 {
                     "UserName": "@cname",
                     "Sex": 1,
-                    "Head": "http://192.168.0.2/flyhead.png",
+                    "Head": "",
                     "Values": "2290",
                     "Unite": "千卡",
                     "Message": ""
@@ -323,7 +323,7 @@ let testHerosRankingQuery = function (num) {
                 {
                     "UserName": "郑伟",
                     "Sex": 1,
-                    "Head": "http://192.168.0.2/flyhead.png",
+                    "Head": "",
                     "Values": "1020",
                     "Unite": "",
                     "Message": "打破了历史记录100000"
@@ -361,7 +361,7 @@ if (t == 0) {
     let curheadapi = 'http://192.168.0.63:8080/';
 
     // 0: 下课 团课/私教/PK 的排名
-    let LessonClass = 0;
+    let LessonClass = 1;
     // 1:团课/私教
     // 2:竞技课2PK
     // 3:竞技课threepk
@@ -371,7 +371,7 @@ if (t == 0) {
     if (LessonClass == 1) {
         // 上团课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(1, 1));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(2, 1));
     } else if (LessonClass == 2) {
         // 上2队PK课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
@@ -398,7 +398,6 @@ if (t == 0) {
         }
     }
 
-
     // wait
     // 英雄榜
     Mock.mock(curheadapi + 'HerosRankingQuery', 'post', testHerosRankingQuery(3));

+ 1 - 1
tv/src/views/Main.vue

@@ -17,7 +17,7 @@
                                     <div class="nameMd">{{ s.Name }}</div>
                                     <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                         <power :cur-power="s.PowerPercent"></power>
-                                          <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                     </div>
                                 </span>
                                 <div class="head">

+ 2 - 2
tv/src/views/pk.vue

@@ -24,7 +24,7 @@
                                 <div class="nameMd">{{ s.Name }}</div>
                                 <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                     <power :cur-power="s.PowerPercent"></power>
-                                    <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                 </div>
                             </h5>
                             <div class="user">
@@ -125,7 +125,7 @@
                                 <div class="nameMd">{{ s.Name }}</div>
                                 <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                     <power :cur-power="s.PowerPercent"></power>
-                                    <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                 </div>
                             </h5>
                             <div class="user">

+ 55 - 4
tv/src/views/test.vue

@@ -1,25 +1,76 @@
 <template>
     <div>
-        <sumNumber :cur-number="curNumber"></sumNumber>
+        <!--<sumNumber :cur-number="curNumber"></sumNumber>-->
+        <h5>每个上课的人</h5>
+        <ul>
+            <li v-for="(s,i) in students" v-show="students"
+                v-if="students.length > 0">
+                {{ s.Name }}
+
+            </li>
+        </ul>
+        <div>
+
+        </div>
     </div>
 </template>
 
 <script>
     import sumNumber from '@/components/sumNumber'
+    import
+    {
+        getHello,
+        getClassStat,
+        getRecordBreak,
+        getNewUser
+    } from '@/api/getApiRes'
 
+    import '../libs/rem';
+    import '../Global'
+
+    let qs = require('qs');
     export default {
         data() {
             return {
-                curNumber: 723519
+                curNumber: 723519,
+                students:[]
             }
         },
         mounted() {
+            this.mainTimer = setInterval(() => {
+                this.init();
+            }, 1000);
         },
         methods: {
             setNumber() {
                 this.curNumber = parseInt(Math.random()*1000);
-                console.log(  this.curNumber);
-            }
+            },
+            init() {
+                this.GetgetUserList();
+            },
+            GetgetUserList() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    eqSn: localStorage.eqSn
+                };
+                let postdata = qs.stringify(param);
+                getHello(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.students = json.Rs;
+                        // that.giveClassName(json.Rs);
+                    } else {
+                        // 已下课
+                        if (json.Code == '999') {
+                            that.students = ""
+                        } else {
+                            // 已出错
+                            that.$message.error(json.Memo);
+                        }
+                    }
+                })
+            },
         },
         components: {
             sumNumber

+ 3 - 3
tv/src/views/threepk.vue

@@ -63,7 +63,7 @@
                                 <div class="nameMd">{{ s.Name }}</div>
                                 <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                     <power :cur-power="s.PowerPercent"></power>
-                                    <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                 </div>
                             </h5>
                             <div class="user">
@@ -129,7 +129,7 @@
                                 <div class="nameMd">{{ s.Name }}</div>
                                 <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                     <power :cur-power="s.PowerPercent"></power>
-                                    <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                 </div>
                             </h5>
                             <div class="user">
@@ -195,7 +195,7 @@
                                 <div class="nameMd">{{ s.Name }}</div>
                                 <div class="namert" v-if="s.ActivePercent != 0 && s.RealHr != 0">
                                     <power :cur-power="s.PowerPercent"></power>
-                                    <!--<img src="../static/img/comm/isPrivate.svg" alt="" v-if="s.IsPrivate" style="float: right;margin-right: 0.2rem;margin-top: 0.1rem">-->
+
                                 </div>
                             </h5>
                             <div class="user">

+ 6 - 3
tv/需求修改和debug.md

@@ -126,18 +126,21 @@ let url = '';
     formatCk->FormatCk
     realHr->RealHr
     activePercent->ActivePercent
+2. app端,修改选课界面样式已上传,已更新 √ 
 
   
  
- 2.课程管理 单独添加,绑定,删除临时会员  (临时会员,单条增加
+ 2.课程管理 单独添加,绑定,删除临时会员  (临时会员,单条增加,定一下怎么加?
+ 
  *downloadwgt下的还是旧的包是为什么?
+ 
  7.上课学生分组,改由后台进行第一次分组,每次改队上传后台处理
 
  ck往右移动
  
- 当日排名
+ TV版本增加当日排名内容
  
- 欢迎私有心率带同学来上课
+ TODO 欢迎私有心率带同学来上课