Changpeng Duan 4 роки тому
батько
коміт
8c166732e2

+ 6 - 6
v2tv/src/Mock/index.js

@@ -120,7 +120,7 @@ let getUserList = function () {
 let testStudent = function (num, team, mustbeTeamOne) {
     let item = [];
     let group = team == 2 ? "@integer(1, 2)" : "@integer(1, 3)";
-    // group = 1;
+    group = 1;
     if (mustbeTeamOne) {
         group = mustbeTeamOne;
     }
@@ -168,7 +168,7 @@ let testStudent = function (num, team, mustbeTeamOne) {
             lastPushDataTime: 1608188947175,
             lastUpdateTime: 1608188945184,
             queuePushData: [],
-            RealHr: "@integer(1, 200)",
+            RealHr: "@integer(60, 200)",
             // RealHr: 0,
             vo2Max: "@float(1,9999,0,1)"
         })
@@ -401,8 +401,8 @@ if (t == 1) {
     // }
 
     // 0: 下课 团课/私教/PK 的排名
-    let LessonClass = 0;
-    let LessonDp = 0;
+    let LessonClass = 2;
+    let LessonDp = 2;
     // 1:团课/私教
     // 2:竞技课2PK
     // 3:竞技课threepk
@@ -412,13 +412,13 @@ if (t == 1) {
         // 上团课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
         Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(3, 1));//true
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(1, 1));//true
         Mock.mock(Mockapi + 'UserListInfo', 'post', testStudent(1, 1)); //
     } else if (LessonClass == 2) {
         // 上2队PK课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
         Mock.mock(Mockapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(8, 1,));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(1, 1,));
         Mock.mock(Mockapi + 'UserListInfo', 'post', testStudent(8, 1,));
     } else if (LessonClass == 3) {
         // 上3队PK课

+ 2 - 2
v2tv/src/components/levelIcon.vue

@@ -50,7 +50,7 @@ export default {
 
 .levelIconOutDoor {
   position: absolute;
-  bottom: 0.2rem;
+  bottom: 0;
   left: 0;
   right: 0;
   padding-bottom: 5px;
@@ -58,7 +58,7 @@ export default {
 
 .levelIconTV {
   position: absolute;
-  bottom: 0.2rem;
+  bottom: 0;
   left: 0;
   right: 0;
   padding-bottom: 5px;

+ 9 - 4
v2tv/src/components/pkstudent.vue

@@ -606,7 +606,7 @@ ul {
 
 .five {
   width: 6.3rem;
-  height: 2.8rem;
+  height: 2.7rem;
   margin-top: 0.3rem;
 
   .lt span {
@@ -742,8 +742,8 @@ ul {
 
 .twentyFive {
   width: 3.75rem;
-  height: 1.8rem;
-  margin-top: 0.07rem;
+  height: 1.7rem;
+  margin-top: 0.12rem;
 
   .lt span {
     margin-top: 3%;
@@ -764,7 +764,7 @@ ul {
   }
 
   .userinfo {
-    height: 1rem;
+    height: 0.9rem;
   }
 
   .userinfo .head {
@@ -772,6 +772,7 @@ ul {
 
     img {
       width: 0.9rem;
+      border-width: 2px !important;
     }
 
     .names {
@@ -816,6 +817,10 @@ ul {
       font-size: 0.2rem;
     }
   }
+
+  /deep/ .powerContainer img {
+    width: 0.25rem;
+  }
 }
 
 .fakePart {

+ 113 - 22
v2tv/src/components/student.vue

@@ -131,10 +131,10 @@ export default {
         if (sum >= 5 && sum < 9) {
           that.studentsFake = 9 - sum;
         }
-        if (sum >= 10 && sum < 12) {
-          that.studentsFake = 12 - sum;
+        if (sum >= 9 && sum < 12) {
+          that.studentsFake = 16 - sum;
         }
-        if (sum >= 13 && sum < 16) {
+        if (sum >= 12 && sum < 16) {
           that.studentsFake = 16 - sum;
         }
         if (sum >= 16 && sum < 26) {
@@ -543,6 +543,18 @@ ul {
   height: 5.1rem;
   margin-top: 2rem;
 
+  .lt {
+    span {
+      margin-top: 0.8rem;
+    }
+  }
+
+  .rt {
+    span {
+      margin-top: 0.1rem;
+    }
+  }
+
 }
 
 .two {
@@ -550,12 +562,20 @@ ul {
   height: 4.2rem;
   margin-top: 2.5rem;
 
+  .lt span {
+    margin-top: 0.7rem;
+  }
+
   .lt span em {
     font-size: 1.2rem;
   }
 
+  .userinfo {
+    height: 3rem;
+  }
+
   .userinfo .head {
-    height: 2.6rem;
+    height: 2.7rem;
 
     img {
       width: 2.2rem;
@@ -569,6 +589,7 @@ ul {
   .rt span {
     font-size: 1rem;
     padding-right: 5%;
+    margin-top: 0.2rem;
 
     img {
       width: 0.4rem;
@@ -662,12 +683,12 @@ ul {
 
     em {
       font-size: 0.7rem;
-      font-weight: 600;
+      font-weight: bold;
     }
   }
 
   .userinfo {
-    height: 1.9rem;
+    height: 1.8rem;
   }
 
   .userinfo .head {
@@ -675,6 +696,7 @@ ul {
 
     img {
       width: 1.5rem;
+      border-width: 2px !important;
     }
 
     .names {
@@ -698,16 +720,29 @@ ul {
   }
 
   .userSport {
-    line-height: 0.15rem;
+    line-height: 0.5rem;
 
-    img {
-      width: 0.3rem;
+    em {
+      line-height: 1.1rem;
+      font-size: 0.25rem;
     }
 
-    em {
-      font-size: 0.3rem;
+    img {
+      width: 0.25rem;
     }
   }
+
+  .IsPrivate {
+    bottom: 1.7rem !important;
+    right: -0.01rem !important;
+    width: 0.4rem !important;
+  }
+
+  .names {
+    width: 1.2rem !important;
+    font-size: 0.2rem !important;
+    bottom: 0.3rem !important;
+  }
 }
 
 
@@ -722,11 +757,12 @@ ul {
 
     em {
       font-size: 0.55rem;
+      letter-spacing: 0.01rem;
     }
 
     s {
       font-size: 0.25rem;
-      margin-top: -0.1rem;
+      margin-top: -0.05rem;
     }
   }
 
@@ -742,7 +778,8 @@ ul {
     height: 1.4rem;
 
     img {
-      width: 1.3rem;
+      width: 1.1rem !important;
+      border-width: 2px !important;
     }
 
     .names {
@@ -765,6 +802,10 @@ ul {
     font-size: 0.55rem;
     padding-right: 5%;
 
+    em {
+      letter-spacing: 0.01rem;
+    }
+
     img {
       width: 0.25rem;
       margin-right: 5%;
@@ -776,22 +817,38 @@ ul {
   }
 
   .userSport {
-    line-height: 0.01rem;
+    line-height: 0.1rem;
 
     img {
-      width: 0.2rem;
+      width: 0.25rem;
     }
 
     em {
+      line-height: 0.7rem;
       font-size: 0.2rem;
     }
   }
+
+  .IsPrivate {
+    bottom: 2.65rem;
+    right: 0.05rem;
+  }
+
+  .names {
+    width: 1rem !important;
+    font-size: 0.15rem !important;
+    bottom: 0.2rem !important;
+  }
+
+  /deep/ .powerContainer img {
+    width: 0.25rem !important;
+  }
 }
 
 .twentyFive {
   width: 3.75rem;
-  height: 1.85rem;
-  margin-top: 0.03rem;
+  height: 1.77rem;
+  margin-top: 0.1rem;
 
   .lt span {
     margin-top: 3%;
@@ -799,6 +856,7 @@ ul {
 
     em {
       font-size: 0.5rem;
+      letter-spacing: 0.01rem;
     }
 
     s {
@@ -812,14 +870,15 @@ ul {
   }
 
   .userinfo {
-    height: 1rem;
+    height: 0.9rem;
   }
 
   .userinfo .head {
     height: 1.1rem;
 
     img {
-      width: 0.9rem;
+      width: 0.8rem;
+      border-width: 2px !important;
     }
 
     .names {
@@ -836,12 +895,14 @@ ul {
       width: 0.25rem;
       bottom: 1.1rem;
     }
+
   }
 
   .rt span {
     line-height: 0.8rem;
     font-size: 0.45rem;
     padding-right: 5%;
+    margin-top: 0;
 
     img {
       width: 0.2rem;
@@ -849,21 +910,51 @@ ul {
     }
 
     .heartJump {
-      margin-top: 10%;
+      margin-top: 7%;
+    }
+
+    em {
+      letter-spacing: 0.01rem;
     }
   }
 
   .userSport {
-    line-height: 0.01rem;
+    line-height: 0.1rem;
 
     img {
       width: 0.2rem;
+      margin-right: 0.1rem;
     }
 
     em {
-      font-size: 0.2rem;
+      line-height: 0.8rem;
+      font-size: 0.15rem;
+
     }
   }
+
+  .IsPrivate {
+    bottom: 2.65rem;
+    right: 0.05rem;
+  }
+
+  .names {
+    width: 0.75rem !important;
+    font-size: 0.15rem !important;
+    bottom: 0.2rem !important;
+  }
+
+  /deep/ .powerContainer {
+    height: 0.3rem;
+  }
+
+  /deep/ .powerContainer img {
+    position: relative;
+    top: 0.1rem !important;
+    right: 0.1rem;
+    width: 0.15rem !important;
+    float: right;
+  }
 }
 
 .fakePart {

+ 29 - 17
v2tv/src/views/Rank.vue

@@ -33,9 +33,9 @@
               </div>
               <span class="names">{{ s.Name }}</span>
               <span class="glory">
-                <img src="../assets/imgs/rank/cr.png" alt="">
-                <img src="../assets/imgs/rank/mr.png" alt="">
-                <img src="../assets/imgs/rank/pb.png" alt="">
+                <img src="../assets/imgs/rank/cr.png" v-if="i == 0" alt="">
+                <img src="../assets/imgs/rank/mr.png" v-if="i == 1" alt="">
+                <img src="../assets/imgs/rank/pb.png" v-if="i == 2" alt="">
               </span>
               <span class="score">
                  {{ s.Cle|fmtInt }}
@@ -63,9 +63,9 @@
               </div>
               <span class="names">{{ s.Name }}</span>
               <span class="glory">
-                <img src="../assets/imgs/rank/cr.png" alt="">
-                <img src="../assets/imgs/rank/mr.png" alt="">
-                <img src="../assets/imgs/rank/pb.png" alt="">
+               <img src="../assets/imgs/rank/cr.png" v-if="i == 0" alt="">
+                <img src="../assets/imgs/rank/mr.png" v-if="i == 1" alt="">
+                <img src="../assets/imgs/rank/pb.png" v-if="i == 2" alt="">
               </span>
               <span class="score">
                                   {{ s.Ck|fmtFloat }}
@@ -196,7 +196,7 @@ export default {
         that.totalTime = totalTime;
         if (parseInt(totalTime) <= 0) {
           // 前往等待页面
-          that.$router.push({path: '/'});
+          that.$router.push({path: '/'}); //todo 调试时关闭跳走
           // 计时器回收
           clearInterval(clock);
         }
@@ -268,7 +268,6 @@ export default {
 .content {
   background: url("../../src/assets/imgs/rank/Training.png");
   @include bg;
-
   .sumTitle {
     @include cube;
     width: 80%;
@@ -283,7 +282,8 @@ export default {
       text-align: center;
       color: #fff;
       font-size: 0.5rem;
-      font-weight: normal;
+      font-weight: bold;
+
     }
 
     .lt {
@@ -325,12 +325,14 @@ export default {
     .md {
       position: relative;
       width: 3rem;
-      height: 0.75rem;
+      height: 0.9rem;
       margin: 0 auto;
+      bottom: 0.1rem;
       background: url("../../src/assets/imgs/rank/titleBg.png");
       background-repeat: no-repeat;
       background-position: top center;
       background-size: 100% 100%;
+      line-height: 0.7rem;
 
       span {
         @include cube;
@@ -339,6 +341,7 @@ export default {
         color: #fff;
         text-align: center;
         font-size: 0.35rem;
+        font-weight: bold;
       }
     }
   }
@@ -357,6 +360,10 @@ export default {
   .rt {
     width: 47%;
     float: right;
+
+    .ltTitle span {
+      margin-right: 0.3rem;
+    }
   }
 
   .ltTitle {
@@ -365,10 +372,10 @@ export default {
     span {
       float: left;
       color: #fff;
-      font-size: 0.3rem;
+      font-size: 0.25rem;
 
       &:nth-child(1) {
-        margin-right: 1.5rem;
+        margin-right: 1.3rem;
       }
 
       &:last-child {
@@ -384,7 +391,6 @@ export default {
       @include cube;
       height: 0.7rem;
       padding-top: 0.2rem;
-
       .gary {
         @include cube;
         height: 0.6rem;
@@ -394,6 +400,11 @@ export default {
         background-position: top center;
         background-size: 100% 100%;
         overflow: visible;
+        border: 1px solid rgba(255, 255, 255, 0.1);
+        border-radius: 250px;
+        border-left: 0;
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
       }
 
       em {
@@ -416,20 +427,20 @@ export default {
 
       .head {
         position: relative;
-        bottom: 0.4rem;
+        bottom: 0.5rem;
         float: left;
         margin-left: 0.3rem;
 
         img {
-          width: 0.6rem;
+          width: 0.65rem;
           border-radius: 250rem;
 
           &.girl {
-            border: 0.05rem solid #EA26EA;
+            border: 1px solid #EA26EA;
           }
 
           &.boy {
-            border: 0.05rem solid #39B6FF;
+            border: 1px solid #39B6FF;
           }
         }
       }
@@ -463,6 +474,7 @@ export default {
         font-weight: bold;
         font-style: italic;
         text-align: center;
+        padding-right: 0.2rem;
       }
     }
   }

+ 29 - 0
v2tv/src/views/Wait.vue

@@ -230,6 +230,9 @@ export default {
     }
   },
   mounted() {
+    // test
+    // this.$router.push({path: '/rank'});
+
     this.init();
     this.grpcServe();
     if (this.pageTimer) {
@@ -271,6 +274,32 @@ export default {
         that.TodayCalcValues = 123456;//不影响展示效果,可注释
       });
     },
+    // 流式传输
+    grpcSteam() {
+      // todo
+      // let getRequest = new FlushDataRequest();
+      // getRequest.setName(text);
+      // let stream = this.client.flushData(getRequest, {
+      //   token:1122334
+      // }, (err, response) => {
+      //   console.log('连接出现问题 err:' + err);
+      //   // that.grpcSrc = response
+      // });
+      //
+      // // 获取数据流
+      // stream.on('data', (response) => {
+      //   that.name = response.getName();
+      //   that.message = response.getHeartrate();
+      //   console.log('已推送数据');
+      // });
+      //
+      // // 报错处理
+      // stream.on('error', (err) => {
+      //   console.log('当前推送错误 err:' + err);
+      //   console.log(`Unexpected stream error: code = ${err.code}` +
+      //       `, message = "${err.message}"`);
+      // });
+    },
     playBell() {
       this.bellState = !this.bellState
     },

+ 26 - 24
v2tv/src/views/pk.vue

@@ -23,7 +23,7 @@
         <div class="lt">
             <span :style="{'width':RedProgress+'%'}">
             </span>
-          <em>{{ redPeron }}人红队</em>
+          <em>红队{{ redPeron }}人</em>
         </div>
 
         <div class="rt">
@@ -142,19 +142,19 @@ export default {
       this.createNewStudent();
 
       // todo
-      this.PkTimer = setInterval(() => {
-        this.GetgetUserList();
-        this.ClacClassTime();
-        this.curgetClassStat();
-      }, 1000);
-
-      this.timer2 = setInterval(() => {
-        this.createEgg();
-      }, 31000);
-
-      this.timer3 = setInterval(() => {
-        this.createNewStudent();
-      }, 6000);
+      // this.PkTimer = setInterval(() => {
+      //   this.GetgetUserList();
+      //   this.ClacClassTime();
+      //   this.curgetClassStat();
+      // }, 1000);
+      //
+      // this.timer2 = setInterval(() => {
+      //   this.createEgg();
+      // }, 31000);
+      //
+      // this.timer3 = setInterval(() => {
+      //   this.createNewStudent();
+      // }, 6000);
     },
     // 启动一个成就彩蛋
     createEgg() {
@@ -303,7 +303,7 @@ export default {
 
       // 当为0时均分
       if (redFmtSum == 0) {
-        that.Redflag = 0;
+        that.Redflag = 7;
         that.RedProgress = 25;
       } else {
         // 限制最大
@@ -312,7 +312,7 @@ export default {
       }
 
       if (blueFmtSum == 0) {
-        that.BlueFlag = 0;
+        that.BlueFlag = 7;
         that.BlueProgress = 25;
       } else {
         // 限制最大
@@ -559,7 +559,7 @@ export default {
           color: white;
           text-align: center;
           font-style: normal;
-          line-height: 0.5rem;
+          line-height: 0.6rem;
         }
       }
 
@@ -567,7 +567,7 @@ export default {
         @include cube;
         width: 1.6rem;
         position: relative;
-        bottom: 0.2rem;
+        bottom: 0.4rem;
         z-index: 444;
 
         img {
@@ -591,18 +591,19 @@ export default {
     span {
       width: 4rem;
       float: right;
-      background: linear-gradient(#d11122 0%, rgba(209, 17, 34, 0.23) 100%);
+      background: linear-gradient(to right, #d11122 0%, rgba(209, 17, 34, 0.23) 100%);
     }
 
     em {
       position: relative;
       float: right;
-      right: -1.5rem;
+      right: -1.9rem;
       width: 1.6rem;
       color: white;
-      text-align: right;
       font-size: 0.3rem;
       font-style: normal;
+      text-align: left;
+      line-height: 0.5rem;
     }
   }
 
@@ -613,18 +614,19 @@ export default {
     span {
       width: 4rem;
       float: left;
-      background: linear-gradient(#4cbbfc 0%, rgba(0, 125, 198, 0.17) 100%);
+      background: linear-gradient(to left, #4cbbfc 0%, rgba(0, 125, 198, 0.17) 100%);
     }
 
     em {
       position: relative;
       float: left;
-      left: -1.5rem;
+      left: -1.3rem;
       width: 1.6rem;
       color: white;
-      text-align: right;
       font-size: 0.3rem;
       font-style: normal;
+      text-align: left;
+      line-height: 0.5rem;
     }
   }