Changpeng Duan преди 5 години
родител
ревизия
dd404880ac

+ 163 - 69
tv/.idea/workspace.xml

@@ -20,8 +20,15 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/test.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/newRecord/record.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/newRecord/record_icon.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/newRecord/record_title.svg" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/api/getApiRes.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/getApiRes.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/components/newRecord.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/newRecord.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Main.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Rank.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Rank.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/vue.config.js" beforeDir="false" afterPath="$PROJECT_DIR$/vue.config.js" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -34,20 +41,37 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="427">
-              <caret line="66" column="45" selection-start-line="66" selection-start-column="45" selection-end-line="66" selection-end-column="45" />
+            <state relative-caret-position="443">
+              <caret line="386" column="26" lean-forward="true" selection-start-line="386" selection-start-column="26" selection-end-line="386" selection-end-column="26" />
+              <folding>
+                <element signature="e#4157#4201#0" expanded="true" />
+                <element signature="e#5654#7848#0" />
+                <element signature="e#8303#8851#0" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/test.html">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="611">
+              <caret line="473" column="21" lean-forward="true" selection-start-line="473" selection-start-column="21" selection-end-line="473" selection-end-column="21" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="168">
-              <caret line="8" column="15" lean-forward="true" selection-start-line="8" selection-start-column="15" selection-end-line="8" selection-end-column="15" />
+            <state relative-caret-position="824">
+              <caret line="71" column="1" lean-forward="true" selection-start-line="71" selection-start-column="1" selection-end-line="71" selection-end-column="1" />
+              <folding>
+                <element signature="e#0#26#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -66,19 +90,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>.bottomLi span</find>
-      <find>four</find>
-      <find>width: 3rem</find>
-      <find>endTime</find>
-      <find>ClacClassTime</find>
-      <find>fakeNews</find>
-      <find>BluestudentsClassName</find>
-      <find>studentsClassName</find>
-      <find>Bluestudents</find>
-      <find>giveClassName</find>
-      <find>students</find>
-      <find>sumBg</find>
-      <find>sum</find>
       <find>.name</find>
       <find>move</find>
       <find>slowJump</find>
@@ -96,6 +107,19 @@
       <find>heart</find>
       <find>.max</find>
       <find>.dghead img</find>
+      <find>&lt;img</find>
+      <find>getRecordBreak</find>
+      <find>createEgg</find>
+      <find>totalTime</find>
+      <find>.png</find>
+      <find>fakeEgg</find>
+      <find>fake</find>
+      <find>CalorieStatsQuery</find>
+      <find>recordMain</find>
+      <find>curgetClassStat</find>
+      <find>GetgetUserList</find>
+      <find>timer2</find>
+      <find>GetUserRankingQuery</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
@@ -111,21 +135,21 @@
         <option value="$PROJECT_DIR$/src/Mock/index.js" />
         <option value="$PROJECT_DIR$/src/lib/rem.js" />
         <option value="$PROJECT_DIR$/src/assets/css/mainBk.css" />
-        <option value="$PROJECT_DIR$/src/components/newRecord.vue" />
         <option value="$PROJECT_DIR$/src/App.vue" />
         <option value="$PROJECT_DIR$/src/views/Index.vue" />
         <option value="$PROJECT_DIR$/src/assets/css/mainBk2.css" />
         <option value="$PROJECT_DIR$/README.md" />
-        <option value="$PROJECT_DIR$/src/api/getApiRes.js" />
         <option value="$PROJECT_DIR$/package.json" />
         <option value="$PROJECT_DIR$/src/main.js" />
         <option value="$PROJECT_DIR$/src/router/index.js" />
-        <option value="$PROJECT_DIR$/vue.config.js" />
         <option value="$PROJECT_DIR$/src/views/pk.vue" />
         <option value="$PROJECT_DIR$/src/components/Headside.vue" />
-        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
-        <option value="$PROJECT_DIR$/src/views/Main.vue" />
         <option value="$PROJECT_DIR$/test.html" />
+        <option value="$PROJECT_DIR$/src/components/newRecord.vue" />
+        <option value="$PROJECT_DIR$/vue.config.js" />
+        <option value="$PROJECT_DIR$/src/views/Main.vue" />
+        <option value="$PROJECT_DIR$/src/api/getApiRes.js" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
       </list>
     </option>
   </component>
@@ -136,10 +160,10 @@
     <auto-save>true</auto-save>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-8" />
-    <option name="y" value="-8" />
-    <option name="width" value="1936" />
-    <option name="height" value="1066" />
+    <option name="x" value="-2292" />
+    <option name="y" value="179" />
+    <option name="width" value="2576" />
+    <option name="height" value="1456" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
@@ -175,6 +199,53 @@
               <item name="src" type="462c0819:PsiDirectoryNode" />
               <item name="api" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="components" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="router" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="static" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="static" type="462c0819:PsiDirectoryNode" />
+              <item name="img" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="static" type="462c0819:PsiDirectoryNode" />
+              <item name="img" type="462c0819:PsiDirectoryNode" />
+              <item name="newRecord" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="static" type="462c0819:PsiDirectoryNode" />
+              <item name="img" type="462c0819:PsiDirectoryNode" />
+              <item name="rank" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="views" type="462c0819:PsiDirectoryNode" />
+            </path>
           </expand>
           <select />
         </subPane>
@@ -206,10 +277,10 @@
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\wwwroot\flyLong\tv\src\static\img\newRecord" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img\people" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img\rank" />
-      <recent name="D:\wwwroot\flyLong\tv\src\static\img\newRecord" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img\pk" />
     </key>
     <key name="MoveFile.RECENT_KEYS">
@@ -274,18 +345,26 @@
       <workItem from="1604539672735" duration="79000" />
       <workItem from="1604540536502" duration="646000" />
       <workItem from="1604541901536" duration="160559000" />
-      <workItem from="1605406240238" duration="12953000" />
+      <workItem from="1605406240238" duration="26421000" />
     </task>
