Просмотр исходного кода

1.心跳动画跟着运动强度来 √
2.去掉" ck值" √
3.注意Ck和Cal的大小写 √
4.团课排名的Ck没有按照降序排列 √
5.生日的时候学生有个生日小帽子
6.运动强度最大显示是100 √
7.颜色色块太亮了 ---------------绿色 #059F00 黄色#A6B700 √
8.等待页面右侧要该成果8个人,去掉边框 √

Changpeng Duan 5 лет назад
Родитель
Сommit
e1ce642f50
8 измененных файлов с 100 добавлено и 79 удалено
  1. 19 0
      tv/README.md
  2. 1 1
      tv/src/Global.js
  3. 2 2
      tv/src/views/2pkRank.vue
  4. 3 3
      tv/src/views/3pkRank.vue
  5. 15 8
      tv/src/views/Main.vue
  6. 27 46
      tv/src/views/Rank.vue
  7. 15 8
      tv/src/views/pk.vue
  8. 18 11
      tv/src/views/threepk.vue

+ 19 - 0
tv/README.md

@@ -46,6 +46,25 @@ http://192.168.0.162:9000/Hello
   target: 'http://192.168.0.162:9000/',
 // target: 'http://192.168.0.243:9000/',
 
+=================================
+2020/12/10 需求修改
+1.心跳动画跟着运动强度来 √
+2.去掉" ck值" √
+3.注意Ck和Cal的大小写  √
+4.团课排名的Ck没有按照降序排列  √
+5.生日的时候学生有个生日小帽子
+6.运动强度最大显示是100  √
+7.颜色色块太亮了 ---------------绿色 #059F00  黄色#A6B700 √
+8.等待页面右侧要该成果8个人,去掉边框 √
+9.排名页面根据人数多少显示时间
+10.新学员上课时有个倒数15秒的欢迎页面
+
+11.跨店会员使用穿梭框管理
+12.图片上传服务器地址更换
+13.
+
+
+
 // 上课中学生信息
 getUserListInfo
 

+ 1 - 1
tv/src/Global.js

