Kaynağa Gözat

1. new bg
2.class finish api used

Changpeng Duan 5 yıl önce
ebeveyn
işleme
f314cceae7

+ 87 - 86
tv/.idea/workspace.xml

@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="BookmarkManager">
+    <bookmark url="file://$PROJECT_DIR$/src/api/getApiRes.js" line="64" />
+  </component>
   <component name="BranchesTreeState">
     <expand>
       <path>
@@ -20,15 +23,19 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
-      <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 afterPath="$PROJECT_DIR$/src/static/img/bg/bg_2.png" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/bg/bg_3.png" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/people/flyhead.png" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/people/flyhead.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/static/img/people/flyhead2.png" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/Global.js" 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/static/img/mainBg.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/static/img/bg/bg_1.png" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/static/img/people.zip" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/static/img/rankBg.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/static/img/bg/bg_4.png" 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/" />
@@ -40,35 +47,34 @@
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
   <component name="FileEditorManager">
-    <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+    <leaf>
+      <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="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 relative-caret-position="527">
+              <caret line="337" column="59" selection-start-line="337" selection-start-column="59" selection-end-line="337" selection-end-column="59" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+        <entry file="file://$PROJECT_DIR$/src/views/Rank.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 relative-caret-position="46">
+              <caret line="43" column="22" lean-forward="true" selection-start-line="43" selection-start-column="22" selection-end-line="43" selection-end-column="22" />
+              <folding>
+                <element signature="e#6203#8284#0" />
+                <element signature="e#7964#8283#0" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
           <provider selected="true" editor-type-id="text-editor">
-            <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" />
+            <state relative-caret-position="1034">
+              <caret line="76" column="32" lean-forward="true" selection-start-line="76" selection-start-column="32" selection-end-line="76" selection-end-column="32" />
               <folding>
                 <element signature="e#0#26#0" expanded="true" />
               </folding>
@@ -90,18 +96,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>.name</find>
-      <find>move</find>
-      <find>slowJump</find>
-      <find>bottomLi img</find>
-      <find>six</find>
-      <find>.ten</find>
-      <find>cube</find>
-      <find>.levelIcon li em</find>
-      <find>.levelIcon li span</find>
-      <find>.levelIcon li span div</find>
-      <find>png</find>
-      <find>static/img/</find>
       <find>box-shadow</find>
       <find>twelve</find>
       <find>heart</find>
@@ -120,6 +114,18 @@
       <find>GetgetUserList</find>
       <find>timer2</find>
       <find>GetUserRankingQuery</find>
+      <find>bg</find>
+      <find>.sum em</find>
+      <find>rank</find>
+      <find>pages</find>
+      <find>trueDate</find>
+      <find>pageStyle</find>
+      <find>IndexContainer</find>
+      <find>this.rt</find>
+      <find>push</find>
+      <find>contentStyleObj</find>
+      <find>headImg</find>
+      <find>bottom</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
@@ -147,9 +153,10 @@
         <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/Global.js" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
         <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>
@@ -160,10 +167,10 @@
     <auto-save>true</auto-save>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-2292" />
-    <option name="y" value="179" />
-    <option name="width" value="2576" />
-    <option name="height" value="1456" />
+    <option name="x" value="-2568" />
+    <option name="y" value="-8" />
+    <option name="width" value="1294" />
+    <option name="height" value="696" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
@@ -199,12 +206,6 @@
               <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" />
@@ -230,21 +231,7 @@
               <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" />
+              <item name="people" type="462c0819:PsiDirectoryNode" />
             </path>
           </expand>
           <select />
@@ -277,13 +264,14 @@
   </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\bg" />
+      <recent name="D:\wwwroot\flyLong\tv\src\static\img\newRecord" />
       <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\pk" />
     </key>
     <key name="MoveFile.RECENT_KEYS">
+      <recent name="D:\wwwroot\flyLong\tv\src\static\img\bg" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img" />
     </key>
   </component>
@@ -345,7 +333,7 @@
       <workItem from="1604539672735" duration="79000" />
       <workItem from="1604540536502" duration="646000" />
       <workItem from="1604541901536" duration="160559000" />
-      <workItem from="1605406240238" duration="26421000" />
+      <workItem from="1605406240238" duration="31876000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -354,11 +342,18 @@
       <option name="project" value="LOCAL" />
       <updated>1605431368250</updated>
     </task>
