Просмотр исходного кода

<s> 29.首页界面和内页都给课程增加关课按钮 </s>
3.PC端网络不好无法退出 √
PC端 左侧拉不动 √
PC端 适配窄屏幕 √
<s> 4.课程管理每次打开加入学生,没清理穿梭框 <s>

Changpeng Duan 5 лет назад
Родитель
Сommit
0fc65d28da

+ 1 - 1
app/src/page/appoint.vue

@@ -670,7 +670,7 @@
         }
 
         .context {
-            top: 34%;
+            top: 40%;
         }
     }
 

+ 344 - 323
app/src/page/mainpage.vue

@@ -1,332 +1,345 @@
 <template>
-  <div id="mainPage">
-    <img class="banner" src="../static/images/main/banner.png"/>
-    <span class="shopNum">
+    <div id="mainPage">
+        <img class="banner" src="../static/images/main/banner.png"/>
+        <span class="shopNum">
             俱乐部场馆共 {{ list.length }} 处
         </span>
-    <ul class="list">
-      <li v-for="l in list" @click="goAppoint(l)" v-if="l.Status == 1 ">
-        <img src="../static/images/main/shop2.jpg" width="130px" v-if="l.ShopID == 3"/>
-        <img src="../static/images/main/shop.jpg" width="130px" v-if="l.ShopID == 4"/>
-        <img src="../static/images/main/shop3.png" width="130px" v-if="l.ShopID == 5"/>
-        <div class="rt">
-          <h5>{{ l.ShopName.substr(0,5)}}</h5>
-          <h4>{{ l.ShopName.substr(5,12) }}</h4>
-          <span>今日预约名额剩余
+        <ul class="list">
+            <li v-for="l in list" @click="goAppoint(l)" v-if="parseInt(l.Status) == 1">
+                <div class="lt">
+                    <img src="../static/images/main/shop2.jpg" width="100%" height="100%" v-show="parseInt(l.ShopID) == 3"/>
+                    <img src="../static/images/main/shop.jpg" width="100%" height="100%" v-show="parseInt(l.ShopID) == 4"/>
+                    <img src="../static/images/main/shop3.png" width="100%" height="100%" v-show="parseInt(l.ShopID) == 5"/>
+                </div>
+                <div class="rt">
+                    <h5>{{ l.ShopName.substr(0,5)}}</h5>
+                    <h4 style="color: #F8BD00" v-if="l.ShopID == 3">{{ l.ShopName.substr(5,12) }}</h4>
+                    <h4 style="color: #B50080" v-if="l.ShopID == 4">{{ l.ShopName.substr(5,12) }}</h4>
+                    <h4 style="color: #6EB82C" v-if="l.ShopID == 5">{{ l.ShopName.substr(5,12) }}</h4>
+                    <span>今日预约名额剩余
               <i v-if="l.RemainOrdernum > 0">{{ l.RemainOrdernum }}</i>
               <i v-if="l.RemainOrdernum == 0" class="red">{{ l.RemainOrdernum }}</i>
               人</span>
-          <span>地址:{{ l.Addr }}</span>
-          <em class="green" v-if="l.WxStatus == 1 && l.IsJoin ==1">点击预约</em>
-          <em class="red" v-else>不可预约</em>
-        </div>
-      </li>
-      <div class="tips" v-if="list == ''">
-        <p style="text-align: center">
-          暂无可预约的门店
-        </p>
-      </div>
-    </ul>
-    <bottomTab :curTab="thisTab"></bottomTab>
-    <alert ref="alertPart"></alert>
-  </div>
+                    <span>地址:{{ l.Addr }}</span>
+                    <em class="green" v-if="l.WxStatus == 1 && l.IsJoin ==1">点击预约</em>
+                    <em class="red" v-else>不可预约</em>
+                </div>
+            </li>
+            <div class="tips" v-if="list == ''">
+                <p style="text-align: center">
+                    暂无可预约的门店
+                </p>
+            </div>
+        </ul>
+        <bottomTab :curTab="thisTab"></bottomTab>
+        <alert ref="alertPart"></alert>
+    </div>
 </template>
 
 <script>