+    <task id="LOCAL-00001" summary="test web">
+      <created>1605431368250</created>
+      <option name="number" value="00001" />
+      <option name="presentableId" value="LOCAL-00001" />
+      <option name="project" value="LOCAL" />
+      <updated>1605431368250</updated>
+    </task>
+    <option name="localTasksCounter" value="2" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="174158000" />
+    <option name="totallyTimeSpent" value="187626000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
+    <frame x="-2568" y="-8" width="2576" height="1395" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20663811" />
+      <window_info content_ui="combo" id="Project" order="0" weight="0.1539075" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.24973656" />
       <window_info id="Favorites" order="2" side_tool="true" weight="0.32982087" />
       <window_info id="npm" order="3" side_tool="true" />
@@ -342,6 +421,10 @@
       </map>
     </option>
   </component>
+  <component name="VcsManagerConfiguration">
+    <MESSAGE value="test web" />
+    <option name="LAST_COMMIT_MESSAGE" value="test web" />
+  </component>
   <component name="WindowStateProjectService">
     <state x="-1830" y="274" width="1099" height="859" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1604022799787">
       <screen x="-2560" y="0" width="2560" height="1379" />
@@ -402,16 +485,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/newRecord/record.png">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/components/newRecord.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="252">
-          <caret line="10" column="40" lean-forward="true" selection-start-line="10" selection-start-column="40" selection-end-line="10" selection-end-column="40" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/libs/rem.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="63">
@@ -460,16 +533,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/router/index.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="740">
-          <caret line="73" column="10" lean-forward="true" selection-start-line="73" selection-start-column="10" selection-end-line="73" selection-end-column="10" />
-          <folding>
-            <element signature="e#0#21#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="273">
@@ -525,44 +588,75 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/test.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="546">
+          <caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/static/img/newRecord/record_icon.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/static/img/newRecord/record_title.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/static/img/newRecord/record.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/static/img/newRecord/record.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/components/newRecord.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="252">
+          <caret line="75" column="27" selection-start-line="75" selection-start-column="27" selection-end-line="75" selection-end-column="27" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/vue.config.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="672">
-          <caret line="32" column="20" lean-forward="true" selection-start-line="32" selection-start-column="20" selection-end-line="32" selection-end-column="20" />
+        <state relative-caret-position="693">
+          <caret line="33" column="24" selection-start-line="33" selection-start-column="24" selection-end-line="33" selection-end-column="24" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+    <entry file="file://$PROJECT_DIR$/src/router/index.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="275">
-          <caret line="400" column="53" lean-forward="true" selection-start-line="400" selection-start-column="53" selection-end-line="400" selection-end-column="53" />
+        <state relative-caret-position="764">
+          <caret line="73" column="10" lean-forward="true" selection-start-line="73" selection-start-column="10" selection-end-line="73" selection-end-column="10" />
           <folding>
-            <element signature="e#5171#5215#0" expanded="true" />
+            <element signature="e#0#21#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="427">
-          <caret line="66" column="45" selection-start-line="66" selection-start-column="45" selection-end-line="66" selection-end-column="45" />
+        <state relative-caret-position="611">
+          <caret line="473" column="21" lean-forward="true" selection-start-line="473" selection-start-column="21" selection-end-line="473" selection-end-column="21" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="441">
-          <caret line="21" column="40" selection-start-line="21" selection-start-column="25" selection-end-line="21" selection-end-column="40" />
+        <state relative-caret-position="824">
+          <caret line="71" column="1" lean-forward="true" selection-start-line="71" selection-start-column="1" selection-end-line="71" selection-end-column="1" />
           <folding>
             <element signature="e#0#26#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/test.html">
+    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="168">
-          <caret line="8" column="15" lean-forward="true" selection-start-line="8" selection-start-column="15" selection-end-line="8" selection-end-column="15" />
+        <state relative-caret-position="443">
+          <caret line="386" column="26" lean-forward="true" selection-start-line="386" selection-start-column="26" selection-end-line="386" selection-end-column="26" />
+          <folding>
+            <element signature="e#4157#4201#0" expanded="true" />
+            <element signature="e#5654#7848#0" />
+            <element signature="e#8303#8851#0" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 49 - 0
tv/src/api/getApiRes.js

@@ -22,6 +22,7 @@ export function getHello(postdata) {
     let url = headapi + 'getUserListInfo';
     return getApiBasic(url, postdata);
 }
+
 // 上课中学生信息
 // export function getHello(postdata) {
 //     let url =  'http://192.168.74.1:9000/getUserListInfo';
@@ -33,3 +34,51 @@ export function getClassStat(postdata) {
     let url = headapi + 'getClassStat';
     return getApiBasic(url, postdata);
 }
