wzx 4 năm trước cách đây
mục cha
commit
95cb4b7af0
8 tập tin đã thay đổi với 581 bổ sung261 xóa
  1. 1 0
      src/Global.js
  2. 7 6
      src/Mock/index.js
  3. 2 2
      src/ble.js
  4. 234 26
      src/components/eiRank.vue
  5. 127 52
      src/views/2pkRank.vue
  6. 129 53
      src/views/3pkRank.vue
  7. 10 7
      src/views/Index.vue
  8. 71 115
      src/views/Rank.vue

+ 1 - 0
src/Global.js

@@ -19,6 +19,7 @@ runVersion = 'normal';
 
 // headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
 // headapi = 'http://127.0.0.1/';           //从本机获得数据源
+// headapi = 'http://192.168.0.22/';        //从本机获得数据源
 // headapi = 'http://192.168.0.62:9000/';   //从郑伟那里获得数据源
 // headapi = 'http://192.168.0.3:9000/';    //从测试服务器那里获得数据源 tmp mod
 

+ 7 - 6
src/Mock/index.js

@@ -422,7 +422,8 @@ if (t == 1) {
 
     // if (runVersion == 'test') {
     // let curheadapi = 'http://cal.beswell.com:85/DataTransfer/';
-    let curheadapi = 'http://127.0.0.1/';
+    // let curheadapi = 'http://127.0.0.1/';
+    let curheadapi = 'http://192.168.0.22/';
     // }
     // if (runVersion == 'outDoor') {
     //     curheadapi = 'http://192.168.0.105:9000/';
@@ -430,7 +431,7 @@ if (t == 1) {
 
     // 0: 下课 团课/私教/PK 的排名
     let LessonClass = 0;
-    let LessonDp = 0;
+    let LessonDp = 3;
     // 1:团课/私教
     // 2:竞技课2PK
     // 3:竞技课threepk
@@ -463,8 +464,8 @@ if (t == 1) {
             Mock.mock(Mockapi + 'UserListInfo', 'post', testStudent(15, 1)); //
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 0));
             Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(0, 0));
-            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(7, 2));
-            Mock.mock(Mockapi + 'ClassUserRank', 'post', testStudent(3, 2));
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(24, 2));
+            Mock.mock(Mockapi + 'ClassUserRank', 'post', testStudent(16, 2));
         } else if (LessonDp == 1) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 1));
             Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(0, 1));
@@ -474,8 +475,8 @@ if (t == 1) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
             Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
             // 下课排名
-            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(16, 2));
-            Mock.mock(Mockapi + 'ClassUserRank', 'post', testStudent(16, 2));
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(18, 2));
+            Mock.mock(Mockapi + 'ClassUserRank', 'post', testStudent(18, 2));
         } else if (LessonDp == 3) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 3));
             Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(0, 3));

+ 2 - 2
src/ble.js

@@ -90,7 +90,7 @@ export function listenerStateChange(){
                 console.log('onBluetoothAdapterStateChange -> startBluetoothDiscovery');
                 startBluetoothDiscovery();  // 开始搜索蓝牙
                 console.log('onBluetoothAdapterStateChange: 已上课,开始接收心率数据');
-                shortToast('接收心率数据中...');
+                // shortToast('接收心率数据中...');
             }
             else {
                 console.log('onBluetoothAdapterStateChange: 蓝牙未开启,无法接收心率数据(2)');
@@ -101,7 +101,7 @@ export function listenerStateChange(){
             setBleDiscovery(false);
             stopBluetoothDiscovery();  // 停止搜索蓝牙
             console.log('onBluetoothAdapterStateChange: 蓝牙未开启,无法接收心率数据(1)');
-            shortToast('蓝牙未开启,无法接收心率数据');
+            // shortToast('蓝牙未开启,无法接收心率数据');
         }
 	});
 }

+ 234 - 26
src/components/eiRank.vue

@@ -3,7 +3,7 @@
     <!-- 序号 -->
     <div class="sn">
       <ul>
-        <li v-for="(s,i) in students.EiSort.slice(0, maxShowNum)" v-show="Listate[i].state" :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
+        <li v-for="(s,i) in Rs.EiSort.slice(0, maxShowNum)" v-show="ctrlShow(i)" :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
           <div class="num">{{ i + 1 }}</div>
         </li>
       </ul>
@@ -15,7 +15,7 @@
           <img src="../assets/imgs/rank/titile_jhfs.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei0Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei0Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -23,7 +23,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -41,7 +41,7 @@
           <img src="../assets/imgs/rank/titile_dtrs.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei1Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei1Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -49,7 +49,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -67,7 +67,7 @@
           <img src="../assets/imgs/rank/titile_zfrs.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei2Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei2Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -75,7 +75,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -93,7 +93,7 @@
           <img src="../assets/imgs/rank/titile_tfxh.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei3Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei3Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -101,7 +101,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -119,7 +119,7 @@
           <img src="../assets/imgs/rank/titile_xfxl.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei4Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei4Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -127,7 +127,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -145,7 +145,7 @@
           <img src="../assets/imgs/rank/titile_fzdl.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.Ei5Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.Ei5Sort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -153,7 +153,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -171,7 +171,7 @@
           <img src="../assets/imgs/rank/titile_ydqd.png" alt="">
         </div>
         <div class="listBody">
-          <li v-for="(s,i) in students.EiSort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="Listate[i].state"
+          <li v-for="(s,i) in Rs.EiSort.slice(0, maxShowNum)" v-if="i <= maxShowNum-1" v-show="ctrlShow(i)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[i].state }]">
             <div>
               <span class="names">{{ s.Name }}</span>