-    <option name="localTasksCounter" value="2" />
+    <task id="LOCAL-00002" summary="test web">
+      <created>1605450969908</created>
+      <option name="number" value="00002" />
+      <option name="presentableId" value="LOCAL-00002" />
+      <option name="project" value="LOCAL" />
+      <updated>1605450969908</updated>
+    </task>
+    <option name="localTasksCounter" value="3" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="187626000" />
+    <option name="totallyTimeSpent" value="193081000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-2568" y="-8" width="2576" height="1395" extended-state="6" />
@@ -475,9 +470,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/Global.js">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/Mock/index.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-415">
@@ -607,13 +599,6 @@
     <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="693">
@@ -631,31 +616,47 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/Global.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1013">
+          <caret line="387" column="47" selection-start-line="387" selection-start-column="47" selection-end-line="387" selection-end-column="47" />
+        </state>
+      </provider>
+    </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$/src/static/img/people/flyhead.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
     <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 relative-caret-position="527">
+          <caret line="337" column="59" selection-start-line="337" selection-start-column="59" selection-end-line="337" selection-end-column="59" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
+    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <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" />
+        <state relative-caret-position="46">
+          <caret line="43" column="22" lean-forward="true" selection-start-line="43" selection-start-column="22" selection-end-line="43" selection-end-column="22" />
           <folding>
-            <element signature="e#0#26#0" expanded="true" />
+            <element signature="e#6203#8284#0" />
+            <element signature="e#7964#8283#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+    <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
       <provider selected="true" editor-type-id="text-editor">
-        <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" />
+        <state relative-caret-position="1034">
+          <caret line="76" column="32" lean-forward="true" selection-start-line="76" selection-start-column="32" selection-end-line="76" selection-end-column="32" />
           <folding>
-            <element signature="e#4157#4201#0" expanded="true" />
-            <element signature="e#5654#7848#0" />
-            <element signature="e#8303#8851#0" />
+            <element signature="e#0#26#0" expanded="true" />
           </folding>
         </state>
       </provider>

+ 26 - 19
tv/src/Global.js