-import {
-  ManagerSelfQuery,
-  OrderShopQuery,
-} from '../api/getApiRes.js'
-
-import bottomTab from '../components/bottomTab'
-import alert from '../components/alert'
-import axios from 'axios';
-
-let qs = require('qs');
-import Global from '../Global.js'
-
-export default {
-  data() {
-    return {
-      thisTab: '预约课程',
-      shopNum: 0,
-      recordNum: 0,
-      Dannum: 0,
-      GetHotelCounts: 0,
-      GetDetectorNum: 0,
-      currShopId: 0,
-      list: [],
-    }
-  },
-  mounted() {
-    this.getManagerSelfQuery();
-  },
-  destroyed() {
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'main') {
-        this.getList();
-      }
-    },
-    'active'() {
-      this.getList();
-    }
-  },
-  methods: {
-    alertInfo(info) {
-      this.$refs.alertPart.openSimpleDialog(info);
-    },
-    getManagerSelfQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ManagerSelfQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          this.currShopId = json.Rs.ShopId;
-          this.getList();
-        } else {
-          that.alertInfo(json.Memo);
-          if (json.Code == 1010) {
-            localStorage.clear();
-            console.log(1010);
-            that.$router.push({path: '/login'});
-          }
-        }
-      })
-    },
-    getList() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      OrderShopQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.list = json.Rs;
-          if (that.list) {
-            that.shopNum = json.Rs.length;
-          }
-        } else {
-          that.alertInfo(json.Memo);
-          // 权限失效后,删掉本地token
-          if (json.Code == 1004) {
-            localStorage.clear();
-            console.log(1010);
-            this.$router.push({path: '/login'});
-          }
+    import {
+        ManagerSelfQuery,
+        OrderShopQuery,
+    } from '../api/getApiRes.js'
+
+    import bottomTab from '../components/bottomTab'
+    import alert from '../components/alert'
+    import axios from 'axios';
+
+    let qs = require('qs');
+    import Global from '../Global.js'
+
+    export default {
+        data() {
+            return {
+                thisTab: '预约课程',
+                shopNum: 0,
+                recordNum: 0,
+                Dannum: 0,
+                GetHotelCounts: 0,
+                GetDetectorNum: 0,
+                currShopId: 0,
+                list: [],
+            }
+        },
+        mounted() {
+            this.getManagerSelfQuery();
+            // this.alertInfo(document.body.clientWidth)
+        },
+        destroyed() {
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'main') {
+                    this.getList();
+                }
+            },
+            'active'() {
+                this.getList();
+            }
+        },
+        methods: {
+            alertInfo(info) {
+                this.$refs.alertPart.openSimpleDialog(info);
+            },
+            getManagerSelfQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ManagerSelfQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.currShopId = json.Rs.ShopId;
+                        this.getList();
+                    } else {
+                        that.alertInfo(json.Memo);
+                        if (json.Code == 1010) {
+                            localStorage.clear();
+                            console.log(1010);
+                            that.$router.push({path: '/login'});
+                        }
+                    }
+                })
+            },
+            getList() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                OrderShopQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.list = json.Rs;
+                        if (that.list) {
+                            that.shopNum = json.Rs.length;
+                        }
+                    } else {
+                        that.alertInfo(json.Memo);
+                        // 权限失效后,删掉本地token
+                        if (json.Code == 1004) {
+                            localStorage.clear();
+                            console.log(1010);
+                            this.$router.push({path: '/login'});
+                        }
+                    }
+                })
+            },
+            onGoNewPage(path) {
+                this.$router.push({path: '/' + path});
+            },
+            goPage(pages) {
+                this.$router.push({path: pages});
+            },
+            goAppoint(row) {
+                let that = this;
+                if (row.IsJoin == 0) {
+                    that.alertInfo('您不是该店会员,不可预约');
+                    return false
+                }
+                if (row.Status == 2) {
+                    that.alertInfo(row.name + '不可预约');
+                    return false
+                } else {
+                    this.$router.push({
+                        path: '/appoint', query: {
+                            shopId: row.ShopID
+                        }
+                    });
+                }
+            }
+        },
+        beforeRouteEnter(to, from, next) {
+            next(vm => {
+                //因为当钩子执行前,组件实例还没被创建
+                // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
+                if (to.name == '') {
+                    vm.getList();
+                }
+            });
+        },
+        components: {
+            bottomTab, alert
         }
-      })
-    },
-    onGoNewPage(path) {
-      this.$router.push({path: '/' + path});
-    },
-    goPage(pages) {
-      this.$router.push({path: pages});
-    },
-    goAppoint(row) {
-      let that = this;
-      if (row.IsJoin == 0) {
-        that.alertInfo('您不是该店会员,不可预约');
-        return false
-      }
-      if (row.Status == 2) {
-        that.alertInfo(row.name + '不可预约');
-        return false
-      } else {
-        this.$router.push({
-          path: '/appoint', query: {
-            shopId: row.ShopID
-          }
-        });
-      }
     }