@@ -7,7 +7,7 @@ companyInfo = {
 
 // headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
 // headapi = 'http://192.168.0.110:8080/';//从郑伟那里获得数据源
-headapi = 'http://192.168.0.10:8080/';//从郑伟那里获得数据源
+headapi = 'http://192.168.0.74:8080/';//从郑伟那里获得数据源
 
 // 七牛云imgsrc
 imgUrl = "http://qjzpcd34v.hb-bkt.clouddn.com";

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

@@ -5,7 +5,7 @@
             <div class="sumScore">
                 <div class="sumlt">
                     <span class="sumCK">
-                        <em>{{redSum}}</em><i>ck</i>
+                        <em>{{redSum}}</em><i>Ck</i>
                     </span>
                     <span class="flagContainer">
                         <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum >= blueSum">
@@ -23,7 +23,7 @@
                         <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum <= blueSum">
                     </span>
                     <span class="sumCK">
-                        <em>{{blueSum}}</em><i>ck</i>
+                        <em>{{blueSum}}</em><i>Ck</i>
                     </span>
                 </div>
             </div>

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

@@ -10,7 +10,7 @@
                     <span class="mineUniteName">
                         红队
                         <span class="sumCK">
-                            <em>{{redSum}}</em><i>ck</i>
+                            <em>{{redSum}}</em><i>Ck</i>
                         </span>
                         <span class="flagContainer">
                             <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="red.rank == 1">
@@ -27,7 +27,7 @@
                     <span class="mineUniteName">
                         蓝队
                         <span class="sumCK">
-                            <em>{{blueSum}}</em><i>ck</i>
+                            <em>{{blueSum}}</em><i>Ck</i>
                         </span>
                         <span class="flagContainer">
                             <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="blue.rank == 1">
@@ -44,7 +44,7 @@
                     <span class="mineUniteName">
                         黄队
                         <span class="sumCK">
-                            <em>{{yellowSum}}</em><i>ck</i>
+                            <em>{{yellowSum}}</em><i>Ck</i>
                         </span>
                         <span class="flagContainer">
                             <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="yellow.rank == 1">

+ 15 - 8
tv/src/views/Main.vue

@@ -21,7 +21,7 @@
                                 <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                             </div>
                             <div class="cla">
-                                <em v-if="s.realHr != 0">{{ s.activePercent }}</em>
+                                <em v-if="s.realHr != 0">{{ s.activePercent |max100 }}</em>
                                 <em class="plus" v-if="s.activePercent == 0 && s.realHr == 0">
                                     ---
                                 </em>
@@ -41,7 +41,6 @@
                                             {{s.realHr}}</span>
                                         <span class="slowJump" v-if="s.realHr != 0"
                                               v-show="parseInt(s.activePercent) <= 30">{{ s.realHr }}</span>
-
                                         <span class="plus" v-if="s.realHr == 0">
                                         ---
                                     </span>
@@ -99,7 +98,7 @@
             return {
                 eqSn: '30:9C:23:0C:8B:1E',
                 pageStyle: RandomBg(),
-                trueDate: true,//真实数据 true false
+                trueDate: false,//真实数据 true false
                 totalTime: 4,
                 times: 1,
                 thisClassName: '',
@@ -139,6 +138,8 @@
             // return false
 
             if (this.trueDate) {
+                this.GetgetUserList();
+                this.curgetClassStat();
                 this.mainTimer = setInterval(() => {
                     this.GetgetUserList();
                     this.curgetClassStat();
@@ -147,7 +148,6 @@
                 this.timer2 = setInterval(() => {
                     this.createEgg();
                 }, 6000);
-                this.GetgetUserList();
                 this.createEgg();
             } else {
                 // 彩蛋
@@ -234,12 +234,10 @@
                     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 {
                         // 已下课
@@ -384,6 +382,13 @@
                     return parseInt(val);
                 }
             },
+            max100(val) {
+                if (val <= 100) {
+                    return val
+                } else {
+                    return 100
+                }
+            }
         },
         components: {
             Headside, newRecord, levelIcon
@@ -431,11 +436,11 @@
     }
 
     .green .centerLi {
-        background: #0AB105;
+        background: #059F00;
     }
 
     .yellow .centerLi {
-        background: #BACC01;
+        background: #A6B700;
     }
 
     .brown .centerLi {
@@ -579,12 +584,14 @@
         margin: 0 auto;
         overflow: hidden;
     }
+
     .human .name div {
         float: left;
         width: 20%;
         text-align: left;
         text-indent: 0.1rem;
     }
+
     .human .name .nameMd {
         width: 60%;
         text-align: center;

+ 27 - 46
tv/src/views/Rank.vue

@@ -64,6 +64,7 @@
     import '../libs/rem';
     import '../Global';
     import {ClassUserRank} from '@/api/getApiRes'
+
     let qs = require('qs');
     export default {
         data() {
@@ -76,24 +77,13 @@
                     CkSort: [],
                     CalSort: [],
                 },
-                rankTimer:null,
-                totalTime:60
+                rankTimer: null,
+                totalTime: 60
             }
         },
         mounted() {
             if (this.trueDate) {
                 this.getClassUserRank();
-                // this.rankTimer  = setInterval(() => {
-                //     this.getClassUserRank();
-                // }, 5000);
-
-            } else {
-                // this.rankTimer  = setInterval(() => {
-                    this.students.CkSort = this.fakeNews();
-                    this.students.CalSort = this.fakeNews();
-                // }, 5000);
-            }
-            if (this.autoJump) {
                 // 倒计时60秒自动关闭
                 let that = this;
                 this.totalTime = 60;
@@ -107,6 +97,22 @@
                         clearInterval(clock);
                     }
                 }, 1000)
+                // this.rankTimer  = setInterval(() => {
+                //     this.getClassUserRank();
+                // }, 5000);
+
+            } else {
+                // this.rankTimer  = setInterval(() => {
+                this.students.CkSort = fakeNews(5);
+                this.students.CalSort = fakeNews(5);
+                this.students.CkSort = this.students.CkSort.sort(function (a, b) {
+                    return b.Ck - a.Ck;
+                });
+                this.students.CalSort = this.students.CalSort.sort(function (a, b) {
+                    return b.Cle - a.Cle;
+                });
+
+                // }, 5000);
             }
         },
         watch: {
@@ -118,13 +124,6 @@
                         //     this.getClassUserRank();
                         // }, 5000);
 
-                    } else {
-                        // this.rankTimer  = setInterval(() => {
-                            this.students.CkSort = this.fakeNews();
-                            this.students.CalSort = this.fakeNews();
-                        // }, 5000);
-                    }
-                    if (this.autoJump) {
                         // 倒计时60秒自动关闭
                         let that = this;
                         this.totalTime = 60;
@@ -137,6 +136,12 @@
                                 clearInterval(clock);
                             }
                         }, 1000)