@@ -179,7 +179,7 @@
               <span class="score" v-else>- -</span>
             </div>
           </li>
-          <li v-for="j in fakeCount" v-show="Listate[j+rsCount-1].state"
+          <li v-for="j in fakeCount" v-show="ctrlFakeShow(j)"
             :class="[{ 'box animate__animated animate__flipInX': Listate[j+rsCount-1].state }]">
             <div>
               <span class="names">&nbsp;</span>
@@ -199,22 +199,72 @@ export default {
     return {
       rsCount: 0,       //获取到的记录数      
       fakeCount: 0,     //记录不足,需要填充的记录数
-      maxShowNum: 8,    //页面最大显示记录数       
+      maxShowNumPerPage: 8, //单页最大显示记录数
+      maxShowNum: 8,    //最大显示记录数
+      pageCount: 0,     //总页数
+      curPage: 0,       //当前页码 从0开始
+      showTimePerPage: 30000,  //每页显示时长 毫秒
+      pageRpeatNum: 1, //每页重复显示次数
+      showTimeTotal: 0, //总显示时长 毫秒
+      pageTimer: null,
+      Rs: {
+        EiSort: [],
+        Ei0Sort: [],    //0-39% 激活放松
+        Ei1Sort: [],    //40-54% 动态热身
+        Ei2Sort: [],    //55-69% 脂肪燃烧
+        Ei3Sort: [],    //70-79% 糖分消耗
+        Ei4Sort: [],    //80-89% 心肺训练
+        Ei5Sort: [],    //90-100% 峰值锻炼
+      },
+      Listate: [
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},        
+      ],
     }
   },
   mounted() {
     // console.log("eiRank mounted");
-    // console.log(JSON.stringify(this.students.Ei1Sort));
+    // console.log(JSON.stringify(this.Rs.Ei1Sort));
+  },
+  beforeDestroy() {
+    console.log("eiRank beforeDestroy");
+    clearInterval(this.pageTimer);
   },