-  },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //因为当钩子执行前,组件实例还没被创建
-      // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
-      if (to.name == '') {
-        vm.getList();
-      }
-    });
-  },
-  components: {
-    bottomTab, alert
-  }
-}
 </script>
 
 <style scoped>
-#mainPage {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #f2f2f2;
-  overflow-y: scroll;
-}
-#mainPage .banner {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
-
-.goPage {
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #fff;
-  height: 50px;
-  line-height: 50px;
-  padding: 0 20px;
-  color: #333;
-  font-size: 18px;
-  border-bottom: 1px solid #f2f2f2;
-}
-
-.goPage span {
-  float: left;
-}
-
-.goPage i {
-  float: right;
-  margin-top: 12px;
-}
-
-.goPage img {
-  overflow: hidden;
-  display: block;
-  width: 8px;
-  height: 14px;
-  float: right;
-  margin-top: 16px;
-  margin-right: 10px;
-}
-
-.goTitle i {
-  margin-top: 10px;
-  float: right;
-}
-
-.mapContainer {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  max-height: 317px;
-}
-
-.shopNum {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 14px;
-  color: #909090;
-  text-align: center;
-}
-
-.list {
-  width: 98%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-left: 1%;
-  padding-right: 1%;
-  margin-top: 10px;
-  padding-bottom: 40px;
-}
-
-.list li {
-  width: 100%;
-  background: transparent;
-  margin-bottom: 20px;
-  border-radius: 13px;
-  background: #fff;
-  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
-  overflow: hidden;
-}
-
-.list img {
-  height: 100%;
-  float: left;
-}
-
-.list .rt {
-  width: 65%;
-  float: left;
-  padding-left: 15px;
-}
-
-.list .rt h5 {
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 16px;
-  text-align: left;
-  color: #3b3b3b;
-  margin: 0;
-  margin-top: 3px;
-  margin-bottom: 0px;
-}
-.list .rt h4 {
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 16px;
-  text-align: left;
-  color: #3b3b3b;
-  margin: 0;
-  margin-top: 0px;
-  margin-bottom: 1px;
-}
-
-.list .rt span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 12px;
-  text-align: left;
-  color: #909090;
-}
-
-.list .rt em {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 16px;
-  padding-right: 1px;
-  margin-top: 5px;
-  float: right;
-  text-align: right;
-}
-
-.list .rt em.green {
-  color: #37cb00;
-}
-
-.list .rt em.red {
-  color: #F8847F;
-}
-
-.red {
-  color: #F8847F;
-}
-
-/*响应式调整*/
+    #mainPage {
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #f2f2f2;
+        overflow-y: scroll;
+    }
+
+    #mainPage .banner {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .goPage {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #fff;
+        height: 50px;
+        line-height: 50px;
+        padding: 0 20px;
+        color: #333;
+        font-size: 18px;
+        border-bottom: 1px solid #f2f2f2;
+    }
+
+    .goPage span {
+        float: left;
+    }
+
+    .goPage i {
+        float: right;
+        margin-top: 12px;
+    }
+
+    .goPage img {
+        overflow: hidden;
+        display: block;
+        width: 8px;
+        height: 14px;
+        float: right;
+        margin-top: 16px;
+        margin-right: 10px;
+    }
+
+    .goTitle i {
+        margin-top: 10px;
+        float: right;
+    }
+
+    .mapContainer {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        max-height: 317px;
+    }
+
+    .shopNum {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 14px;
+        color: #909090;
+        text-align: center;
+    }
+
+    .list {
+        width: 98%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-left: 1%;
+        padding-right: 1%;
+        margin-top: 10px;
+        padding-bottom: 40px;
+    }
+
+    .list li {
+        width: 100%;
+        background: transparent;
+        margin-bottom: 20px;
+        border-radius: 13px;
+        background: #fff;
+        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+        overflow: hidden;
+    }
+
+    .list img {
+        height: 100%;
+        float: left;
+    }
+    .list .lt {
+        width: 33%;
+        height: 100%;
+        overflow: hidden;
+        float: left;
+    }
+
+    .list .rt {
+        /*width: 65%;*/
+        float: left;
+        padding-left: 15px;
+    }
+
+    .list .rt h5 {
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 16px;
+        text-align: left;
+        color: #3b3b3b;
+        margin: 0;
+        margin-top: 3px;
+        margin-bottom: 0px;
+    }
+
+    .list .rt h4 {
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 16px;
+        text-align: left;
+        color: #3b3b3b;
+        margin: 0;
+        margin-top: 0px;
+        margin-bottom: 1px;
+    }
+
+    .list .rt span {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 12px;
+        text-align: left;
+        color: #909090;
+    }
+
+    .list .rt em {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 16px;
+        padding-right: 1px;
+        margin-top: 5px;
+        float: right;
+        text-align: right;
+    }
+
+    .list .rt em.green {
+        color: #37cb00;
+    }
+
+    .list .rt em.red {
+        color: #F8847F;
+    }
+
+    .red {
+        color: #F8847F;
+    }
+
+    /*响应式调整*/
     @media only screen and (max-width: 320px) {
         .list .rt {
             width: 50%;
@@ -336,7 +349,8 @@ export default {
             font-size: 14px;
         }
     }
-    @media(min-width:321px) and (max-width: 344px) {
+
+    @media (min-width: 321px) and (max-width: 344px) {
         .list .rt {
             width: 50%;
         }
@@ -345,32 +359,39 @@ export default {
             font-size: 14px;
         }
     }
-    @media(min-width:345px) and (max-width: 360px) {
+
+    @media (min-width: 345px) and (max-width: 360px) {
         .list .rt {
             width: 57%;
         }
     }
-    @media(min-width:361px) and (max-width: 375px) {
+
+    @media (min-width: 361px) and (max-width: 375px) {
         .list .rt {
-            width: 61%;
+            width: 60%;
+            /*background-color: red;*/
         }
     }
-    @media (min-width:376px) and (max-width: 396px) {
+
+    @media (min-width: 376px) and (max-width: 396px) {
         .list .rt {
             width: 61%;
         }
     }
-    @media (min-width:397px) and (max-width: 414px) {
+
+    @media (min-width: 397px) and (max-width: 414px) {
         .list .rt {
             width: 61%;
         }
     }
-    @media(min-width:415px) and (max-width: 480px) {
+
+    @media (min-width: 415px) and (max-width: 480px) {
         .list .rt {
             width: 61%;
         }
     }
-    @media (min-width:481px) and (max-width: 640px) {
+
+    @media (min-width: 481px) and (max-width: 640px) {
 
     }
 

+ 2 - 1
pc/src/components/Headside.vue

@@ -135,6 +135,7 @@
                     type: 'warning'
                 }).then(() => {
                     let that = this;
+                    that.$router.push({path: '/login', query: {status: 1}});
                     let param = {
                     token: localStorage.token,
                     };
@@ -143,7 +144,7 @@
                         let json = res;
                         if (json.Code == 0) {
                             localStorage.clear();
-                            that.$router.push({path: '/login', query: {status: 1}});
+                            // that.$router.push({path: '/login', query: {status: 1}});
                             that.$message({
                                 showClose: true,
                                 message: '当前用户已退出登陆!',

+ 11 - 6
pc/src/components/Navside.vue

@@ -347,13 +347,16 @@
             margin-left: 5px;
             line-height: 20px;
             font-size: 12px;
+            height: 30px;
+            line-height: 30px;
         }
         .el-menu-item i {
-            left: 20px;
-            padding: 0;
-            margin: 0;
-            float: left;
-            line-height: 20px;
+            /*left: 20px;*/
+            /*padding: 0;*/
+            /*margin: 0;*/
+            /*float: left;*/
+            /*line-height: 20px;*/
+            display: none;
         }
         .userContainer em {
             width: 100%;
@@ -372,11 +375,13 @@
         }
 
         .userContainer span {
+
             font-size: 12px;
         }
 
         .el-menu-item, .el-submenu__title {
-            height: 40px;
+            height: 30px;
+            line-height: 30px;
         }
     }
 

+ 5 - 0
pc/src/views/Index.vue

@@ -218,6 +218,10 @@
             width: 20px;
             padding: 3px;
         }
+        .el-transfer .el-transfer__buttons {
+            width: 60px;
+            padding: 3px;
+        }
         .el-transfer .el-button + .el-button {
             float: right;
         }
@@ -245,6 +249,7 @@
             position: absolute;
             top: 70px;
             bottom: 20px;
+            width: 960px;
             padding: 3px;
             padding-bottom: 60px;
             overflow-y: scroll;

+ 1 - 1
pc/src/views/courseEdit.vue

@@ -211,7 +211,7 @@
           @current-change="pageChange"
       ></el-pagination>
     </div>
-    <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="650px">
+    <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="720px">
       <div class="dialogContent viplist">
         <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
         <div>

+ 93 - 29
tv/src/Mock/index.js

@@ -31,7 +31,7 @@ let testTable = function () {
         {id: 1, name: '霍元甲', userCode: '15253135600', vipType: 1},
         {id: 2, name: '陈真', userCode: '15253135602', vipType: 2},
         {id: 3, name: '成龙', userCode: '15253135604', vipType: 1},
-    ]
+    ];
 
     for (var i = 0; i < 6; i++) {
         item.push({
@@ -118,14 +118,14 @@ let getUserList = function () {
 
 let testStudent = function (num, team) {
     let item = [];
-    let group = team == 2 ? "@integer(1, 2)":"@integer(1, 3)";
+    let group = team == 2 ? "@integer(1, 2)" : "@integer(1, 3)";
     for (var i = 0; i < num; i++) {
         item.push({
             Age: 13,
             AvgHr: 0,
             BeginTime: 1608188579,
-            Ck: "@integer(1, 99)",
-            Cle: 0.10189043977055452,
+            Ck: "@float(1,99,0,1)",
+            Cle: "@float(1,9999,0,1)",
             DuId: 119,
             EndTime: 0,
             GroupNo: group,
@@ -136,22 +136,22 @@ let testStudent = function (num, team) {
             IsBreaking: 0,
             IsNewUser: 0,
             MaxHr: 80,
-            Name: "测试人",
+            Name: "@cname",
             PkSucessnum: 2,
             PkTotalnum: 6,
             PlanId: 60,
-            PureCalorieNoVo2: 0.046890439770554515,
+            PureCalorieNoVo2: "@integer(1, 999)",
             Sex: 1,
             Sn: "22735",
             StaticHr: 60,
-            Steps: 0,
+            Steps: "@float(1,9999,0,1)",
             SvId: 20,
             UserId: 104,
             UserMd5: "55661a861f8fae20dd505b2b4575dc0e",
             Weight: 50,
-            activePercent: 14,
+            activePercent: "@integer(1, 200)",
             bmrMSjRmrcb: 66.00000000000001,
-            formatCk: 0,
+            formatCk: "@integer(1, 999)",
             isAlive: true,
             isFinish: false,
             isOver: false,
@@ -159,8 +159,8 @@ let testStudent = function (num, team) {
             lastPushDataTime: 1608188947175,
             lastUpdateTime: 1608188945184,
             queuePushData: [],
-            realHr: 80,
-            vo2Max: 0
+            realHr: "@integer(1, 200)",
+            vo2Max: "@float(1,9999,0,1)"
         })
     }
 
@@ -227,11 +227,11 @@ let CalorieStatsQuery = function () {
     let Rs = [
         {
             Title: '本<s>周</s>场馆卡路里总消耗',
-            Result: [{'Values': "@integer(888888, 1)", Unite: '千卡'}],
+            Result: [{'Values': "@integer(1, 999999)", Unite: '千卡'}],
         },
         {
             Title: '本<s>周</s>场馆卡路里总消耗',
-            Result: [{'Values': "@integer(888888, 1)", Unite: '千卡'}],
+            Result: [{'Values': "@integer(1, 888888)", Unite: '千卡'}],
         }
     ];
     return {
@@ -239,8 +239,41 @@ let CalorieStatsQuery = function () {
         Memo: "Success",
         Rs: Rs,
     };
+};
 
+let UserRankingQuery = function (num) {
+    let item1 = [];
+    let item2 = [];
+    for (var i = 0; i < num; i++) {
+        item1.push({
+            "UserName": "@cname",
+            "Values": "@integer(1, 9999)",
+        })
+    }
+    for (var i = 0; i < num; i++) {
+        item2.push({
+            "UserName": "@cname",
+            "Values": "@float(1,9999,0,1)",
+        })
+    }
+    let Rs = [
+        {
+            Title: '月度卡路里排行版',
+            Result: item1,
+        },
+        {
+            Title: '月度CK值排行版',
+            Result: item2,
+        }
+    ];
+    return {
+        Code: 0,
+        Memo: "Success",
+        Rs: Rs,
+    };
 };
+
+
 let testHerosRankingQuery = function (num) {
     let item = [
         {
@@ -248,7 +281,7 @@ let testHerosRankingQuery = function (num) {
             "Style": "heros",
             "Result": [
                 {
-                    "UserName": "段长鹏",
+                    "UserName": "@cname",
                     "Sex": 1,
                     "Head": "",
                     "Values": "4744",
@@ -256,7 +289,7 @@ let testHerosRankingQuery = function (num) {
                     "Message": ""
                 },
                 {
-                    "UserName": "贾雨奇",
+                    "UserName": "@cname",
                     "Sex": 1,
                     "Head": "http://192.168.0.2/flyhead.png",
                     "Values": "4034",
@@ -264,7 +297,7 @@ let testHerosRankingQuery = function (num) {
                     "Message": ""
                 },
                 {
-                    "UserName": "郑伟",
+                    "UserName": "@cname",
                     "Sex": 1,
                     "Head": "http://192.168.0.2/flyhead.png",
                     "Values": "2290",
@@ -302,7 +335,7 @@ let testHerosRankingQuery = function (num) {
         Memo: "Success",
         Rs: item,
     };
-}
+};
 
 let getClassStat = function (ClassOn, dp) {
     return {
@@ -316,25 +349,56 @@ let getClassStat = function (ClassOn, dp) {
     };
 };
 
-let t = 0;//0 is on 1 is off
-if (t == 1) {
+let t = 1;//0 is on 1 is off
+if (t == 0) {
     // 列表测试
     Mock.mock('/api/testTable', 'post', testTable());
-
     Mock.mock('/api/getUserList', 'post', getUserList());
-    let curheadapi = 'http://192.168.0.10:8080/';
-    // 学生列表
-    Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 1));
-    // 下课排名
-    Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(6, 2));
+
+
+    let curheadapi = 'http://192.168.0.63:8080/';
+
+    let LessonClass = 0;
+    let LessonDp = 3;
+
+    if (LessonClass == 1) {
+        // 上团课
+        Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 1));
+    } else if (LessonClass == 2) {
+        // 上2队PK课
+        Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 2));
+    } else if (LessonClass == 3) {
+        // 上3队PK课
+        Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 3));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 3));
+    }else if(LessonClass == 0){
+        // 下课
+        if(LessonDp == 0){
+            Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 0));
+        } else if (LessonDp == 1) {
+            Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 1));
+        }else if (LessonDp == 2) {
+            Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
+            // 下课排名
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(6, 2));
+        }else if (LessonDp == 3) {
+            Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 3));
+            // 下课排名
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(6, 3));
+        }
+    }
+
+
+    // wait
     // 英雄榜
-    Mock.mock(curheadapi + 'HerosRankingQuery', 'post', testHerosRankingQuery(1));
+    Mock.mock(curheadapi + 'HerosRankingQuery', 'post', testHerosRankingQuery(3));
     // 卡路里排行榜
     Mock.mock(curheadapi + 'CalorieStatsQuery', 'post', CalorieStatsQuery(1, 2));
     // 用户排行榜
-    Mock.mock(curheadapi + 'UserRankingQuery', 'post', testStudent(1, 2));
-    // 上课状态
-    Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
+    Mock.mock(curheadapi + 'UserRankingQuery', 'post', UserRankingQuery(8));
+
     // 新同学 0 999
     Mock.mock(curheadapi + 'getNewUser', 'post', getNewUser(999));
     // 彩蛋 0 999

+ 2 - 2
tv/src/views/3pkRank.vue

@@ -596,10 +596,10 @@
     .sumCK i {
         font-size: 0.24rem;
     }
-
+/*todo*/
     .flagContainer {
         position: relative;
-        top: -0.5rem;
+        top: -1rem;
         float: right;
         right: 0;
     }

+ 9 - 8
tv/需求修改和debug.md

@@ -71,20 +71,21 @@ getServeIpAddress
 
 
 
+=================================
+12/18
+
+<s>   29.首页界面和内页都给课程增加关课按钮 </s> 
+3.PC端网络不好无法退出  √
+PC端 左侧拉不动 √
+PC端 适配窄屏幕 √
+<s> 4.课程管理每次打开加入学生,没清理穿梭框 <s> 
 =================================
 
 
 2. 私有心率带角标  
 9. 胜率显示从后台取胜率数据  
 23.彩蛋和新学生接口可以合并 todo    
-29.首页界面和内页都给课程增加关课按钮  
-3.PC端网络不好无法退出  
-4.课程管理每次打开加入学生,没清理穿梭框  
+ 
 
 * rem重构小飞龙  
 * 先写mock测试再写功能
-
-PC端 左侧拉不动
-PC端 适配窄屏幕
-
-