@@ -60,8 +60,8 @@ getHoursAndMin = function (datetime) {
 getHoursAndMinAndSec = function () {
     let date = new Date();
     h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
-    m = date.getMinutes() < 10 ? '0' + date.getMinutes()  + ':': date.getMinutes() + ':';
-    s =  date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+    m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
+    s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
     return h + m + s;
 }
 
@@ -163,21 +163,21 @@ getNowDate = function () {
 globalcurrentWeek = function () {
     let weeks = new Date().getDay();
     let d = new Date().getDate();
-    return getNowDate() + ' ' + numberToWeekdays(weeks) + ' 第'+ getWeekOfYear() + '周';
+    return getNowDate() + ' ' + numberToWeekdays(weeks) + ' 第' + getWeekOfYear() + '周';
 }
 
- getWeekOfYear = function (){
+getWeekOfYear = function () {
     var today = new Date();
-    var firstDay = new Date(today.getFullYear(),0, 1);
+    var firstDay = new Date(today.getFullYear(), 0, 1);
     var dayOfWeek = firstDay.getDay();
-    var spendDay= 1;
-    if (dayOfWeek !=0) {
-        spendDay=7-dayOfWeek+1;
+    var spendDay = 1;
+    if (dayOfWeek != 0) {
+        spendDay = 7 - dayOfWeek + 1;
     }
-    firstDay = new Date(today.getFullYear(),0, 1+spendDay);
-    var d =Math.ceil((today.valueOf()- firstDay.valueOf())/ 86400000);
-    var result =Math.ceil(d/7);
-    return result+1;
+    firstDay = new Date(today.getFullYear(), 0, 1 + spendDay);
+    var d = Math.ceil((today.valueOf() - firstDay.valueOf()) / 86400000);
+    var result = Math.ceil(d / 7);
+    return result + 1;
 };
 
 // table配置项目
@@ -360,25 +360,32 @@ turnStdToOption = function (data) {
 numberToWeekdays = function (val) {
     switch (parseInt(val)) {
         case 1:
-            return '星期一'
+            return '星期一';
             break;
         case 2:
-            return '星期二'
+            return '星期二';
             break;
         case 3:
-            return '星期三'
+            return '星期三';
             break;
         case 4:
-            return '星期四'
+            return '星期四';
             break;
         case 5:
-            return '星期五'
+            return '星期五';
             break;
         case 6:
-            return '星期六'
+            return '星期六';
             break;
         case 0:
-            return '星期天'
+            return '星期天';
             break;
     }
 }
+
+// 随机背景
+RandomBg = function () {
+    let bgClassNum = parseInt(Math.random() * 3)+1;
+    let bgClass = 'bgStyle' + bgClassNum + '  pages';
+    return bgClass;
+};

+ 20 - 24
tv/src/api/getApiRes.js

@@ -41,44 +41,40 @@ export function getRecordBreak(postdata) {
     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';
+// // 英雄榜和个人破纪录查询
+// 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) {
+export function HerosRankingQuery(postdata) {
     let url = headapi + 'HerosRankingQuery';
     return getApiBasic(url, postdata);
 }
 
 // 卡路里场馆统计(分月度、周统计,TV左上角统计)
-export function CalorieStatsQuery2(postdata) {
+export function CalorieStatsQuery(postdata) {
     let url = headapi + 'CalorieStatsQuery';
     return getApiBasic(url, postdata);
 }
 
 // 用户排名查询(Tv待机页面右侧排名)
-export function UserRankingQuery2(postdata) {
+export function UserRankingQuery(postdata) {
     let url = headapi + 'UserRankingQuery';
     return getApiBasic(url, postdata);
 }

+ 0 - 0
tv/src/static/img/mainBg.png → tv/src/static/img/bg/bg_1.png


BIN
tv/src/static/img/bg/bg_2.png


BIN
tv/src/static/img/bg/bg_3.png


+ 0 - 0
tv/src/static/img/rankBg.png → tv/src/static/img/bg/bg_4.png


BIN
tv/src/static/img/people.zip


BIN
tv/src/static/img/people/flyhead.png


+ 33 - 13
tv/src/views/Main.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="pages">
+    <div :class="pageStyle">
         <Headside></Headside>
         <div class="userList">
             <ul>
@@ -12,7 +12,8 @@
                                 <span class="name">{{ s.Name }}</span>
                                 <!--<img src="../static/img/people/gc.png"/>-->
                                 <!--<img v-bind:src="require('../static/img/people/' + s.head)" alt="">-->
-                                <img :src="s.Head" alt="">
+                                <img :src="s.Head" alt="" v-if="s.Head">
+                                <img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">
                             </div>
                             <div class="cla">
                                 <em v-if="s.activePercent != 0">{{ s.activePercent |fmtNum}}</em>
@@ -27,11 +28,7 @@
                             <!--heartJump-->
                             <div>
                                 <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">-->
-                                        <!--{{ 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"
@@ -127,15 +124,13 @@
     import {getHello, getRecordBreak} from '@/api/getApiRes'
     import newRecord from '@/components/newRecord'
     import '../libs/rem';
-
+    import '../Global'
     let qs = require('qs');
 
     export default {
         data() {
             return {
-                contentStyleObj: {
-                    animation: 'mymove 1s'
-                },
+                pageStyle:RandomBg(),
                 trueDate: true,//真实数据 true false
                 totalTime: 4,
                 times: 1,
@@ -244,7 +239,7 @@
             //       if (totalTime < 0) {
             //         totalTime = 3;
             //         that.serachBtnStatus = false;
-                    that.$router.push({path: '/rank'});
+            //         that.$router.push({path: '/rank'});
             //       }
             //     }
             //     ,
@@ -340,7 +335,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;
@@ -495,12 +490,37 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
+    }
+
+    .bgStyle1 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_1.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+    .bgStyle2 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_2.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+    .bgStyle3 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_3.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+    .bgStyle4 {
         background-color: #028fe1;
-        background: url("../static/img/mainBg.png");
+        background: url("../static/img/bg/bg_4.png");
         background-size: 100%;
         background-repeat: no-repeat;
     }
 
+
     ul, li {
         list-style: none;
         margin: 0;

+ 116 - 71
tv/src/views/Rank.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="rank">
+    <div :class="pageStyle">
         <Headside></Headside>
         <div class="rankContainer">
             <div class="lt">
@@ -27,7 +27,10 @@
                                         <div class="dgCenter">
                                             <div class="dghead">
                                                 <img :id="'circle_'+i"
-                                                     v-bind:src="tops.Head" alt="">
+                                                     v-bind:src="tops.Head" alt="" v-if="tops.Head">
+                                                <img :id="'circle_'+i"
+                                                     v-bind:src="require('../static/img/people/flyhead.png')" alt=""
+                                                     v-if="!tops.Head">
                                                 <s>{{ tops.UserName }}</s>
                                             </div>
                                             <div class="score">
@@ -45,7 +48,9 @@
                                 <ul>
                                     <li v-for="(hero,i) in Rs.Result">
                                         <img :id="'circle_'+i"
-                                             v-bind:src="hero.Head" alt="">
+                                             v-bind:src="hero.Head" alt="" v-if="hero.Head">
+                                        <img :id="'circle_'+i" v-bind:src="require('../static/img/people/flyhead.png')"
+                                             alt="" v-if="!hero.Head">
                                         <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>
@@ -65,7 +70,8 @@
                         <h5>{{Rs.Title}}</h5>
                         <ul>
                             <li v-for="s in Rs.Result">
-                                <img v-bind:src="s.Head" alt="">
+                                <img :src="s.Head" alt="" v-if="s.Head">
+                                <img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">
                                 <em>{{s.UserName}}</em>
                                 <s>{{s.Values}}</s>
                             </li>
@@ -87,11 +93,13 @@
         UserRankingQuery
     } from '@/api/getApiRes'
     import '../libs/rem';
+    import '../Global'
 
     let qs = require('qs');
     export default {
         data() {
             return {
+                pageStyle: RandomBg(),
                 trueDate: true,//真实数据 true false
                 fakeNums: 8,//
                 unite: '卡路里',
@@ -99,21 +107,9 @@
                 students: [],
                 studentsLimit: [],
                 showType: 2,//1 单人
-                recordMain: [
-                    // {title: '本周场馆卡路里总消耗', Result: '1234', Unite: '千卡'},
-                    // {title: '本月场馆卡路里总消耗', Result: '12345', Unite: '千卡'},
-                ],
+                recordMain: [],
                 bottom: {},
-                rt: [
-                    // {
-                    //     title: '月度CK值排行',
-                    //     students: this.fakeNews(),
-                    // },
-                    // {
-                    //     title: '月度卡路里值排行',
-                    //     students: this.fakeNews(),
-                    // }
-                ],
+                rt: [],
 
             }
         },
@@ -130,56 +126,78 @@
                 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"
-                                }
-                            ]
-                        }
-                    ]
-                }
+                this.bottom = [
+                    {
+                        "Title": "本周消耗卡路里英雄榜",
+                        "Style": "heros",
+                        "Result": [
+                            {
+                                "UserName": "段长鹏",
+                                "Sex": 1,
+                                "Head": "",
+                                "Values": "4744",
+                                "Unite": "千卡",
+                                "Message": ""
+                            },
+                            {
+                                "UserName": "贾雨奇",
+                                "Sex": 1,
+                                "Head": "http://192.168.0.2/jyq.png",
+                                "Values": "4034",
+                                "Unite": "千卡",
+                                "Message": ""
+                            },
+                            {
+                                "UserName": "郑伟",
+                                "Sex": 1,
+                                "Head": "http://192.168.0.2/zw.png",
+                                "Values": "2290",
+                                "Unite": "千卡",
+                                "Message": ""
+                            }
+                        ]
+                    },
+                    {
+                        "Title": "单次CK值(新个人记录)",
+                        "Style": "tops",
+                        "Result": [
+                            {
+                                "UserName": "郑伟",
+                                "Sex": 1,
+                                "Head": "",
+                                "Values": "1022",
+                                "Unite": "",
+                                "Message": "打破了历史记录100000"
+                            },
+                            {
+                                "UserName": "郑伟",
+                                "Sex": 1,
+                                "Head": "http://192.168.0.2/zw.png",
+                                "Values": "1020",
+                                "Unite": "",
+                                "Message": "打破了历史记录100000"
+                            }
+                        ]
+                    }
+                ];
+                this.rt = [
+                    {
+                        Title: '月度CK值排行',
+                        Result: this.fakeNews(),
+                    },
+                    {
+                        Title: '月度卡路里值排行',
+                        Result: this.fakeNews(),
+                    }
+                ];
+                this.recordMain = [
+                    {
+                        Title:'本周场馆卡路里总消耗',
+                        Result: '1234',
+                        Unite: '千卡'
+                    }
+                ]
+
             }
         },
         methods: {
@@ -302,7 +320,7 @@
                     if (json.Code == 0) {
                         // 上课了
                         if (json.ClassOn) {
-                            // that.$router.push({path: '/'});
+                            that.$router.push({path: '/'});
                         }
                     } else {
                         // that.$message.error(json.Memo);
@@ -336,7 +354,8 @@
 </script>
 
 <style scoped>
-    .rank {
+
+    .pages {
         position: absolute;
         top: 0;
         left: 0;
@@ -346,11 +365,37 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        background: url("../static/img/rankBg.png");
+    }
+
+    .bgStyle1 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_1.png");
         background-size: 100%;
         background-repeat: no-repeat;
     }
 
+    .bgStyle2 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_2.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+    .bgStyle3 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_3.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+    .bgStyle4 {
+        background-color: #028fe1;
+        background: url("../static/img/bg/bg_4.png");
+        background-size: 100%;
+        background-repeat: no-repeat;
+    }
+
+
     .rankContainer {
         width: 90%;
         height: 100%;