+
+                    } else {
+                        // this.rankTimer  = setInterval(() => {
+                        this.students.CkSort = fakeNews(5);
+                        this.students.CalSort = fakeNews(5);
+                        // }, 5000);
                     }
                 } else {
                     clearInterval(this.autoJump);
@@ -149,31 +154,6 @@
             this.rankTimer = null;
         },
         methods: {
-            fakeNews() {
-                let item = [];
-                // 1 2 3 5 9 11 13 16 21 30
-                let fakeNums = 7;
-                for (var i = 0; i < fakeNums; i++) {
-                    item.push(
-                        {
-                            "SvId": 1,
-                            "UserId": 1,
-                            "Cle": 999,
-                            "realHr1": parseInt(Math.random() * 100 + 50),
-                            "realHr": 60,
-                            "activePercent": 30,
-                            "heartRate": 90,
-                            "Steps": 9999,
-                            "PureCalorieNoVo2": 999,
-                            "Name": "东南西北中",
-                            "updateTime": 1604568915582,
-                            "Ck": 99.9,
-                            "Head": "http://192.168.0.2/zw.png",
-                        }
-                    )
-                }
-                return item;
-            },
             getClassUserRank() {
                 let that = this;
                 let param = {
@@ -186,7 +166,7 @@
                         this.students.CkSort = json.Rs;
                         this.students.CalSort = json.Rs;
                         let Rs = json.Rs;
-                        if(Rs){
+                        if (Rs != '') {
                             // 排序
                             that.students.CkSort = that.students.CkSort.sort(function (a, b) {
                                 return b.Ck - a.Ck;
@@ -349,6 +329,7 @@
         line-height: 1rem;
         text-align: right;
     }
+
     li .score em {
         font-size: 0.2rem;
     }

+ 15 - 8
tv/src/views/pk.vue

@@ -28,7 +28,7 @@
                             <div class="user">
                                 <div class="ult">
                                     <em>
-                                        <div v-if="s.realHr != 0">{{ s.activePercent}}</div>
+                                        <div v-if="s.realHr != 0">{{ s.activePercent |max100}}</div>
                                         <div class="plus" v-if="s.activePercent == 0 && s.realHr == 0">---</div>
                                         <s>%</s>
                                     </em>
@@ -41,9 +41,9 @@
                                     </div>
                                 </div>
                                 <div class="urt">
-                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 120">{{
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{
                                         s.realHr }}</em>
-                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 120">{{
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90">{{
                                         s.realHr }}</em>
                                     <em class="plus" v-if="s.realHr == 0"> --- </em>
                                     <img src="../static/img/heart.svg" class=""/>
@@ -122,7 +122,7 @@
                                 <div class="ult">
                                     <em>
                                         <div v-if="s.realHr != 0">
-                                            {{ s.activePercent}}
+                                            {{ s.activePercent |max100 }}
                                         </div>
                                         <div class="plus" v-if="s.activePercent == 0&& s.realHr == 0">
                                             ---
@@ -138,9 +138,9 @@
                                     </div>
                                 </div>
                                 <div class="urt">
-                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 120">{{
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{
                                         s.realHr }}</em>
-                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 120">{{
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90">{{
                                         s.realHr }}</em>
                                     <em class="plus" v-if="s.realHr == 0"> --- </em>
                                     <img src="../static/img/heart.svg" class=""/>
