|
|
@@ -118,34 +118,63 @@ let getUserList = function () {
|
|
|
|
|
|
let testStudent = function (num, team) {
|
|
|
let item = [];
|
|
|
- let teams;
|
|
|
for (var i = 0; i < num; i++) {
|
|
|
- teams = team == 2 ? "@integer(1, 3)" : "@integer(1, 2)";
|
|
|
- teams = 3;
|
|
|
item.push({
|
|
|
- "SvId": "@guid",
|
|
|
- "UserId": "@integer(15253135600, 15253135699)",
|
|
|
- "name": "测试人",
|
|
|
- "Name": "测试人",
|
|
|
- "Cle": "@integer(1, 9999)",
|
|
|
- "realHr": "@integer(70, 140)",
|
|
|
- "activePercent": "@integer(10, 100)",
|
|
|
- "PureCalorieNoVo2": "@integer(10, 100)",
|
|
|
- "Ck": "@integer(10, 100)",
|
|
|
- "formatCk": "@integer(10, 100)",
|
|
|
- "Head": "http://192.168.0.2/gc.png",
|
|
|
- "GroupNo": teams,
|
|
|
- "Sex": "@integer(1, 2)",
|
|
|
- "IsBirthday": "@integer(1, 1)",
|
|
|
+ Age: 13,
|
|
|
+ AvgHr: 0,
|
|
|
+ BeginTime: 1608188579,
|
|
|
+ Ck: 0.0020378087647259235,
|
|
|
+ Cle: 0.10189043977055452,
|
|
|
+ DuId: 119,
|
|
|
+ EndTime: 0,
|
|
|
+ GroupNo: team,
|
|
|
+ Head: "http://192.168.0.2/gc.png",
|
|
|
+ Height: 160,
|
|
|
+ HrId: 41,
|
|
|
+ IsBirthday: 0,
|
|
|
+ IsBreaking: 0,
|
|
|
+ IsNewUser: 0,
|
|
|
+ MaxHr: 80,
|
|
|
+ Name: "测试人",
|
|
|
+ PkSucessnum: 2,
|
|
|
+ PkTotalnum: 6,
|
|
|
+ PlanId: 60,
|
|
|
+ PureCalorieNoVo2: 0.046890439770554515,
|
|
|
+ Sex: 1,
|
|
|
+ Sn: "22735",
|
|
|
+ StaticHr: 60,
|
|
|
+ Steps: 0,
|
|
|
+ SvId: 20,
|
|
|
+ UserId: 104,
|
|
|
+ UserMd5: "55661a861f8fae20dd505b2b4575dc0e",
|
|
|
+ Weight: 50,
|
|
|
+ activePercent: 14,
|
|
|
+ bmrMSjRmrcb: 66.00000000000001,
|
|
|
+ formatCk: 0,
|
|
|
+ isAlive: true,
|
|
|
+ isFinish: false,
|
|
|
+ isOver: false,
|
|
|
+ isPrivate: 0,
|
|
|
+ lastPushDataTime: 1608188947175,
|
|
|
+ lastUpdateTime: 1608188945184,
|
|
|
+ queuePushData: [],
|
|
|
+ realHr: 80,
|
|
|
+ vo2Max: 0
|
|
|
})
|
|
|
}
|
|
|
|
|
|
let Dp = {
|
|
|
- PlanName: '测试课程',
|
|
|
- BeginTime: '19:30',
|
|
|
- Teacher: '测试教练',
|
|
|
+ "PlanId": 182,
|
|
|
+ "ShopId": 1,
|
|
|
+ "SvId": 1,
|
|
|
+ "PlanName": "齐源大厦浏览器显示2020-12-02日08:40开始的竞技游戏",
|
|
|
+ "Status": 3,
|
|
|
+ "BeginTime": "17:15:18",
|
|
|
+ "EndTime": 0,
|
|
|
+ "ClassType": 2,
|
|
|
+ "PkNum": 2,
|
|
|
+ "Teacher": '测试教练',
|
|
|
};
|
|
|
-
|
|
|
return {
|
|
|
Rs: item,
|
|
|
Dp: Dp,
|
|
|
@@ -154,17 +183,6 @@ let testStudent = function (num, team) {
|
|
|
};
|
|
|
};
|
|
|
|
|
|
-let getClassStat = function (ClassOn) {
|
|
|
- return {
|
|
|
- ClassOn: ClassOn, // // 0: 下课 团课/私教/PK 的排名
|
|
|
- Code: 0,
|
|
|
- Memo: "Success",
|
|
|
- dp: 1,
|
|
|
- // 1:团课/私教
|
|
|
- // 2:竞技课2PK
|
|
|
- // 3:竞技课threepk
|
|
|
- };
|
|
|
-};
|
|
|
|
|
|
let getNewUser = function (code) {
|
|
|
|
|
|
@@ -204,24 +222,24 @@ let getRecordBreak = function (code) {
|
|
|
Rs: item,
|
|
|
};
|
|
|
};
|
|
|
-let CalorieStatsQuery = function(){
|
|
|
- let Rs = [
|
|
|
- {
|
|
|
- Title: '本<s>周</s>场馆卡路里总消耗',
|
|
|
- Result: [{'Values': "@integer(7654321, 1)", Unite: '千卡'}],
|
|
|
- },
|
|
|
- {
|
|
|
- Title: '本<s>周</s>场馆卡路里总消耗',
|
|
|
- Result: [{'Values':"@integer(7654321, 1)", Unite: '千卡'}],
|
|
|
- }
|
|
|
- ]
|
|
|
+let CalorieStatsQuery = function () {
|
|
|
+ let Rs = [
|
|
|
+ {
|
|
|
+ Title: '本<s>周</s>场馆卡路里总消耗',
|
|
|
+ Result: [{'Values': "@integer(7654321, 1)", Unite: '千卡'}],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Title: '本<s>周</s>场馆卡路里总消耗',
|
|
|
+ Result: [{'Values': "@integer(7654321, 1)", Unite: '千卡'}],
|
|
|
+ }
|
|
|
+ ];
|
|
|
return {
|
|
|
Code: 0,
|
|
|
Memo: "Success",
|
|
|
Rs: Rs,
|
|
|
};
|
|
|
|
|
|
- };
|
|
|
+};
|
|
|
let testHerosRankingQuery = function (num) {
|
|
|
let item = [
|
|
|
{
|
|
|
@@ -285,16 +303,27 @@ let testHerosRankingQuery = function (num) {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+let getClassStat = function (ClassOn, dp) {
|
|
|
+ return {
|
|
|
+ ClassOn: ClassOn, // // 0: 下课 团课/私教/PK 的排名
|
|
|
+ Code: 0,
|
|
|
+ Memo: "Success",
|
|
|
+ dp: dp,
|
|
|
+ // 1:团课/私教
|
|
|
+ // 2:竞技课2PK
|
|
|
+ // 3:竞技课threepk
|
|
|
+ };
|
|
|
+};
|
|
|
|
|
|
-let t = 1;
|
|
|
-if (t == 0) {
|
|
|
+let t = 0;//0 is on 1 is off
|
|
|
+if (t == 1) {
|
|
|
// 列表测试
|
|
|
Mock.mock('/api/testTable', 'post', testTable());
|
|
|
|
|
|
Mock.mock('/api/getUserList', 'post', getUserList());
|
|
|
- let curheadapi = 'http://192.168.0.71:8080/';
|
|
|
+ let curheadapi = 'http://192.168.0.63:8080/';
|
|
|
// 学生列表
|
|
|
- Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(5, 1));
|
|
|
+ Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 1));
|
|
|
// 下课排名
|
|
|
Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(1, 2));
|
|
|
// 英雄榜
|
|
|
@@ -304,7 +333,7 @@ if (t == 0) {
|
|
|
// 用户排行榜
|
|
|
Mock.mock(curheadapi + 'UserRankingQuery', 'post', testStudent(1, 2));
|
|
|
// 上课状态
|
|
|
- Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(2));
|
|
|
+ Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
|
|
|
// 新同学 0 999
|
|
|
Mock.mock(curheadapi + 'getNewUser', 'post', getNewUser(999));
|
|
|
// 彩蛋 0 999
|