+
+// 新纪录彩蛋
+export function getRecordBreak(postdata) {
+    let url = headapi + 'getRecordBreak';
+    return getApiBasic(url, postdata);
+}
+
+// 英雄榜和个人破纪录查询
+export function HerosRankingQuery(postdata) {
+    // let url = 'http://192.168.0.236:19096/v1/Sensors/HerosRankingQuery';
+    let url = '/bpi/v1/Sensors/HerosRankingQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 卡路里场馆统计(分月度、周统计,TV左上角统计)
+export function CalorieStatsQuery(postdata) {
+    let url = '/bpi/v1/Sensors/CalorieStatsQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 用户排名查询(Tv待机页面右侧排名)
+export function UserRankingQuery(postdata) {
+    let url = '/bpi/v1/Sensors/UserRankingQuery';
+    return getApiBasic(url, postdata);
+}
+
+// export function HerosRankingQuery2(postdata) {
+//     let url =  '/bpi/v1/Sensors/HerosRankingQuery';
+//     return getApiBasic(url, postdata);
+// }
+
+// 英雄榜和个人破纪录查询
+export function HerosRankingQuery2(postdata) {
+    let url = headapi + 'HerosRankingQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 卡路里场馆统计(分月度、周统计,TV左上角统计)
+export function CalorieStatsQuery2(postdata) {
+    let url = headapi + 'CalorieStatsQuery';
+    return getApiBasic(url, postdata);
+}
+
+// 用户排名查询(Tv待机页面右侧排名)
+export function UserRankingQuery2(postdata) {
+    let url = headapi + 'UserRankingQuery';
+    return getApiBasic(url, postdata);
+}

+ 36 - 11
tv/src/components/newRecord.vue

@@ -3,24 +3,25 @@
         <div class="eggContainer">
             <div class="toper">
                 <!--<img v-bind:src="require('../static/img/people/' + toperInfo.toper.head)" alt="">-->
-                <span>{{toperInfo.toper.userNmae}}</span>
+                <img :src="toperInfo.toper.Head" alt="">
+                <span>{{toperInfo.toper.UserName}}</span>
             </div>
             <div class="info">
                 <div class="lt">
-                    <h5>个人单次卡路里记录</h5>
+                    <h5>{{toperInfo.toper.CleTitle}}</h5>
                     <div class="detail">
-                        <em>{{toperInfo.toper.calorie}}</em>
-                        <span>千卡</span>
+                        <em>{{toperInfo.toper.Cle|fmtInt}}</em>
+                        <span>{{toperInfo.toper.CleUnit}}</span>
                     </div>
-                    <img class="icons" src="../static/img/newRecord/record_icon.png"/>
+                    <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
                 </div>
                 <div class="rt">
-                    <h5>个人单次CK值记录</h5>
+                    <h5>{{toperInfo.toper.CkTitle}}</h5>
                     <div class="detail">
-                        <em>{{toperInfo.toper.ck}}</em>
-                        <span>CK值</span>
+                        <em>{{toperInfo.toper.Ck|fmtFloat}}</em>
+                        <span>{{toperInfo.toper.CkUnit}}</span>
                     </div>
-                    <img class="icons" src="../static/img/newRecord/record_icon.png"/>
+                    <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
                 </div>
             </div>
         </div>
@@ -37,6 +38,30 @@
             };
         },
         props: ['toperInfo'],
+        filters: {
+            fmtNum(val) {
+                if (val == 0) {
+                    return '--'
+                } else {
+                    if (parseInt(val) < 0) return 0;
+                    if (parseInt(val) > 0) return val
+                }
+            },
+            fmtFloat(val){
+                if (val == 0) {
+                    return '0'
+                } else {
+                    return parseFloat(val).toFixed(1);
+                }
+            },
+            fmtInt(val){
+                if (val == 0) {
+                    return '0'
+                } else {
+                    return parseInt(val);
+                }
+            },
+        },
     }
 </script>
 
@@ -45,10 +70,10 @@
     /deep/ .el-dialog {
         width: 22rem;
         height: 6rem;
-        background: url("../static/img/newRecord/record.png");
+        background: url("../static/img/newRecord/record.svg");
         background-position: top center;
         background-repeat: no-repeat;
-        background-size: 100% 100%;
+        background-size: 120% 100%;
         box-shadow: none;
         padding-bottom: 1rem;
     }

+ 18 - 0
tv/src/static/img/newRecord/record.svg

@@ -0,0 +1,18 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1802" height="691" viewBox="0 0 1802 691">
+  <defs>
+    <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#e85297"/>
+      <stop offset="1" stop-color="#c201e8"/>
+    </linearGradient>
+    <filter id="矩形_58" x="0" y="0" width="1802" height="691" filterUnits="userSpaceOnUse">
+      <feOffset input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="12.5" result="blur"/>
+      <feFlood flood-color="#ef22ac"/>
+      <feComposite operator="in" in2="blur"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+  </defs>
+  <g transform="matrix(1, 0, 0, 1, 0, 0)" filter="url(#矩形_58)">
+    <rect id="矩形_58-2" data-name="矩形 58" width="1727" height="616" rx="50" transform="translate(37.5 37.5)" fill="url(#linear-gradient)"/>
+  </g>
+</svg>

Файловите разлики са ограничени, защото са твърде много
+ 3 - 0
tv/src/static/img/newRecord/record_icon.svg


+ 18 - 0
tv/src/static/img/newRecord/record_title.svg

@@ -0,0 +1,18 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1802" height="691" viewBox="0 0 1802 691">
+  <defs>
+    <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#e85297"/>
+      <stop offset="1" stop-color="#c201e8"/>
+    </linearGradient>
+    <filter id="矩形_58" x="0" y="0" width="1802" height="691" filterUnits="userSpaceOnUse">
+      <feOffset input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="12.5" result="blur"/>
+      <feFlood flood-color="#ef22ac"/>
+      <feComposite operator="in" in2="blur"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+  </defs>
+  <g transform="matrix(1, 0, 0, 1, 0, 0)" filter="url(#矩形_58)">
+    <rect id="矩形_58-2" data-name="矩形 58" width="1727" height="616" rx="50" transform="translate(37.5 37.5)" fill="url(#linear-gradient)"/>
+  </g>
+</svg>

+ 167 - 61
tv/src/views/Main.vue

@@ -3,7 +3,8 @@
         <Headside></Headside>
         <div class="userList">
             <ul>
-                <li v-for="(s,i) in students" :class="studentsClassName[i].name" v-show="students" v-if="students.length > 0">
+                <li v-for="(s,i) in students" :class="studentsClassName[i].name" v-show="students"
+                    v-if="students.length > 0">
                     <div class="ltLi" v-if="students.length == 1"></div>
                     <div class="centerLi">
                         <div class="topLi">
@@ -28,14 +29,17 @@
                                 <div class="lhj">
                                     <!--<div :class="[{'heartJump':true},{'fastJump':parseInt(s.heartRate) > 100},{'slowJump':parseInt(s.heartRate) <= 100}]">-->
                                     <div :class="[{'heartJump':true}]">