@@ -492,6 +492,13 @@
                 } else {
                     return parseInt(val);
                 }
+            },
+            max100(val) {
+                if (val <= 100) {
+                    return val
+                } else {
+                    return 100
+                }
             }
         },
         components: {
@@ -1377,11 +1384,11 @@
     }
 
     .user .umd img.green {
-        border-color: #0AB105;
+        border-color: #059F00;
     }
 
     .user .umd img.yellow {
-        border-color: #BACC01;
+        border-color: #A6B700;
     }
 
     .user .umd img.brown {

+ 18 - 11
tv/src/views/threepk.vue

@@ -66,7 +66,7 @@
                                 <div class="ult">
                                     <em>
                                         <div v-if="s.realHr != 0">
-                                            {{ s.activePercent}}
+                                            {{ s.activePercent | max100}}
                                         </div>
                                         <div class="plus" v-if="s.activePercent == 0&& s.realHr == 0">
                                             ---
@@ -82,9 +82,9 @@
                                     </div>
                                 </div>
                                 <div class="urt">
-                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 120">{{
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{
                                         s.realHr }}</em>
-                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 120">{{
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90">{{
                                         s.realHr }}</em>
                                     <em class="plus" v-if="s.realHr == 0"> --- </em>
                                     <img src="../static/img/heart.svg" class=""/>
@@ -124,7 +124,7 @@
                                 <div class="ult">
                                     <em>
                                         <div v-if="s.realHr != 0">
-                                            {{ s.activePercent}}
+                                            {{ s.activePercent | max100}}
                                         </div>
                                         <div class="plus" v-if="s.activePercent == 0&& s.realHr == 0">
                                             ---
@@ -140,9 +140,9 @@
                                     </div>
                                 </div>
                                 <div class="urt">
-                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 120">{{
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{
                                         s.realHr }}</em>
-                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 120">{{
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90">{{
                                         s.realHr }}</em>
                                     <em class="plus" v-if="s.realHr == 0"> --- </em>
                                     <img src="../static/img/heart.svg" class=""/>
@@ -182,7 +182,7 @@
                                 <div class="ult">
                                     <em>
                                         <div v-if="s.realHr != 0">
-                                            {{ s.activePercent}}
+                                            {{ s.activePercent | max100}}
                                         </div>
                                         <div class="plus" v-if="s.activePercent == 0&& s.realHr == 0">
                                             ---
@@ -199,9 +199,9 @@
                                     </div>
                                 </div>
                                 <div class="urt">
-                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 120">{{
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{
                                         s.realHr }}</em>
-                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 120">{{
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90">{{
                                         s.realHr }}</em>
                                     <em class="plus" v-if="s.realHr == 0"> --- </em>
                                     <img src="../static/img/heart.svg" class=""/>
@@ -586,6 +586,13 @@
                 } else {
                     return parseInt(val);
                 }
+            },
+            max100(val) {
+                if (val <= 100) {
+                    return val
+                } else {
+                    return 100
+                }
             }
         },
 
@@ -1562,11 +1569,11 @@
     }
 
     .user .umd img.green {
-        border-color: #0AB105;
+        border-color: #059F00;
     }
 
     .user .umd img.yellow {
-        border-color: #BACC01;
+        border-color: #A6B700;
     }
 
     .user .umd img.brown {