wzx пре 4 година
родитељ
комит
b557be415c
6 измењених фајлова са 63 додато и 44 уклоњено
  1. 11 11
      src/Mock/index.js
  2. 2 2
      src/components/Headside.vue
  3. 14 4
      src/views/Index.vue
  4. 8 8
      src/views/Wait.vue
  5. 9 5
      src/views/pk.vue
  6. 19 14
      src/views/threepk.vue

+ 11 - 11
src/Mock/index.js

@@ -129,9 +129,9 @@ let testStudent = function (num, team, mustbeTeamOne) {
             Age: 13,
             AvgHr: 0,
             BeginTime: 1608188579,
-            Ck: "@float(1,99,0,1)",
-            Cle: "@float(1,9999,0,1)",
-            EI: "@float(1,99999,0,1)",
+            Ck: "@float(1,25,0,1)",
+            Cle: "@float(1,1500,0,1)",
+            EI: "@float(1,1000,0,1)",
             DuId: 119,
             EndTime: 0,
             GroupNo: group,
@@ -161,7 +161,7 @@ let testStudent = function (num, team, mustbeTeamOne) {
             // ActivePercent: "@integer(1, 200)",
             ActivePercent: "@integer(10, 100)",
             bmrMSjRmrcb: 66.00000000000001,
-            FormatCk: "@integer(1, 999)",
+            FormatCk: "@integer(1, 50)",
             isAlive: true,
             isFinish: false,
             isOver: false,
@@ -169,7 +169,7 @@ let testStudent = function (num, team, mustbeTeamOne) {
             lastPushDataTime: 1608188947175,
             lastUpdateTime: 1608188945184,
             queuePushData: [],
-            RealHr: "@integer(60, 200)",
+            RealHr: "@integer(60, 180)",
             // RealHr: 0,
             vo2Max: "@float(1,9999,0,1)"
         })
@@ -396,9 +396,9 @@ if (t == 1) {
     Mock.mock('/api/testTable', 'post', testTable());
     Mock.mock('/api/getUserList', 'post', getUserList());
 
-    // let Mockapi = 'http://192.168.0.10:8080/';
+    let Mockapi = 'http://192.168.0.3:9000/';
     // let Mockapi = 'http://192.168.0.62:9000/';
-    let Mockapi = 'http://221.214.111.254:9000/';
+    // let Mockapi = 'http://221.214.111.254:9000/';
 
     // if (runVersion == 'test') {
     let curheadapi = 'http://cal.beswell.com:85/DataTransfer/';
@@ -408,7 +408,7 @@ if (t == 1) {
     // }
 
     // 0: 下课 团课/私教/PK 的排名
-    let LessonClass = 0;
+    let LessonClass = 2;
     let LessonDp = 2;
     // 1:团课/私教
     // 2:竞技课2PK
@@ -426,7 +426,7 @@ if (t == 1) {
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
         Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
         Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(9, 1,));
-        Mock.mock(Mockapi + 'UserListInfo', 'post', testStudent(5, 1,));
+        Mock.mock(Mockapi + 'UserListInfo', 'post', testStudent(12, 1,));
     } else if (LessonClass == 3) {
         // 上3队PK课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 3));
@@ -476,10 +476,10 @@ if (t == 1) {
     Mock.mock(Mockapi + 'UserRankingQuery', 'post', UserRankingQuery(8));
     // 新同学 0 999
     Mock.mock(curheadapi + 'getNewUser', 'post', getNewUser(999, 2));
-    Mock.mock(Mockapi + 'getNewUser', 'post', getNewUser(0, 12));
+    Mock.mock(Mockapi + 'getNewUser', 'post', getNewUser(999, 12));
     // 彩蛋 0 999
     Mock.mock(curheadapi + 'getRecordBreak', 'post', getRecordBreak(999));
-    Mock.mock(Mockapi + 'getRecordBreak', 'post', getRecordBreak(0));
+    Mock.mock(Mockapi + 'getRecordBreak', 'post', getRecordBreak(999));
 }
 
 export default Mock;

+ 2 - 2
src/components/Headside.vue

@@ -185,7 +185,7 @@ export default {
 
   span {
     float: right;
-    font-size: 0.2rem;
+    font-size: 0.28rem;
     line-height: 0.4rem;
     margin-right: 0.2rem;
     margin-top: 0.2rem;
@@ -196,7 +196,7 @@ export default {
     margin: 0;
     margin-top: 0.2rem;
     text-align: right;
-    font-size: 0.2rem;
+    font-size: 0.28rem;
     line-height: 0.4rem;
   }
 }

+ 14 - 4
src/views/Index.vue

@@ -43,7 +43,6 @@ export default {
     //localStorage.eqSn = '30:9C:23:0C:8B:1E';
     //localStorage.version = '2.0';
     this.getCurVersion();
-
   },
   methods: {
     // 获取当前版本号
@@ -116,7 +115,17 @@ export default {
                 console.log('户外版禁用自动升级');
                 return false
               } else {
-                that.checkUpdate();
+                // that.checkUpdate();
+
+                // 每10分钟检测一下升级信息
+                setInterval(() => {
+                  // console.log("$route.path: " + this.$route.path);
+                  // console.log("$route.name: " + this.$route.name);
+                  if (this.$route.name == "Wait") {
+                    console.log("===> checkUpdate");
+                    that.checkUpdate();
+                  }
+                }, 600000);
               }
 
             }
@@ -143,6 +152,7 @@ export default {
           // plus.nativeUI.toast("当前安装版本: " + localStorage.version);
           if (localStorage.version != json.VueFramework.Version) {
             // 正式
+            plus.nativeUI.toast("发现新版本 " + json.VueFramework.Version + ",准备升级...");
             let url = DownloadVueFramework();
             this.downWgt(url);
           }
@@ -162,9 +172,9 @@ export default {
           that.installWgt(d.filename); // 安装wgt包
         } else {
           console.log("下载wgt失败!");
-          // plus.nativeUI.toast("下载wgt失败!");
+          plus.nativeUI.toast("下载升级包失败!");
         }
-        plus.nativeUI.closeWaiting();
+        // plus.nativeUI.closeWaiting();
       }).start();
     },
     installWgt(path) {

+ 8 - 8
src/views/Wait.vue

@@ -18,8 +18,8 @@
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" :src="s.Head" alt="" v-if="s.Head">
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" v-bind:src="require('../static/img/people/flyhead.png')" alt="学生头像" v-if="!s.Head">
             <span>{{ s.UserName }}</span>
-            <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt="">
-            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-else-if="s.IsBreaking == 1" alt="">
+            <!-- <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt=""> -->
+            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-if="s.IsBreaking == 1" alt="">
             <em>{{ s.Values }}</em>
           </li>
           <li v-if="calcWeekRank == ''">
@@ -81,8 +81,8 @@
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" :src="s.Head" alt="" v-if="s.Head">
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" v-bind:src="require('../static/img/people/flyhead.png')" alt="学生头像" v-if="!s.Head">
             <span>{{ s.UserName }}</span>
-            <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt="">
-            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-else-if="s.IsBreaking == 1" alt="">
+            <!-- <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt=""> -->
+            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-if="s.IsBreaking == 1" alt="">
             <em>{{ s.Values }}</em>
           </li>
           <li v-if="CKWeekRank == ''">
@@ -108,8 +108,8 @@
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" :src="s.Head" alt="" v-if="s.Head">
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" v-bind:src="require('../static/img/people/flyhead.png')" alt="学生头像" v-if="!s.Head">
             <span>{{ s.UserName }}</span>
-            <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="t == 0" alt="">
-            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-else-if="s.IsBreaking == 1" alt="">
+            <!-- <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="t == 0" alt=""> -->
+            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-if="s.IsBreaking == 1" alt="">
             <em>{{ s.Values }}</em>
           </li>
           <li v-if="calcMouthRank == ''">
@@ -163,8 +163,8 @@
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" :src="s.Head" alt="" v-if="s.Head">
             <img :class="[{'headImg':true},{'girl':s.Sex == 2}]" v-bind:src="require('../static/img/people/flyhead.png')" alt="学生头像" v-if="!s.Head">
             <span>{{ s.UserName }}</span>
-            <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt="">
-            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-else-if="s.IsBreaking == 1" alt="">
+            <!-- <img class="crIcon" v-bind:src="require('../assets/imgs/rank/cr.png')" v-if="i == 0" alt=""> -->
+            <img class="pbIcon" src="../assets/imgs/rank/pb.png" v-if="s.IsBreaking == 1" alt="">
             <em>{{ s.Values }}</em>
           </li>
           <li v-if="CKMonthRank == ''">

+ 9 - 5
src/views/pk.vue

@@ -334,7 +334,7 @@ export default {
 
       let sumMax = 0;
       if (Rs.redUnite) {
-        sumMax = (Rs.redUnite.length + Rs.blueUnite.length) * 1000;
+        sumMax = (Rs.redUnite.length + Rs.blueUnite.length) * 20;
       }
 
       // 当为0时均分
@@ -343,8 +343,10 @@ export default {
         that.RedProgress = 25;
       } else {
         // 限制最大
-        that.Redflag = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
-        that.RedProgress = that.Redflag + 18;
+        let redPercent = parseInt((redFmtSum / sumMax) * 100);
+        redPercent = redPercent > 100 ? 100 : redPercent;
+        that.Redflag = redPercent * 0.70;
+        that.RedProgress = that.Redflag + 18.2;
         if (that.RedProgress > 90) {
           that.RedProgress = 90
         }
@@ -355,8 +357,10 @@ export default {
         that.BlueProgress = 25;
       } else {
         // 限制最大
-        that.BlueFlag = parseInt((blueFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((blueFmtSum / sumMax) * 100);
-        that.BlueProgress = that.BlueFlag + 18;
+        let bluePercent = parseInt((blueFmtSum / sumMax) * 100);
+        bluePercent = bluePercent > 100 ? 100 : bluePercent;
+        that.BlueFlag = bluePercent * 0.70;
+        that.BlueProgress = that.BlueFlag + 18.2;
         if (that.BlueProgress > 90) {
           that.BlueProgress = 90
         }

+ 19 - 14
src/views/threepk.vue

@@ -367,7 +367,7 @@ export default {
 
       let sumMax = 0;
       if (Rs.redUnite) {
-        sumMax = (Rs.redUnite.length + Rs.blueUnite.length + Rs.yellowUnite.length) * 1000;
+        sumMax = (Rs.redUnite.length + Rs.blueUnite.length + Rs.yellowUnite.length) * 20;
       }
 
       // 当为0时均分
@@ -376,14 +376,16 @@ export default {
         that.RedProgress = 28;
       } else {
         // 限制最大
-        that.Redflag = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
+        let redPercent = parseInt((redFmtSum / sumMax) * 100);
+        redPercent = redPercent > 100 ? 100 : redPercent;
+        that.Redflag = redPercent * 0.70;
         that.RedProgress = that.Redflag + 28
-        if (that.RedProgress > 75) {
-          that.RedProgress = 75
-        }
-        if (that.Redflag > 75) {
-          that.Redflag = 75
+        if (that.RedProgress > 100) {
+          that.RedProgress = 100
         }
+        // if (that.Redflag > 75) {
+        //   that.Redflag = 75
+        // }
       }
 
       if (blueFmtSum == 0) {
@@ -391,12 +393,13 @@ export default {
         that.BlueProgress = 28;
       } else {
         // 限制最大
-        that.BlueFlag = parseInt((blueFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((blueFmtSum / sumMax) * 100);
+        let bluePercent = parseInt((blueFmtSum / sumMax) * 100);
+        bluePercent = bluePercent > 100 ? 100 : bluePercent;
+        that.BlueFlag = bluePercent * 0.70;
         that.BlueProgress = that.BlueFlag + 28
-        if (that.BlueProgress > 75) {
-          that.BlueProgress = 75
+        if (that.BlueProgress > 100) {
+          that.BlueProgress = 100
         }
-
       }
 
       if (yellowFmtSum == 0) {
@@ -404,10 +407,12 @@ export default {
         that.yellowProgress = 28;
       } else {
         // 限制最大
-        that.yellowFlag = parseInt((yellowFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((blueFmtSum / sumMax) * 100);
+        let yellowPercent = parseInt((yellowFmtSum / sumMax) * 100);
+        yellowPercent = yellowPercent > 100 ? 100 : yellowPercent;
+        that.yellowFlag = yellowPercent * 0.715;
         that.yellowProgress = that.yellowFlag + 28
-        if (that.yellowProgress > 75) {
-          that.yellowProgress = 75
+        if (that.yellowProgress > 100) {
+          that.yellowProgress = 100
         }
       }
     },