-                                    <!--<span :class="[{'fastJump':parseInt(s.realHr) > 100},{'slowJump':parseInt(s.realHr) <= 100}]" v-if="s.realHr != 0">-->
+                                        <!--<span :class="[{'fastJump':parseInt(s.realHr) > 100},{'slowJump':parseInt(s.realHr) <= 100}]" v-if="s.realHr != 0">-->
                                         <!--{{ s.realHr }}-->
-                                    <!--</span>-->
-                                        <span class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) > 90">{{ s.realHr }}</span>
-                                        <span class="normalJump" v-if="s.realHr != 0" v-show="parseInt(s.activePercent) <= 90 && parseInt(s.activePercent) > 30">{{ 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>-->
+                                        <span class="fastJump" v-if="s.realHr != 0"
+                                              v-show="parseInt(s.activePercent) > 90">{{ s.realHr }}</span>
+                                        <span class="normalJump" v-if="s.realHr != 0"
+                                              v-show="parseInt(s.activePercent) <= 90 && parseInt(s.activePercent) > 30">{{ 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>
                                     </div>
@@ -120,7 +124,7 @@
 
 <script>
     import Headside from '@/components/Headside'
-    import {getHello} from '@/api/getApiRes'
+    import {getHello, getRecordBreak} from '@/api/getApiRes'
     import newRecord from '@/components/newRecord'
     import '../libs/rem';
 
@@ -129,10 +133,11 @@
     export default {
         data() {
             return {
-                contentStyleObj:{
+                contentStyleObj: {
                     animation: 'mymove 1s'
                 },
                 trueDate: true,//真实数据 true false
+                totalTime: 4,
                 times: 1,
                 thisClassName: '',
                 studentsClassName: [],
@@ -186,7 +191,23 @@
                     {name: '张岩'},
                     {name: '郑伟'},
                     {name: '郑伟'},
-                ]
+                ],
+                fakeEgg: {
+                    Rs: {
+                        "DuId": 37,
+                        "UserId": 0,
+                        "UserName": "郑伟",
+                        "Sex": 1,
+                        // "Head": "http://192.168.0.2/zw.png",
+                        "Head": "https://img-operation.csdnimg.cn/csdn/silkroad/img/1604989753379.png",
+                        "Cle": 400,
+                        "CleTitle": "个人单次卡路里记录",
+                        "CleUnit": "千卡",
+                        "CkTitle": "个人单次CK记录",
+                        "Ck": 99.9,
+                        "CkUnit": "CK值"
+                    }
+                }
             }
         },
         mounted() {
@@ -194,14 +215,20 @@
                 this.timer = setInterval(() => {
                     this.GetgetUserList();
                 }, 1000);
+
+                this.timer2 = setInterval(() => {
+                    this.createEgg();
+                }, 6000);
                 this.GetgetUserList();
+                this.createEgg();
             } else {
+                this.OpenEgg(this.fakeEgg);
                 this.timer = setInterval(() => {
                     this.students = this.fakeNews();
                     this.giveClassName(this.students);
-                }, 3000);
+                }, 1000);
+
 
-                // this.createEgg(this.students[5]);
             }
 
 
@@ -217,7 +244,7 @@
             //       if (totalTime < 0) {
             //         totalTime = 3;
             //         that.serachBtnStatus = false;
-            //         that.$router.push({path: '/rank'});
+                    that.$router.push({path: '/rank'});
             //       }
             //     }
             //     ,
@@ -225,27 +252,29 @@
             // )
         },
         methods: {
+
             fakeNews() {
                 let item = [];
-                // 1 2 3 5 9 11 13 16 21
-                let fakeNums = 1;
+                // 1 2 3 5 9 11 13 16 21 30
+                let fakeNums = 30;
                 for (var i = 0; i < fakeNums; i++) {
                     item.push(
                         {
                             "SvId": 1,
                             "UserId": 1,
-                            "Cle": 9999,
-                            "realHr1":parseInt( Math.random() *100 +50),
-                            "realHr":110,
+                            "Cle": 999,
+                            "realHr1": parseInt(Math.random() * 100 + 50),
+                            "realHr": 100,
                             "heartRate": 100,
-                            "activePercen1t":parseInt( Math.random() *100 +50),
-                            "activePercent":30,
-                            "Steps": 99999,
-                            "PureCalorieNoVo2": 9999,
+                            "activePercen1t": parseInt(Math.random() * 100 + 50),
+                            "activePercent": 100,
+                            "Steps": 9999,
+                            "PureCalorieNoVo2": 999,
                             "Name": "东南西北",
                             "updateTime": 1604568915582,
                             "Ck": 99.9,
-                            "head": 'https://img-operation.csdnimg.cn/csdn/silkroad/img/1604989753379.png'
+                            "head": 'https://img-operation.csdnimg.cn/csdn/silkroad/img/1604989753379.png',
+                            "Head": 'https://img-operation.csdnimg.cn/csdn/silkroad/img/1604989753379.png',
                         }
                     )
                 }
@@ -256,22 +285,35 @@
             },
             // 启动一个成就彩蛋
             createEgg(msg) {
-                this.OpenEgg(msg)
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                getRecordBreak(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.OpenEgg(json);
+                    } else {
+                        // 并没有人破记录
+                        if (json.Code == 999) return false;
+                        if (json.Code != 999) that.$message.error(json.Memo);
+                    }
+                })
             },
             OpenEgg(msg) {
-                this.toperInfo.toper = msg;
+                this.toperInfo.toper = msg.Rs;
                 this.toperInfo.dialogVisible = true;
-                console.log(msg);
                 // 倒计时5秒自动关闭
                 let that = this;
-                let totalTime = 5;
+                this.totalTime = 4;
                 let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 5;
+                    this.totalTime--;
+                    if (parseInt(this.totalTime) < 0) {
                         that.toperInfo.dialogVisible = false;
+                        clearInterval(clock);
                     }
-                }, 3000)
+                }, 1000)
             },
             GetgetUserList() {
                 let that = this;
@@ -287,7 +329,7 @@
 
                         if (that.times == 1) {
                             that.students = json.Rs;
-                            if(!json.Rs) return false;
+                            if (!json.Rs) return false;
                             // 添加头像 和 姓名
                             that.students.map(function (i, v) {
                                 i.head = that.headImg[v].name;
@@ -298,7 +340,7 @@
                             if (localStorage.result != JSON.stringify(json.Rs)) {
                                 that.students = json.Rs;
                                 // this.createEgg(this.students[1]);
-                                if(!json.Rs) return false
+                                if (!json.Rs) return false
                                 // 添加头像 和 姓名
                                 that.students.map(function (i, v) {
                                     i.head = that.headImg[v].name;
@@ -316,7 +358,7 @@
                         console.log(json.Code);
                         if (json.Code == '999') {
                             that.$router.push({path: '/rank'});
-                        }else{
+                        } else {
                             // 已出错
                             that.$message.error(json.Memo);
                         }
@@ -357,10 +399,10 @@
                         case parseInt(res.length) <= 24 && parseInt(res.length) > 20:
                             numberClass = 'twenty';
                             break;
-                        case parseInt(res.length) <= 27 && parseInt(res.length) > 24:
+                        case parseInt(res.length) <= 30 && parseInt(res.length) > 24:
                             numberClass = 'twentyFour';
                             break;
-                        case parseInt(res.length) > 27:
+                        case parseInt(res.length) > 31:
                             numberClass = 'thirtyFive';
                             break;
                     }
@@ -401,23 +443,23 @@
                     if (parseInt(val) > 0) return val
                 }
             },
-            fmtFloat(val){
+            fmtFloat(val) {
                 if (val == 0) {
                     return '0'
                 } else {
                     return parseFloat(val).toFixed(1);
                 }
             },
-            fmtInt(val){
+            fmtInt(val) {
                 if (val == 0) {
                     return '0'
                 } else {
-                    // return parseInt(val);
-                    return parseFloat(val).toFixed(3);
+                    return parseInt(val);
+                    // return parseFloat(val).toFixed(3);
                 }
             },
         },
-        watch:{
+        watch: {
             '$route': function (val) {
                 if (val.path == '/') {
                     if (this.trueDate) {
@@ -430,10 +472,9 @@
                         this.giveClassName(this.students);
                         // this.createEgg(this.students[5]);
                     }
-
-
-                }else{
+                } else {
                     clearInterval(this.timer);
+                    clearInterval(this.timer2);
                 }
             }
         },
@@ -663,7 +704,6 @@
     }
 
 
-
     .slowJump {
         animation: mymove 3s infinite;
         -webkit-animation: mymove 3s infinite; /*Safari and Chrome*/
@@ -673,6 +713,7 @@
         -webkit-animation-direction: alternate; /*轮流反向播放动画。*/
         -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
     }
+
     .normalJump {
         animation: mymove 2s infinite;
         -webkit-animation: mymove 2s infinite; /*Safari and Chrome*/
@@ -726,7 +767,6 @@
     }
 
 
-
     /*userList*/
 
     .userList {
@@ -983,25 +1023,41 @@
 
     .max .bottomLi .btck {
         width: 29%;
-        padding-left: 3%;
+        padding-left: 1%;
     }
 
     .max .bottomLi .step {
         width: 24%;
         padding-right: 2%;
     }
+
     .max .cla em.plus {
         position: relative;
         left: -0.5rem
     }
+
     .max .lhj span.plus {
         position: relative;
         left: 2.75rem
     }
+
+    .max .bottomLi .btcla img {
+        width: 0.5rem;
+        height: 0.5rem;
+    }
+
+    .max .bottomLi .btcla span {
+        text-indent: 0.1rem;
+    }
+
+    .max .bottomLi .btck span {
+        text-indent: 0.1rem;
+    }
+
     .max .bottomLi .btck img {
         width: 0.6rem;
         height: 0.6rem;
-        margin-top: 0;
+        margin-top: 0.05rem;
     }
 
 
@@ -1025,6 +1081,7 @@
         font-size: 0.6rem;
         line-height: 1rem;
     }
+
     .two .human img {
         width: 2.8rem;
         height: 2.8rem;
@@ -1091,22 +1148,29 @@
 
     .two .bottomLi .step {
         width: 26%;
-        padding-right:4%;
+        padding-right: 4%;
     }
+
     .two .cla em.plus {
         position: relative;
         left: -0.5rem
     }
+
     .two .lhj span.plus {
         position: relative;
         left: 2.2rem
     }
+
     .two .bottomLi .btck img {
         width: 0.6rem;
         height: 0.6rem;
         margin-top: 0.05rem;
     }
 
+    .two .bottomLi .btck span {
+        text-indent: 0.1rem;
+    }
+
 
     /*three*/
     .three {
@@ -1116,6 +1180,7 @@
         overflow: hidden;
         margin-bottom: 1%
     }
+
     .three .centerLi {
         width: 96%;
         overflow: hidden;
@@ -1131,6 +1196,7 @@
         font-size: 0.45rem;
         line-height: 0.8rem;
     }
+
     .three .human img {
         width: 2.1rem;
         height: 2.1rem;
@@ -1206,16 +1272,22 @@
         position: relative;
         left: -0.5rem
     }
+
     .three .lhj span.plus {
         position: relative;
         left: 1.9rem
     }
+
     .three .bottomLi .btck img {
         width: 0.6rem;
         height: 0.6rem;
         margin-top: 0.05rem;
     }
 
+    .three .bottomLi .btck span {
+        text-indent: 0.1rem;
+    }
+
     /*six*/
     .six {
         width: 33.3333%;
@@ -1224,6 +1296,7 @@
         overflow: hidden;
         margin-bottom: 1%
     }
+
     .six .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1239,8 +1312,9 @@
         font-size: 0.4rem;
         line-height: 0.8rem;
     }
+
     .six .human img {
-        width:  1.6rem;
+        width: 1.6rem;
         height: 1.6rem;
     }
 
@@ -1327,14 +1401,17 @@
         width: 27%;
         padding-right: 2%;
     }
+
     .six .cla em.plus {
         position: relative;
         left: -0.3rem
     }
+
     .six .lhj span.plus {
         position: relative;
         left: 1.3rem
     }
+
     .six .bottomLi .btck img {
         width: 0.5rem;
         height: 0.5rem;
@@ -1345,11 +1422,12 @@
     /*nine*/
     .nine {
         width: 33.3333%;
-        height:2.7rem;
+        height: 2.7rem;
         float: left;
         overflow: hidden;
         margin-bottom: 0.1rem
     }
+
     .nine .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1365,9 +1443,10 @@
         font-size: 0.35rem;
         line-height: 0.6rem;
     }
+
     .nine .human img {
-        width:  1.2rem;
-        height:1.2rem;
+        width: 1.2rem;
+        height: 1.2rem;
     }
 
     .nine .cla {
@@ -1440,10 +1519,12 @@
         width: 27%;
         padding-right: 1%;
     }
+
     .nine .cla em.plus {
         position: relative;
         left: -0.3rem
     }
+
     .nine .lhj span.plus {
         position: relative;
         left: 1.3rem
@@ -1463,6 +1544,7 @@
         overflow: hidden;
         margin-bottom: 0.2rem
     }
+
     .ten .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1479,14 +1561,15 @@
         line-height: 0.55rem;
         margin-bottom: 0.1rem;
     }
+
     .ten .human img {
         width: 1.1rem;
-        height:1.1rem;
+        height: 1.1rem;
     }
 
     .ten .cla {
         width: 1.4rem;
-        height:1.5rem;
+        height: 1.5rem;
         top: -0.95rem;
         left: 0;
         font-size: 0.2rem;
@@ -1553,15 +1636,18 @@
         width: 27%;
         padding-right: 2%;
     }
+
     .ten .cla em.plus {
         position: relative;
         left: -0.3rem
     }
+
     .ten .lhj span.plus {
         position: relative;
         left: 1.2rem;
         line-height: 0.75rem;
     }
+
     .ten .btck img {
         width: 0.4rem;
         height: 0.4rem;
@@ -1576,6 +1662,7 @@
         overflow: hidden;
         margin-bottom: 0.3rem
     }
+
     .twelve .centerLi {
         width: 98%;
         height: 100%;
@@ -1593,6 +1680,7 @@
         line-height: 0.7rem;
         margin-bottom: 0.2rem;
     }
+
     .twelve .human img {
         width: 0.9rem;
         height: 0.9rem;
@@ -1600,7 +1688,7 @@
 
     .twelve .cla {
         width: 1.2rem;
-        height:1.2rem;
+        height: 1.2rem;
         top: -0.8rem;
         left: 0;
         font-size: 0.2rem;
@@ -1620,7 +1708,7 @@
 
     .twelve .lhj span {
         width: 1.2rem;
-        height:1.2rem;
+        height: 1.2rem;
         top: -0.8rem;
         left: 1rem;
         font-size: 0.6rem;
@@ -1667,18 +1755,22 @@
         width: 27%;
         padding-right: 0%;
     }
+
     .twelve .cla em.plus {
         position: relative;
         left: -0.2rem
     }
+
     .twelve .lhj span.plus {
         position: relative;
         left: 0.8rem
     }
+
     .twelve .btck img {
         width: 0.3rem;
         height: 0.3rem;
     }
+
     .twelve .btck img {
         width: 0.35rem;
         height: 0.35rem;
@@ -1694,6 +1786,7 @@
         overflow: hidden;
         margin-bottom: 0.1rem
     }
+
     .sixteen .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1710,6 +1803,7 @@
         line-height: 0.45rem;
         margin-bottom: 0.1rem;
     }
+
     .sixteen .human img {
         width: 0.75rem;
         height: 0.75rem;
@@ -1717,7 +1811,7 @@
 
     .sixteen .cla {
         width: 1.2rem;
-        height:1.4rem;
+        height: 1.4rem;
         top: -0.7rem;
         left: 0;
         font-size: 0.15rem;
@@ -1785,14 +1879,17 @@
         padding-right: 3%;
         /*text-align: center;*/
     }
+
     .sixteen .cla em.plus {
         position: relative;
         left: -0.2rem
     }
+
     .sixteen .lhj span.plus {
         position: relative;
         left: 0.9rem
     }
+
     .sixteen .btck img {
         width: 0.3rem;
         height: 0.3rem;
@@ -1807,6 +1904,7 @@
         overflow: hidden;
         margin-bottom: 0.1rem
     }
+
     .twenty .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1823,6 +1921,7 @@
         line-height: 0.5rem;
         margin-bottom: 0.1rem;
     }
+
     .twenty .human img {
         width: 0.75rem;
         height: 0.75rem;
@@ -1830,7 +1929,7 @@
 
     .twenty .cla {
         width: 1rem;
-        height:1.4rem;
+        height: 1.4rem;
         top: -0.65rem;
         left: 0;
         font-size: 0.15rem;
@@ -1897,10 +1996,12 @@
         width: 28%;
         padding-right: 3%;
     }
+
     .twenty .cla em.plus {
         position: relative;
         left: -0.2rem
     }
+
     .twenty .lhj span.plus {
         position: relative;
         left: 0.8rem
@@ -1915,6 +2016,7 @@
         overflow: hidden;
         margin-bottom: 0.1rem
     }
+
     .twentyFour .centerLi {
         width: 98%;
         overflow: hidden;
@@ -1930,6 +2032,7 @@
         font-size: 0.225rem;
         line-height: 0.4rem;
     }
+
     .twentyFour .human img {
         width: 0.7rem;
         height: 0.7rem;
@@ -1938,7 +2041,7 @@
 
     .twentyFour .cla {
         width: 1rem;
-        height:1.4rem;
+        height: 1.4rem;
         top: -0.6rem;
         left: 0;
         font-size: 0.15rem;
@@ -2005,15 +2108,18 @@
         width: 28%;
         padding-right: 0%;
     }
+
     .twentyFour .cla em.plus {
         position: relative;
         left: -0.2rem
     }
+
     .twentyFour .lhj span.plus {
         position: relative;
         left: 0.8rem;
         line-height: 0.45rem;
     }
+
     .twentyFour .btck img {
         width: 0.3rem;
         height: 0.3rem;

+ 155 - 59
tv/src/views/Rank.vue

@@ -4,13 +4,13 @@
         <div class="rankContainer">
             <div class="lt">
                 <div class="recordMain">
-                    <el-carousel :interval="30000" height="370px" >
+                    <el-carousel :interval="30000" height="370px">
                         <el-carousel-item v-for="rs in recordMain">
-                            <h5>{{rs.title}}</h5>
+                            <h5>{{rs.Title}}</h5>
                             <div class="sumContainer">
                                 <div class="sum">
-                                    <s>{{rs.Unite}}</s>
-                                    <em>{{rs.Result}}</em>
+                                    <s>{{rs.Result[0].Unite}}</s>
+                                    <em>{{rs.Result[0].Values}}</em>
                                 </div>
                                 <span class="sumBg"></span>
                             </div>
@@ -20,40 +20,38 @@
                 <div class="bottom">
                     <el-carousel :interval="15000" height="280px">
                         <el-carousel-item v-for="Rs in bottom">
-                            <div class="topOne" v-if="Rs.style == 'topOne'">
-                                <h5>{{Rs.title}}</h5>
-                                {{bottom.students}}
+                            <div class="topOne" v-if="Rs.Style == 'tops'">
+                                <h5>{{Rs.Title}}</h5>
                                 <ul>
-                                    <li v-for="(hero,i) in Rs.students">
+                                    <li v-for="(tops,i) in Rs.Result">
                                         <div class="dgCenter">
                                             <div class="dghead">
-                                                <!--<img v-bind:src="require('../static/img/people/' + topMsg.head)" alt="">-->
                                                 <img :id="'circle_'+i"
-                                                     v-bind:src="require('../static/img/people/' + hero.head)" alt="">
-                                                <s>{{ topMsg.userName }}</s>
+                                                     v-bind:src="tops.Head" alt="">
+                                                <s>{{ tops.UserName }}</s>
                                             </div>
                                             <div class="score">
-                                                <em>{{ topMsg.ck }}</em>
+                                                <em>{{ tops.Values}}</em>
                                                 <span>
-                      打破了历史记录{{ topMsg.topCk }}
-                   </span>
+                                                    {{tops.Message}}
+                                                </span>
                                             </div>
                                         </div>
                                     </li>
                                 </ul>
                             </div>
-                            <div class="heros" v-if="Rs.style == 'heros'">
-                                <h5>{{Rs.title}}</h5>
+                            <div class="heros" v-if="Rs.Style == 'heros'">
+                                <h5>{{Rs.Title}}</h5>
                                 <ul>
-                                    <li v-for="(hero,i) in Rs.students">
-                                        <img :id="'circle_'+i" v-bind:src="require('../static/img/people/' + hero.head)"
-                                             alt="">
-                                        <img src="../static/img/rank/boy.png" class="sex" v-if="hero.sex == 1"/>
-                                        <img src="../static/img/rank/girl.png" class="sex" v-if="hero.sex == 2"/>
+                                    <li v-for="(hero,i) in Rs.Result">
+                                        <img :id="'circle_'+i"
+                                             v-bind:src="hero.Head" alt="">
+                                        <img src="../static/img/rank/boy.png" class="sex" v-if="hero.Sex == 1"/>
+                                        <img src="../static/img/rank/girl.png" class="sex" v-if="hero.Sex == 2"/>
                                         <div>
-                                            <em :id="'red_'+i">No.{{i+1}}</em> {{ hero.userName }}
+                                            <em :id="'red_'+i">No.{{i+1}}</em> {{ hero.UserName }}
                                         </div>
-                                        <span>{{ hero.calorie }} 千卡</span>
+                                        <span>{{ hero.Values }} {{hero.Unite}}</span>
                                     </li>
                                 </ul>
                             </div>
@@ -64,12 +62,12 @@
             <div class="rt">
                 <el-carousel :interval="15000" height="610px">
                     <el-carousel-item v-for="Rs in rt">
-                        <h5>{{Rs.title}}</h5>
+                        <h5>{{Rs.Title}}</h5>
                         <ul>
-                            <li v-for="s in Rs.students">
-                                <img v-bind:src="require('../static/img/people/' + s.head)" alt="">
-                                <em>{{s.name}}</em>
-                                <s>{{s.ck}}</s>
+                            <li v-for="s in Rs.Result">
+                                <img v-bind:src="s.Head" alt="">
+                                <em>{{s.UserName}}</em>
+                                <s>{{s.Values}}</s>
                             </li>
                         </ul>
                     </el-carousel-item>
@@ -81,46 +79,42 @@
 
 <script>
     import Headside from '@/components/Headside'
-    import {getHello, getClassStat} from '@/api/getApiRes'
+    import {
+        getHello,
+        getClassStat,
+        HerosRankingQuery,
+        CalorieStatsQuery,
+        UserRankingQuery
+    } from '@/api/getApiRes'
     import '../libs/rem';
 
     let qs = require('qs');
     export default {
         data() {
             return {
-                trueDate: false,//真实数据 true false
+                trueDate: true,//真实数据 true false
                 fakeNums: 8,//
                 unite: '卡路里',
                 topMsg: '',
                 students: [],
                 studentsLimit: [],
                 showType: 2,//1 单人
-                recordMain:[
-                    {title:'本周场馆卡路里总消耗',Result:'1234',Unite:'千卡'},
-                    {title:'本月场馆卡路里总消耗',Result:'12345',Unite:'千卡'},
+                recordMain: [
+                    // {title: '本周场馆卡路里总消耗', Result: '1234', Unite: '千卡'},
+                    // {title: '本月场馆卡路里总消耗', Result: '12345', Unite: '千卡'},
                 ],
-                bottom:[
-                    {
-                        title:'单次CK值(新个人记录)',
-                        students:this.fakeNewsLimit(),
-                        style:'topOne'
-                    },
-                    {
-                        title:'本周卡路里消耗英雄榜',
-                        students:this.fakeNewsLimit(),
-                        style:'heros'
-                    },
+                bottom: {},
+                rt: [
+                    // {
+                    //     title: '月度CK值排行',
+                    //     students: this.fakeNews(),
+                    // },
+                    // {
+                    //     title: '月度卡路里值排行',
+                    //     students: this.fakeNews(),
+                    // }
                 ],
-                rt:[
-                    {
-                        title:'月度CK值排行',
-                        students:this.fakeNews(),
-                    },
-                    {
-                        title:'月度卡路里值排行',
-                        students:this.fakeNews(),
-                    }
-                ]
+
             }
         },
         mounted() {
@@ -128,11 +122,64 @@
                 this.timer = setInterval(() => {
                     // this.GetgetUserList();
                     this.curgetClassStat();
+                    this.GetHerosRankingQuery();
+                    this.GetCalorieStatsQuery();
+                    this.GetUserRankingQuery();
                 }, 1000);
             } else {
                 this.students = this.fakeNews();
                 this.studentsLimit = this.fakeNewsLimit();
                 this.topMsg = this.students[0];
+                this.bottom = {
+                    "Code": 0,
+                    "Memo": "执行成功",
+                    "Rs": [
+                        {
+                            "Title": "本周消耗卡路里英雄榜",
+                            "Style": "heros",
+                            "Result": [
+                                {
+                                    "UserName": "段长鹏",
+                                    "Sex": 1,
+                                    "Head": "http://192.168.0.2/dcp.png",
+                                    "Values": "474429139",
+                                    "Unite": "千卡",
+                                    "Message": ""
+                                },
+                                {
+                                    "UserName": "贾雨奇",
+                                    "Sex": 1,
+                                    "Head": "http://192.168.0.2/jyq.png",
+                                    "Values": "403801124",
+                                    "Unite": "千卡",
+                                    "Message": ""
+                                },
+                                {
+                                    "UserName": "郑伟",
+                                    "Sex": 1,
+                                    "Head": "http://192.168.0.2/zw.png",
+                                    "Values": "229037891",
+                                    "Unite": "千卡",
+                                    "Message": ""
+                                }
+                            ]
+                        },
+                        {
+                            "Title": "单次CK值(新个人记录)",
+                            "Style": "tops",
+                            "Result": [
+                                {
+                                    "UserName": "郑伟",
+                                    "Sex": 1,
+                                    "Head": "http://192.168.0.2/zw.png",
+                                    "Values": "102200",
+                                    "Unite": "",
+                                    "Message": "打破了历史记录100000"
+                                }
+                            ]
+                        }
+                    ]
+                }
             }
         },
         methods: {
@@ -197,6 +244,53 @@
                     }
                 })
             },
+            GetHerosRankingQuery() {
+                let that = this;
+                let param = {
+                    eqSn: '30:9C:23:0C:8B:1E',
+                    dispNum: 3
+                };
+                let postdata = qs.stringify(param);
+                HerosRankingQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.bottom = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            GetUserRankingQuery() {
+                let that = this;
+                let param = {
+                    eqSn: '30:9C:23:0C:8B:1E',
+                    dispNum: 7
+                };
+                let postdata = qs.stringify(param);
+                UserRankingQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.rt = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            GetCalorieStatsQuery() {
+                let that = this;
+                let param = {
+                    eqSn: '30:9C:23:0C:8B:1E',
+                };
+                let postdata = qs.stringify(param);
+                CalorieStatsQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.recordMain = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             curgetClassStat() {
                 let that = this;
                 let param = {
@@ -208,7 +302,7 @@
                     if (json.Code == 0) {
                         // 上课了
                         if (json.ClassOn) {
-                            that.$router.push({path: '/'});
+                            // that.$router.push({path: '/'});
                         }
                     } else {
                         // that.$message.error(json.Memo);
@@ -221,8 +315,10 @@
                 if (val.path == '/rank') {
                     if (this.trueDate) {
                         this.timer = setInterval(() => {
-                            // this.GetgetUserList();
                             this.curgetClassStat();
+                            this.GetHerosRankingQuery();
+                            this.GetCalorieStatsQuery();
+                            this.GetUserRankingQuery();
                         }, 1000);
                     } else {
                         this.students = this.fakeNews();
@@ -285,7 +381,7 @@
 
     .rankContainer .sum {
         position: relative;
-        top: -0.4rem;
+        top: 0.4rem;
         width: 100%;
         height: 35%;
         overflow: visible;
@@ -297,7 +393,7 @@
 
     .sumBg {
         position: relative;
-        bottom: 2.3rem;
+        bottom: 0.8rem;
         width: 100%;
         height: 2rem;
         overflow: hidden;
@@ -313,7 +409,7 @@
         font-weight: 900;
         font-family: Roboto;
         font-weight: 900;
-        font-size: 3rem;
+        font-size: 2rem;
         text-align: right;
         color: #fff;
         font-style: normal;

+ 9 - 2
tv/vue.config.js

@@ -19,13 +19,20 @@ module.exports = {
         proxy: {
             '/api': {
                 // target: 'http://192.168.0.162:9000/',//PC的
-                // target: 'http://192.168.0.110:8080',//公司公用的
+                target: 'http://192.168.0.110:8080',//公司公用的
                 // target: 'http://192.168.0.243:9000/',//郑伟机器的
-                target: ' http://192.168.0.222:9000/',//redmi的
+                // target: ' http://192.168.0.222:9000/',//redmi的
                 changeOrigin: true,
                 pathRewrite: {
                     '^/api': '',
                 }
+            },
+            '/bpi': {
+                target: 'http://192.168.0.236:19096',//公司公用的
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/bpi': '',
+                }
             }
         }
     },

Някои файлове не бяха показани, защото твърде много файлове са промени