-  props: ['students', 'Listate'],
+  props: ['students'],
   watch: {
     'students': {
       handler(newName, oldName) {
         let that = this;
         if (!newName) {
           console.log('没有传入数据');
+          return;
         }
+
+        that.computeAcMap(newName.EiSort);
+
         let Studenlength = newName.EiSort.length;
+        if (Studenlength > that.Listate.length)
+          Studenlength = that.Listate.length;
+
+        that.pageCount = Math.ceil(Studenlength / that.maxShowNumPerPage);
+        if (that.pageCount == 1)
+          that.pageRpeatNum = 4;
+        else if (that.pageCount == 2)
+          that.pageRpeatNum = 3;
+        else if (that.pageCount >= 3)
+          that.pageRpeatNum = 2;          
+        that.showTimeTotal = that.pageCount * that.showTimePerPage * that.pageRpeatNum;
+
+        that.maxShowNum = that.pageCount * that.maxShowNumPerPage;
+        if (that.maxShowNum > that.Listate.length)
+          that.maxShowNum = that.Listate.length;
+
+        console.log("pageCount:" + that.pageCount);
+        console.log("showTimeTotal:" + that.showTimeTotal);
+        console.log("maxShowNum:" + that.maxShowNum);
+
+
         if (Studenlength < that.maxShowNum) {
           that.rsCount = Studenlength
           that.fakeCount = that.maxShowNum - that.rsCount;
@@ -230,6 +280,160 @@ export default {
       immediate: true
     }
   },
+  methods: {
+    ctrlShow(i) {
+      let cmpPage = Math.ceil((i+1) / this.maxShowNumPerPage) - 1;
+      return this.Listate[i].state && cmpPage == this.curPage;
+    },
+    ctrlFakeShow(i) {
+      return this.Listate[i+this.rsCount-1].state && this.curPage == this.pageCount - 1;
+    },
+    // cardPlay() {
+    //   let that = this;
+    //   // 重置一下状态
+    //   that.Listate.map(function (t) {
+    //     t.state = false;
+    //   })
+    //   let timeScope = 100;  //400
+    //   let timeLong;
+    //   that.timer = setTimeout(() => {   //设置延迟执行
+    //     let count = that.Listate.length;
+    //     for (let i = 0; i < count; i++) {
+    //       timeLong = parseInt(i * timeScope);
+    //       that.timer = setTimeout(() => {   //设置延迟执行
+    //         that.Listate[i].state = true;
+    //       }, timeLong)
+    //     }
+    //   }, 60);
+    // },
+    cardPlay(showPage) {
+      let that = this;
+      that.curPage = showPage;
+      let first = showPage * that.maxShowNumPerPage;
+      let last = first + that.maxShowNumPerPage;
+      console.log("[cardPlay] first: "+ first + " last: " + last);
+      if (last > that.Listate.length)
+        last = that.Listate.length;
+
+      // 重置一下状态
+      that.Listate.map(function (t) {
+        t.state = false;
+      })
+      let timeScope = 100;  //400
+      let timeLong;
+      let t = 0;
+      that.timer = setTimeout(() => {   //设置延迟执行
+        for (let i = first; i < last; i++) {
+          timeLong = parseInt(t * timeScope);
+          that.timer = setTimeout(() => {   //设置延迟执行
+            that.Listate[i].state = true;
+          }, timeLong)
+          t++;
+        }
+      }, 60);
+    },
+    pagePlay() {
+      let that = this;
+      let showPage = 0;
+
+      that.cardPlay(showPage);
+      showPage++;
+      
+      let showTimeTotal = that.showTimeTotal;
+      that.pageTimer = setInterval(() => {
+        showTimeTotal -= that.showTimePerPage;
+        if (showTimeTotal > 0) {
+          if (showPage >= that.pageCount) {
+            showPage = 0;
+          }
+          that.cardPlay(showPage);
+          showPage++;
+        }
+        else {
+          console.log("[pagePlay] clearInterval showTimeTotal:" + showTimeTotal);
+          clearInterval(that.pageTimer);
+          that.pageTimer = null;
+        }
+        
+
+        // if (showPage < that.pageCount) {
+        //   that.cardPlay(showPage);
+        //   showPage++;
+        // }
+        // else {
+        //   clearInterval(that.pageTimer);
+        //   that.pageTimer = null;
+        // }
+      }, that.showTimePerPage);
+    },
+    computeAcMap(Rs) {
+      let that = this;
+      let sumAcMap = 0;
+      let EiSort = [];
+      let Ei0Sort = [];    //0-39% 激活放松
+      let Ei1Sort = [];    //40-54% 动态热身
+      let Ei2Sort = [];    //55-69% 脂肪燃烧
+      let Ei3Sort = [];    //70-79% 糖分消耗
+      let Ei4Sort = [];    //80-89% 心肺训练
+      let Ei5Sort = [];    //90-100% 峰值锻炼
+
+      EiSort  = deepClone(Rs);
+      that.Rs.EiSort = EiSort.sort(function (a, b) {
+        return b.EI - a.EI;
+      });
+
+      that.Rs.EiSort.map(function (item, t) {
+        sumAcMap = 0;
+        for (var key in item.EiCalcBean.acMap) {
+          // console.log("key = " + key);
+          // console.log("value = " + item.EiCalcBean.acMap[key]);
+          sumAcMap += parseFloat(item.EiCalcBean.acMap[key]);
+        };
+        // console.log("sumAcMap = " + sumAcMap);
+
+        item.ei0Per = that.fmtEiPerValue(item.EiCalcBean.acMap[39] / sumAcMap);
+        item.ei1Per = that.fmtEiPerValue(item.EiCalcBean.acMap[54] / sumAcMap);
+        item.ei2Per = that.fmtEiPerValue(item.EiCalcBean.acMap[69] / sumAcMap);
+        item.ei3Per = that.fmtEiPerValue(item.EiCalcBean.acMap[79] / sumAcMap);
+        item.ei4Per = that.fmtEiPerValue(item.EiCalcBean.acMap[89] / sumAcMap);
+        item.ei5Per = that.fmtEiPerValue(item.EiCalcBean.acMap[100] / sumAcMap);
+
+        Ei0Sort.push(item);
+      });
+      // console.log(JSON.stringify(Ei0Sort));
+
+      Ei1Sort = deepClone(Ei0Sort);
+      Ei2Sort = deepClone(Ei0Sort);
+      Ei3Sort = deepClone(Ei0Sort);
+      Ei4Sort = deepClone(Ei0Sort);
+      Ei5Sort = deepClone(Ei0Sort);
+
+      that.Rs.Ei0Sort = Ei0Sort.sort(function (a, b) {
+        return b.ei0Per - a.ei0Per;
+      });
+      that.Rs.Ei1Sort = Ei1Sort.sort(function (a, b) {
+        return b.ei1Per - a.ei1Per;
+      });
+      that.Rs.Ei2Sort = Ei2Sort.sort(function (a, b) {
+        return b.ei2Per - a.ei2Per;
+      });
+      that.Rs.Ei3Sort = Ei3Sort.sort(function (a, b) {
+        return b.ei3Per - a.ei3Per;
+      });
+      that.Rs.Ei4Sort = Ei4Sort.sort(function (a, b) {
+        return b.ei4Per - a.ei4Per;
+      });
+      that.Rs.Ei5Sort = Ei5Sort.sort(function (a, b) {
+        return b.ei5Per - a.ei5Per;
+      });
+    },
+    fmtEiPerValue(val) {
+      let fmtval = (val*100).toFixed(0);
+      // console.log("val: " + val);
+      // console.log("fmtval: " + fmtval);
+      return fmtval
+    },
+  },
   filters: {
     fmtNum(val) {
       if (val == 0) {
@@ -361,24 +565,28 @@ $yellow: #FFEB50;
   ul {
 
     li {
-      background: url("");
+      // background: url("");
+      background: url("../assets/imgs/wait/litr.svg");
+      background-size: 100% 100%;
+      background-position: left center;
+      background-repeat: no-repeat;
       margin-top: 0rem;
       margin-bottom: 0.244rem;
 
       .num {
         position: relative;
-        left: -0.1rem;
-        width: 0.9rem;
+        left: 0rem;
+        width: 0.58rem;
         height: 0.65rem;
         float: left;
-        background: url("../assets/imgs/wait/litr.svg");
-        background-size: 100% 100%;
-        background-position: left center;
+        // background: url("../assets/imgs/wait/litr.svg");
+        // background-size: 100% 100%;
+        // background-position: left center;
         line-height: 0.65rem;
         font-size: 0.35rem;
         font-weight: bold;
-        text-align: left;
-        text-indent: 0.2rem;
+        text-align: center;
+        // text-indent: 0.2rem;
         font-style: normal;
         color: #fff;
         text-shadow: 0px 3px 6px rgba(0, 0, 0, 0.47);

+ 127 - 52
src/views/2pkRank.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  http://192.168.0.162:202/#/2pkrank-->
-  <div class="content">
+  <div class="content" :class="[{'bg1': pages == 1}, {'bg2': pages == 2}, {'bg3': pages == 3}]">
     <Headside></Headside>
     <div class="pages pageSum" v-show="pages == 1">
       <div class="pageTitle">
@@ -164,6 +164,13 @@
         <img src="../assets/imgs/rank/icons2.svg" alt="">
       </div>      
     </div>
+    <!-- 运动强度排名 -->
+    <div class="pageYdqdpm" v-show="pages == 3">
+      <div class="title">
+        <span>运动强度排名</span>
+      </div>
+      <eiRank :students="students" ref="eiRank"></eiRank>
+    </div>
     <div v-show="totalTime > 0" class="countdown">{{totalTime}}</div>
   </div>   
 </template>
@@ -171,6 +178,7 @@
 <script>
 import Headside from '@/components/Headside'
 import {ClassUserRank, AddPkInfo} from "@/api/getApiRes";
+import eiRank from '@/components/eiRank'
 
 let qs = require('qs');
 export default {
@@ -263,6 +271,7 @@ export default {
       students: {
         redUnite: [],
         blueUnite: [],
+        EiSort: [],
       },
       rankTimer: null,
 
@@ -274,16 +283,12 @@ export default {
       blueSumCle: 0,
       blueAveCle: 0,
 
+      page1ShowTime: 10000,   //页面1显示时长 毫秒
+      page2ShowTime: 30000,   //页面2显示时长 毫秒
+      page3ShowTime: 0,       //页面3显示时长 毫秒
       totalTime: '',
       Listate: [
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},
       ],
     }
   },
@@ -313,20 +318,50 @@ export default {
   methods: {
     init() {
       this.getClassUserRank();
-      this.cardPlay();
       this.pages = 1;
+      // this.cardPlay();
+      this.execWait(this.page1ShowTime, "that.enterPage(2)");
       // N秒后翻页
-      // this.rankTimer = setInterval(() => {
-      this.rankTimer = setTimeout(() => {
-        if (this.pages == 1) {
-          this.pages = 2;                   
-        }
-        else {
-          this.pages = 1;
+      // this.rankTimer = setTimeout(() => {
+      //   if (this.pages == 1) {
+      //     this.pages = 2;                   
+      //   }
+      //   else {
+      //     this.pages = 1;
+      //   }
+      //   this.cardPlay(); 
+      // }, 10000);
+    },
+    enterPage(page) {
+      this.pages = page;
+      if (page == 2) {
+        this.cardPlay();
+        this.execWait(this.page2ShowTime, "that.enterPage(3)");
+      }
+      else if (page == 3) {
+        this.$refs.eiRank.pagePlay();
+        this.page3ShowTime = this.$refs.eiRank.showTimeTotal;
+        // this.execWait(this.page3ShowTime);
+        this.execWait(this.page3ShowTime, "that.$router.push({path: '/'});");
+      }
+    },
+    //倒计时,并在计时结束后执行指定的语句
+    execWait(waitTime, execStr="") {
+      waitTime = parseInt(waitTime / 1000);
+      let that = this;
+      clearInterval(clock);
+      let clock = window.setInterval(() => {        
+        that.totalTime = waitTime;
+        if (parseInt(waitTime) <= 0) {
+          if (execStr != "") {
+            eval(execStr);
+          }
+          // 计时器回收
+          clearInterval(clock);
         }
-        this.cardPlay(); 
-      }, 10000);
-    },    
+        waitTime--;
+      }, 1000)
+    },
     getClassUserRank() {
       let that = this;
       let param = {
@@ -340,23 +375,24 @@ export default {
         if (json.Code == 0) {
           // console.log("ClassUserRank: " + JSON.stringify(json));
           that.UniteBreak(json.Rs, json.Dp.PlanId);
-
-          let totalTime = 40;
-          let Studenlength = 0;
-          if (json.Rs) {
-            Studenlength = json.Rs.length;
-          }
-          // 根据人数多少显示停留时间
-          if (Studenlength > 3) {
-            totalTime = 40
-          } else {
-            totalTime = 30
-          }
-          this.jumpWait(totalTime);
+          that.students.EiSort = deepClone(json.Rs);
+
+          // let totalTime = 40;
+          // let Studenlength = 0;
+          // if (json.Rs) {
+          //   Studenlength = json.Rs.length;
+          // }
+          // // 根据人数多少显示停留时间
+          // if (Studenlength > 3) {
+          //   totalTime = 40
+          // } else {
+          //   totalTime = 30
+          // }
+          // this.jumpWait(totalTime);
         } else {
           that.students.redUnite = [];
           that.students.blueUnite = [];
-          this.jumpWait(10);
+          // this.jumpWait(10);
           if (json.Code == '999') {
             // that.$router.push({path: '/'});
           } else {
@@ -495,22 +531,22 @@ export default {
         }
       })
     },
-    jumpWait(totalTime) {
-      // return;  //debug时可以屏蔽本句,不进行跳转
-      // 倒计时60秒自动关闭
-      let that = this;
-      clearInterval(clock);
-      let clock = window.setInterval(() => {        
-        that.totalTime = totalTime;
-        if (parseInt(totalTime) <= 0) {
-          // 前往等待页面
-          that.$router.push({path: '/'});
-          // 计时器回收
-          clearInterval(clock);
-        }
-        totalTime--;
-      }, 1000)
-    },
+    // jumpWait(totalTime) {
+    //   // return;  //debug时可以屏蔽本句,不进行跳转
+    //   // 倒计时60秒自动关闭
+    //   let that = this;
+    //   clearInterval(clock);
+    //   let clock = window.setInterval(() => {        
+    //     that.totalTime = totalTime;
+    //     if (parseInt(totalTime) <= 0) {
+    //       // 前往等待页面
+    //       that.$router.push({path: '/'});
+    //       // 计时器回收
+    //       clearInterval(clock);
+    //     }
+    //     totalTime--;
+    //   }, 1000)
+    // },
     cardPlay() {
       let that = this;
       // 重置一下状态
@@ -554,7 +590,7 @@ export default {
     },
   },
   components: {
-    Headside
+    Headside, eiRank
   }
 }
 </script>
@@ -575,9 +611,22 @@ export default {
   margin: 0 auto;
 }
 
-.content {
+.bg1 {
   background: url("../../src/assets/imgs/pkRank/bg.png");
   @include bg;
+}
+
+.bg2 {
+  background: url("../../src/assets/imgs/pkRank/bg.png");
+  @include bg;
+}
+
+.bg3 {
+  background: url("../../src/assets/imgs/rank/bg_ydqdpm.png");
+  @include bg;
+}
+
+.content {
 
   .pageTitle {
     background: url("../assets/imgs/pkRank/title.svg");
@@ -994,6 +1043,32 @@ export default {
       }
     }
   }
+  
+  .pageYdqdpm {
+    
+    .title {
+      // position: relative;
+      width: 3.6rem;
+      height: 0.75rem;
+      margin: 0 auto;
+      margin-top: 0.03rem;
+      bottom: 0.1rem;
+      background: url("../../src/assets/imgs/rank/titleBg2.png");
+      background-repeat: no-repeat;
+      background-position: top center;
+      background-size: 100% 100%;
+      line-height: 0.7rem;
+      span {
+        @include cube;
+        // position: relative;
+        bottom: 0.65rem;
+        color: #fff;
+        text-align: center;
+        font-size: 0.35rem;
+        font-weight: bold;
+      }
+    }
+  }
 }
 
 .icons {

+ 129 - 53
src/views/3pkRank.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  http://192.168.0.162:202/#/2pkrank-->
-  <div class="content">
+  <div class="content" :class="[{'bg1': pages == 1}, {'bg2': pages == 2}, {'bg3': pages == 3}]">
     <Headside></Headside>
     <div class="pages pageSum" v-show="pages == 1">
       <div class="pageTitle">
@@ -96,7 +96,6 @@
         </div>
       </div>
     </div>
-
     <div class="pages pageDetail" v-show="pages == 2">
       <div class="sumTitle">
         <div class="lt">
@@ -233,6 +232,13 @@
         <img src="../assets/imgs/rank/icons2.svg" alt="">
       </div>      
     </div>
+    <!-- 运动强度排名 -->
+    <div class="pageYdqdpm" v-show="pages == 3">
+      <div class="title">
+        <span>运动强度排名</span>
+      </div>
+      <eiRank :students="students" ref="eiRank"></eiRank>
+    </div>
     <div v-show="totalTime > 0" class="countdown">{{totalTime}}</div>
   </div>
 </template>
@@ -240,6 +246,7 @@
 <script>
 import Headside from '@/components/Headside'
 import {ClassUserRank, AddPkInfo} from "@/api/getApiRes";
+import eiRank from '@/components/eiRank'
 
 let qs = require('qs');
 export default {
@@ -255,6 +262,7 @@ export default {
         redUnite: [],
         blueUnite: [],
         yellowUnite: [],
+        EiSort: [],
       },
       red: {
         rank: 0,
@@ -396,16 +404,12 @@ export default {
       yellowSumCle: 0,
       yellowAveCle: 0,
 
+      page1ShowTime: 10000,   //页面1显示时长 毫秒
+      page2ShowTime: 30000,   //页面2显示时长 毫秒
+      page3ShowTime: 0,       //页面3显示时长 毫秒
       totalTime: '',
       Listate: [
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},
       ],
       teamRank: [
         {
@@ -470,19 +474,49 @@ export default {
   methods: {
     init() {
       this.getClassUserRank();
-      this.cardPlay();
       this.pages = 1;
+      // this.cardPlay();
+      this.execWait(this.page1ShowTime, "that.enterPage(2)");
       // N秒后翻页
-      // this.rankTimer = setInterval(() => {  
-      this.rankTimer = setTimeout(() => {  
-        if (this.pages == 1) {
-          this.pages = 2;                   
-        }
-        else {
-          this.pages = 1;
+      // this.rankTimer = setTimeout(() => {  
+      //   if (this.pages == 1) {
+      //     this.pages = 2;                   
+      //   }
+      //   else {
+      //     this.pages = 1;
+      //   }
+      //   this.cardPlay(); 
+      // }, 10000);
+    },
+    enterPage(page) {
+      this.pages = page;
+      if (page == 2) {
+        this.cardPlay();
+        this.execWait(this.page2ShowTime, "that.enterPage(3)");
+      }
+      else if (page == 3) {
+        this.$refs.eiRank.pagePlay();
+        this.page3ShowTime = this.$refs.eiRank.showTimeTotal;
+        // this.execWait(this.page3ShowTime);
+        this.execWait(this.page3ShowTime, "that.$router.push({path: '/'});");
+      }
+    },
+    //倒计时,并在计时结束后执行指定的语句
+    execWait(waitTime, execStr="") {
+      waitTime = parseInt(waitTime / 1000);
+      let that = this;
+      clearInterval(clock);
+      let clock = window.setInterval(() => {        
+        that.totalTime = waitTime;
+        if (parseInt(waitTime) <= 0) {
+          if (execStr != "") {
+            eval(execStr);
+          }
+          // 计时器回收
+          clearInterval(clock);
         }
-        this.cardPlay(); 
-      }, 10000);
+        waitTime--;
+      }, 1000)
     },
     getClassUserRank() {
       let that = this;
@@ -496,25 +530,27 @@ export default {
         that.students.blueUnite = [];
         that.students.yellowUnite = [];
         if (json.Code == 0) {
+          // console.log(JSON.stringify(json.Rs));
           that.UniteBreak(json.Rs, json.Dp.PlanId);
-
-          let totalTime = 40;
-          let Studenlength = 0;
-          if (json.Rs) {
-            Studenlength = json.Rs.length;
-          }
-          // 根据人数多少显示停留时间
-          if (Studenlength > 3) {
-            totalTime = 40
-          } else {
-            totalTime = 30;
-          }
-          this.jumpWait(totalTime);
+          that.students.EiSort = deepClone(json.Rs);
+
+          // let totalTime = 40;
+          // let Studenlength = 0;
+          // if (json.Rs) {
+          //   Studenlength = json.Rs.length;
+          // }
+          // // 根据人数多少显示停留时间
+          // if (Studenlength > 3) {
+          //   totalTime = 40
+          // } else {
+          //   totalTime = 30;
+          // }
+          // this.jumpWait(totalTime);
         } else {
           that.students.redUnite = [];
           that.students.blueUnite = [];
           that.students.yellowUnite = [];
-          this.jumpWait(10);
+          // this.jumpWait(10);
           if (json.Code == '999') {
             // that.$router.push({path: '/'});
           } else {
@@ -755,22 +791,22 @@ export default {
         }
       })
     },
-    jumpWait(totalTime) {
-      // return;
-      // 倒计时60秒自动关闭
-      let that = this;
-      clearInterval(clock);
-      let clock = window.setInterval(() => {
-        that.totalTime = totalTime;        
-        if (parseInt(totalTime) <= 0) {
-          // 前往等待页面
-          that.$router.push({path: '/'});
-          // 计时器回收
-          clearInterval(clock);
-        }
-        totalTime--;
-      }, 1000)
-    },
+    // jumpWait(totalTime) {
+    //   // return;
+    //   // 倒计时60秒自动关闭
+    //   let that = this;
+    //   clearInterval(clock);
+    //   let clock = window.setInterval(() => {
+    //     that.totalTime = totalTime;        
+    //     if (parseInt(totalTime) <= 0) {
+    //       // 前往等待页面
+    //       that.$router.push({path: '/'});
+    //       // 计时器回收
+    //       clearInterval(clock);
+    //     }
+    //     totalTime--;
+    //   }, 1000)
+    // },
     cardPlay() {
       let that = this;
       // 重置一下状态
@@ -815,7 +851,7 @@ export default {
     },
   },
   components: {
-    Headside
+    Headside, eiRank
   }
 }
 </script>
@@ -836,9 +872,22 @@ export default {
   margin: 0 auto;
 }
 
-.content {
+.bg1 {
+  background: url("../../src/assets/imgs/3pkRank/3pkBg.png");
+  @include bg;
+}
+
+.bg2 {
   background: url("../../src/assets/imgs/3pkRank/3pkBg2.png");
   @include bg;
+}
+
+.bg3 {
+  background: url("../../src/assets/imgs/rank/bg_ydqdpm.png");
+  @include bg;
+}
+
+.content {
 
   .pageTitle {
     background: url("../assets/imgs/pkRank/title.svg");
@@ -848,13 +897,14 @@ export default {
     @include cube;
     width: 2rem;
     height: 0.5rem;
+    margin-top: 0.2rem;
   }
 
   .pageSum {
     .pkResult {
       @include cube;
       width: 85%;
-      margin-top: 0.4rem;
+      margin-top: 0.6rem;
 
       .bgRed {
         background: url("../assets/imgs/pkRank/redCube.png");
@@ -1305,6 +1355,32 @@ export default {
       }
     }
   }
+  
+  .pageYdqdpm {
+    
+    .title {
+      // position: relative;
+      width: 3.6rem;
+      height: 0.75rem;
+      margin: 0 auto;
+      margin-top: 0.03rem;
+      bottom: 0.1rem;
+      background: url("../../src/assets/imgs/rank/titleBg2.png");
+      background-repeat: no-repeat;
+      background-position: top center;
+      background-size: 100% 100%;
+      line-height: 0.7rem;
+      span {
+        @include cube;
+        // position: relative;
+        bottom: 0.65rem;
+        color: #fff;
+        text-align: center;
+        font-size: 0.35rem;
+        font-weight: bold;
+      }
+    }
+  }
 }
 
 .icons {

+ 10 - 7
src/views/Index.vue

@@ -44,10 +44,12 @@ export default {
       ClentHeight: document.documentElement.clientHeight + 'px',
       testEqsnArr: [
         '939a94d3044f1078', // WZX 手机基座测试
-        '7962ad082220d997', // PAD 基座测试
+        '7962ad082220d997', // 公司PAD 基座测试
         '1277fcb4c81e29d2', // ?
-        'e1b37235010cf637', // PAD 正式版
-        'd104bd6ffec3d5ba', // 公司电视 正式版
+        // 'e1b37235010cf637', // 公司PAD
+        'd104bd6ffec3d5ba', // 公司电视盒(接TV)
+        'd76a54a795fb5774', // 公司电视盒2
+        '9ecb2cb6cb3bf318', // 公司电视盒2 基座测试
         '30:9C:23:0C:8B:1E', // 默认
       ]
     }
@@ -203,7 +205,8 @@ export default {
         return false
       }
       if (runVersion == 'localtest') {   //本机测试 TV端映射到本机进行测试
-        headapi = "http://127.0.0.1/";
+        // headapi = "http://127.0.0.1/";
+        headapi = 'http://192.168.0.22/';
         console.log("runVersion = " + runVersion + " headapi = " + headapi);
         that.shopName = "本机测试";
         that.$store.commit('setShopName', that.shopName);
@@ -280,7 +283,7 @@ export default {
       
         if (!ble.getBluetoothStatus()) {
           ble.turnOnBluetooth();
-        }        
+        }
         ble.listenerStateChange();      // 监听状态变化
         ble.listenerDeviceFound();      // 监听发现新设备
 
@@ -292,7 +295,7 @@ export default {
             if (!ble.getBleDiscovery() && ble.getBluetoothStatus()) {
               ble.startBluetoothDiscovery();  // 开始搜索蓝牙
               console.log('已上课,开始接收心率数据');
-              plus.nativeUI.toast("已上课,开始接收心率数据");
+              // plus.nativeUI.toast("已上课,开始接收心率数据");
             }            
             else if (ble.getBleDiscovery()) {   //接收心率数据时发生异常
               now = new Date().getTime();       //毫秒
@@ -312,7 +315,7 @@ export default {
             console.log('已下课,停止接收心率数据');
             ble.setBleDiscovery(false);
             ble.stopBluetoothDiscovery();  // 停止搜索蓝牙
-            plus.nativeUI.toast("已下课,停止接收心率数据");
+            // plus.nativeUI.toast("已下课,停止接收心率数据");
           }
         }, 1500);
       }

+ 71 - 115
src/views/Rank.vue

@@ -81,7 +81,7 @@
       <div class="title">
         <span>运动强度排名</span>
       </div>
-      <eiRank :students="students" :Listate="Listate"></eiRank>
+      <eiRank :students="students" ref="eiRank"></eiRank>
     </div>
     <div v-show="totalTime > 0" class="countdown">{{totalTime}}</div>
   </div>
@@ -105,27 +105,16 @@ export default {
         CkSort: [],
         CalSort: [],
         EiSort: [],
-        Ei0Sort: [],    //0-39% 激活放松
-        Ei1Sort: [],    //40-54% 动态热身
-        Ei2Sort: [],    //55-69% 脂肪燃烧
-        Ei3Sort: [],    //70-79% 糖分消耗
-        Ei4Sort: [],    //80-89% 心肺训练
-        Ei5Sort: [],    //90-100% 峰值锻炼
       },
       rsCount: 0,       //获取到的记录数
       fakeCount: 0,     //记录不足,需要填充的记录数
       maxShowNum: 8,    //页面最大显示记录数
       rankTimer: null,
+      page1ShowTime: 30000,   //页面1显示时长 毫秒
+      page2ShowTime: 0,       //页面2显示时长 毫秒
       totalTime: '',
       Listate: [
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
-        {state: false},
+        {state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},{state: false},
       ],
     }
   },
@@ -147,7 +136,7 @@ export default {
         clearInterval(this.autoJump);
         clearInterval(this.rankTimer);
       }
-    }
+    },
   },
   beforeDestroy() {
     clearInterval(this.rankTimer);
@@ -156,18 +145,46 @@ export default {
   methods: {
     init() {
       this.getClassUserRank();
-      this.cardPlay();
       this.pages = 1;
+      this.cardPlay();
+      this.execWait(this.page1ShowTime, "that.enterPage(2)");
       // N秒后翻页
-      this.rankTimer = setTimeout(() => {
-        if (this.pages == 1) {
-          this.pages = 2;                   
-        }
-        else {
-          this.pages = 1;
+      // this.rankTimer = setTimeout(() => {
+      //   if (this.pages == 1) {
+      //     this.pages = 2;
+      //     this.$refs.eiRank.pagePlay();
+      //   }
+      //   else {
+      //     this.pages = 1;
+      //     this.cardPlay();
+      //   }
+      // }, this.page1ShowTime);
+    },
+    enterPage(page) {
+      this.pages = page;
+      if (page == 2) {
+        this.$refs.eiRank.pagePlay();
+        this.page2ShowTime = this.$refs.eiRank.showTimeTotal;
+        // this.execWait(this.page3ShowTime);
+        this.execWait(this.page2ShowTime, "that.$router.push({path: '/'});");
+      }
+    },
+    //倒计时,并在计时结束后执行指定的语句
+    execWait(waitTime, execStr="") {
+      waitTime = parseInt(waitTime / 1000);
+      let that = this;
+      clearInterval(clock);
+      let clock = window.setInterval(() => {        
+        that.totalTime = waitTime;
+        if (parseInt(waitTime) <= 0) {
+          if (execStr != "") {
+            eval(execStr);
+          }
+          // 计时器回收
+          clearInterval(clock);
         }
-        this.cardPlay(); 
-      }, 30000);
+        waitTime--;
+      }, 1000)
     },
     getClassUserRank() {
       let that = this;
@@ -179,23 +196,9 @@ export default {
         let json = res;
         // console.log(json);
         if (json.Code == 0) {
-          let totalTime = 120;
-          let Studenlength = 0;
-          if (json.Rs) {
-            Studenlength = json.Rs.length;
-          }
-          // 根据人数多少显示停留时间
-          if (Studenlength > 3) {
-            totalTime = 135
-          } else {
-            totalTime = 125
-          }
-          this.jumpWait(totalTime);
-
           let CkSort = json.Rs;
           let CalSort = deepClone(json.Rs);
           let EiSort = deepClone(json.Rs);
-          this.computeAcMap(EiSort);
           let Rs = json.Rs;
           if (Rs != '') {
             // 排序
@@ -211,6 +214,20 @@ export default {
               return b.EI - a.EI;
             });
           }
+
+          // let totalTime = 120;
+          // let Studenlength = 0;
+          // if (json.Rs) {
+          //   Studenlength = json.Rs.length;
+          // }
+          // // 根据人数多少显示停留时间
+          // if (Studenlength > 3) {
+          //   totalTime = 135
+          // } else {
+          //   totalTime = 125
+          // }
+          // this.jumpWait(totalTime);
+
         } else {
           this.students.CkSort = [];
           this.students.CalSort = [];
@@ -224,82 +241,21 @@ export default {
         }
       })
     },
-    computeAcMap(Rs) {
-      let that = this;
-      let sumAcMap = 0;
-      let Ei0Sort = [];    //0-39% 激活放松
-      let Ei1Sort = [];    //40-54% 动态热身
-      let Ei2Sort = [];    //55-69% 脂肪燃烧
-      let Ei3Sort = [];    //70-79% 糖分消耗
-      let Ei4Sort = [];    //80-89% 心肺训练
-      let Ei5Sort = [];    //90-100% 峰值锻炼
-
-      Rs.map(function (item, t) {
-        sumAcMap = 0;
-        for (var key in item.EiCalcBean.acMap) {
-          // console.log("key = " + key);
-          // console.log("value = " + item.EiCalcBean.acMap[key]);
-          sumAcMap += parseFloat(item.EiCalcBean.acMap[key]);
-        };
-        // console.log("sumAcMap = " + sumAcMap);
-
-        item.ei0Per = that.fmtEiPerValue(item.EiCalcBean.acMap[39] / sumAcMap);
-        item.ei1Per = that.fmtEiPerValue(item.EiCalcBean.acMap[54] / sumAcMap);
-        item.ei2Per = that.fmtEiPerValue(item.EiCalcBean.acMap[69] / sumAcMap);
-        item.ei3Per = that.fmtEiPerValue(item.EiCalcBean.acMap[79] / sumAcMap);
-        item.ei4Per = that.fmtEiPerValue(item.EiCalcBean.acMap[89] / sumAcMap);
-        item.ei5Per = that.fmtEiPerValue(item.EiCalcBean.acMap[100] / sumAcMap);
-
-        Ei0Sort.push(item);
-      });
-      // console.log(JSON.stringify(Ei0Sort));
-
-      Ei1Sort = deepClone(Ei0Sort);
-      Ei2Sort = deepClone(Ei0Sort);
-      Ei3Sort = deepClone(Ei0Sort);
-      Ei4Sort = deepClone(Ei0Sort);
-      Ei5Sort = deepClone(Ei0Sort);
-
-      that.students.Ei0Sort = Ei0Sort.sort(function (a, b) {
-        return b.ei0Per - a.ei0Per;
-      });
-      that.students.Ei1Sort = Ei1Sort.sort(function (a, b) {
-        return b.ei1Per - a.ei1Per;
-      });
-      that.students.Ei2Sort = Ei2Sort.sort(function (a, b) {
-        return b.ei2Per - a.ei2Per;
-      });
-      that.students.Ei3Sort = Ei3Sort.sort(function (a, b) {
-        return b.ei3Per - a.ei3Per;
-      });
-      that.students.Ei4Sort = Ei4Sort.sort(function (a, b) {
-        return b.ei4Per - a.ei4Per;
-      });
-      that.students.Ei5Sort = Ei5Sort.sort(function (a, b) {
-        return b.ei5Per - a.ei5Per;
-      });
-    },
-    fmtEiPerValue(val) {
-      let fmtval = (val*100).toFixed(0);
-      // console.log("val: " + val);
-      // console.log("fmtval: " + fmtval);
-      return fmtval
-    },
-    jumpWait(totalTime) {      
-      // 倒计时60秒自动关闭
-      let that = this;
-      clearInterval(clock);
-      let clock = window.setInterval(() => {        
-        that.totalTime = totalTime;
-        if (parseInt(totalTime) <= 0) {
-          // 前往等待页面
-          that.$router.push({path: '/'});
-          // 计时器回收
-          clearInterval(clock);
-        }
-        totalTime--;
-      }, 1000)
-    },
+    // jumpWait(totalTime) {      
+    //   // 倒计时60秒自动关闭
+    //   let that = this;
+    //   clearInterval(clock);
+    //   let clock = window.setInterval(() => {        
+    //     that.totalTime = totalTime;
+    //     if (parseInt(totalTime) <= 0) {
+    //       // 前往等待页面
+    //       that.$router.push({path: '/'});
+    //       // 计时器回收
+    //       clearInterval(clock);
+    //     }
+    //     totalTime--;
+    //   }, 1000)
+    // },
     cardPlay() {
       let that = this;
       // 重置一下状态