|
|
@@ -21,6 +21,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
<text class="tcbox-value">{{all_totalAnswerNum}} 次</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <text class="today" :data-content="today">{{today}}</text>
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="topcontent uni-column uni-jcsa">
|
|
|
@@ -39,9 +40,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
</view>
|
|
|
<view class="main uni-column">
|
|
|
<my-tab ref="tab1" :tabItems="tab1Items" :type="1" @onTabClick="onTab1Click"
|
|
|
- @onSelectChange="onSelectChange"></my-tab>
|
|
|
+ :initActIndex=configParam.tab1InitActIndex @onSelectChange="onSelectChange"></my-tab>
|
|
|
<my-tab ref="tab2" :tabItems="tab2Items" :tabItemsMark="tab2ItemsMark" :type="0"
|
|
|
- @onTabClick="onTab2Click" :fontSize="12"></my-tab>
|
|
|
+ :initActIndex=configParam.tab2InitActIndex @onTabClick="onTab2Click" :fontSize="12"></my-tab>
|
|
|
|
|
|
<view class="tab-view uni-column">
|
|
|
<!-- 团体成绩列表 -->
|
|
|
@@ -63,8 +64,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
|
|
|
<my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
|
|
|
<my-popup ref="mypopupExchg" :config="popupExchgConfig" :dataList="popupExchgList"></my-popup>
|
|
|
- <my-popup ref="mypopupMessage" :dataList="popupMessageList" @noMoreRemindersClick="onNoMoreRemindersClick"></my-popup>
|
|
|
-
|
|
|
+ <my-popup ref="mypopupMessage" :config="popupMessageConfig" :dataList="popupMessageList" @noMoreRemindersClick="onNoMoreRemindersClick"></my-popup>
|
|
|
+ <my-popup ref="mypopupWarn" :config="popupWarnConfig" :dataList="popupWarnList"></my-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -85,6 +87,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
apiUserJoinCardQuery,
|
|
|
apiMapListQuery,
|
|
|
apiCompStatisticQuery,
|
|
|
+ apiWarnMessageQuery,
|
|
|
apiUnReadMessageQuery,
|
|
|
apiReadMessage,
|
|
|
checkResCode
|
|
|
@@ -115,6 +118,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
|
|
|
isJoin: null, // 是否报名
|
|
|
btnStartGameText: "",
|
|
|
+ today: "",
|
|
|
|
|
|
mapList: [], // 卡片对应地图列表详情
|
|
|
all_totalDistance: 0, // 赛事所有人累计里程,单位米
|
|
|
@@ -136,9 +140,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
|
|
|
teamType: 0, // 队伍类型
|
|
|
// dispArrStr: "totalDistance,totalCp,totalSysPoint,fastPace",
|
|
|
- dispArrStr: "teamCp,teamDistance,teamRightAnswerPer,teamPace,teamSpeed,regionCp,regionDistance,regionRightAnswerPer,regionPace,regionSpeed", // 要显示的集合范围
|
|
|
+ dispArrStr: "teamCp,teamTodayCp,teamDistance,teamRightAnswerPer,teamTodayPace,regionCp,regionTodayCp,regionDistance,regionRightAnswerPer,regionTodayPace", // 要显示的集合范围
|
|
|
tab1Current: 0,
|
|
|
- tab2Current: 0,
|
|
|
+ tab2Current: 0,
|
|
|
tab1Items: ["团体"],
|
|
|
// tab1Items: ["团体", {
|
|
|
// selectValue: 1,
|
|
|
@@ -148,32 +152,44 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
// {text: "个人(兴隆校区)", value: 3}
|
|
|
// ]}
|
|
|
// ],
|
|
|
- // tab2Items: ["打点数", "总里程", "百味豆", "配速"],
|
|
|
- tab2Items: ["总积分", "总里程", "校园文化", "最快配速", "单场用时"],
|
|
|
+ tab2Items: [],
|
|
|
+ tab2Items_team: ["总积分", "今日积分", "总里程", "校园文化", "今日配速"],
|
|
|
+ tab2Items_person: ["总积分", "今日积分", "总里程", "校园文化", "今日配速"],
|
|
|
tab2ItemsMark: [{
|
|
|
textColor: "#ff6203",
|
|
|
icon: "static/common/award.png"
|
|
|
}],
|
|
|
tabActiveColor: "#81cd00",
|
|
|
|
|
|
- // 成绩类型列表
|
|
|
- rankTypeList: ["totalScore", "totalDistance", "rightAnswerPer", "fastPace", "fastPace"],
|
|
|
+ rankTypeList: [],
|
|
|
+ // 团队成绩类型列表
|
|
|
+ rankTypeList_team: ["totalScore", "totalScore", "totalDistance", "rightAnswerPer", "fastPace"],
|
|
|
+ // 个人成绩类型列表
|
|
|
+ rankTypeList_person: ["totalScore", "totalScore", "totalDistance", "rightAnswerPer", "fastPace"],
|
|
|
// 团体成绩列表
|
|
|
- rank1List: ["teamCpRs", "teamDistanceRs", "teamRightAnswerPerRs", "teamPaceRs", "teamSpeedRs"],
|
|
|
+ rank1List: ["teamCpRs", "teamTodayCpRs", "teamDistanceRs", "teamRightAnswerPerRs", "teamTodayPaceRs"],
|
|
|
// 个人成绩列表
|
|
|
- rank2List: ["regionCpRs", "regionDistanceRs", "regionRightAnswerPerRs", "regionPaceRs", "regionSpeedRs"],
|
|
|
+ rank2List: ["regionCpRs", "regionTodayCpRs", "regionDistanceRs", "regionRightAnswerPerRs", "regionTodayPaceRs"],
|
|
|
|
|
|
cssTop: "",
|
|
|
cssTopbarColor: "",
|
|
|
configParam: {
|
|
|
- labelRightAnswerNum: "文化输出"
|
|
|
+ labelRightAnswerNum: "文化输出",
|
|
|
+ tab1InitActIndex: 0,
|
|
|
+ tab2InitActIndex: 0,
|
|
|
},
|
|
|
// selectedMapId: 0, // 用户选择的地图ID
|
|
|
popupRuleConfig: {}, // 规则弹窗配置
|
|
|
popupExchgConfig: {}, // 兑换地址弹窗配置
|
|
|
+ popupMessageConfig: {}, // 通知弹窗配置
|
|
|
+ // popupWarnConfig: {}, // 警告弹窗配置
|
|
|
+ popupWarnConfig: {
|
|
|
+ "height": "550px"
|
|
|
+ },
|
|
|
popupDataList: [],
|
|
|
popupExchgList: [],
|
|
|
popupMessageList: [],
|
|
|
+ popupWarnList: [],
|
|
|
// mqIdListStr: "", // 已读消息id列表 逗号分隔
|
|
|
}
|
|
|
},
|
|
|
@@ -198,6 +214,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
|
|
|
this.messageKey += "-" + this.ecId;
|
|
|
console.log("messageKey:", this.messageKey);
|
|
|
+
|
|
|
+ this.today = tools.timestampToTime(null, 2);
|
|
|
|
|
|
tools.removeCssCode();
|
|
|
|
|
|
@@ -213,6 +231,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
// 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
|
|
|
onReady() {
|
|
|
// this.dealFirstEnter();
|
|
|
+ // this.tab2Items = this.tab2Items_team;
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getUserJoinCardQuery();
|
|
|
@@ -221,6 +240,15 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
this.clear();
|
|
|
},
|
|
|
methods: {
|
|
|
+ initTab() {
|
|
|
+ if (this.tab1Current == 0) {
|
|
|
+ this.rankTypeList = this.rankTypeList_team;
|
|
|
+ this.tab2Items = this.tab2Items_team;
|
|
|
+ } else {
|
|
|
+ this.rankTypeList = this.rankTypeList_person;
|
|
|
+ this.tab2Items = this.tab2Items_person;
|
|
|
+ }
|
|
|
+ },
|
|
|
dealNotice(rank) {
|
|
|
// console.log('[dealFirstEnter]');
|
|
|
let that = this;
|
|
|
@@ -332,6 +360,20 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
}
|
|
|
// console.log("[loadConfig] popupExchgConfig:", this.popupExchgConfig);
|
|
|
|
|
|
+ // 加载通知弹窗配置
|
|
|
+ const popupMessageConfig = config.popupMessageConfig;
|
|
|
+ if (popupMessageConfig != undefined) {
|
|
|
+ this.popupMessageConfig = popupMessageConfig;
|
|
|
+ }
|
|
|
+ // console.log("[loadConfig] popupMessageConfig:", this.popupMessageConfig);
|
|
|
+
|
|
|
+ // 加载警告弹窗配置
|
|
|
+ const popupWarnConfig = config.popupWarnConfig;
|
|
|
+ if (popupWarnConfig != undefined) {
|
|
|
+ this.popupWarnConfig = popupWarnConfig;
|
|
|
+ }
|
|
|
+ // console.log("[loadConfig] popupWarnConfig:", this.popupWarnConfig);
|
|
|
+
|
|
|
// 加载弹窗数据
|
|
|
const popupDataList = config.popupDataList;
|
|
|
// console.log("[loadConfig] popupDataList:", popupDataList);
|
|
|
@@ -368,7 +410,16 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
if (param.labelRightAnswerNum != undefined && param.labelRightAnswerNum.length > 0) {
|
|
|
this.configParam.labelRightAnswerNum = param.labelRightAnswerNum;
|
|
|
}
|
|
|
+ if (param.tab1InitActIndex != undefined && param.tab1InitActIndex >= 0) {
|
|
|
+ this.configParam.tab1InitActIndex = param.tab1InitActIndex;
|
|
|
+ this.tab1Current = param.tab1InitActIndex;
|
|
|
+ }
|
|
|
+ if (param.tab2InitActIndex != undefined && param.tab2InitActIndex >= 0) {
|
|
|
+ this.configParam.tab2InitActIndex = param.tab2InitActIndex;
|
|
|
+ this.tab2Current = param.tab2InitActIndex;
|
|
|
+ }
|
|
|
}
|
|
|
+ this.initTab();
|
|
|
// console.log("[loadConfig] param:", this.configParam);
|
|
|
},
|
|
|
// 获取倒计时
|
|
|
@@ -390,11 +441,11 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
},
|
|
|
// 格式化 距离
|
|
|
fmtDistanct(val) {
|
|
|
- return Math.round(val * 100 / 1000) / 100;
|
|
|
- /* if (val < 10000)
|
|
|
- return Math.round(val * 10 / 1000) / 10;
|
|
|
+ // return Math.round(val * 100 / 1000) / 100;
|
|
|
+ if (val < 10000)
|
|
|
+ return Math.round(val * 100 / 1000) / 100;
|
|
|
else
|
|
|
- return Math.round(val / 1000); */
|
|
|
+ return Math.round(val / 1000);
|
|
|
},
|
|
|
fmtMcTime(timestamp) {
|
|
|
return tools.fmtMcTime(timestamp);
|
|
|
@@ -703,14 +754,16 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
}
|
|
|
},
|
|
|
],
|
|
|
-
|
|
|
"param": {
|
|
|
- "labelRightAnswerNum": "文化输出"
|
|
|
+ "labelRightAnswerNum": "文化输出",
|
|
|
+ "tab1InitActIndex": 0,
|
|
|
+ "tab2InitActIndex": 1
|
|
|
}
|
|
|
}; */
|
|
|
|
|
|
this.loadConfig(config);
|
|
|
this.getUnReadMessageQuery();
|
|
|
+ this.warnMessageQuery();
|
|
|
this.matchRsDetailQuery();
|
|
|
|
|
|
setTimeout(this.dealFirstEnter, 500);
|
|
|
@@ -1052,6 +1105,64 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ // 警告列表查询
|
|
|
+ warnMessageQuery() {
|
|
|
+ uni.request({
|
|
|
+ url: apiWarnMessageQuery,
|
|
|
+ header: {
|
|
|
+ "Content-Type": "application/x-www-form-urlencoded",
|
|
|
+ "token": this.token,
|
|
|
+ },
|
|
|
+ method: "POST",
|
|
|
+ data: {
|
|
|
+ ecId: this.ecId
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ // console.log("warnMessageQuery", res);
|
|
|
+ if (checkResCode(res)) {
|
|
|
+ const warnRs = res.data.data;
|
|
|
+ this.popupWarnList.length = 0;
|
|
|
+ for (var i = 0; i < warnRs.length; i++) {
|
|
|
+ let popupData = {
|
|
|
+ type: 9, // 9: 警告
|
|
|
+ data: {}
|
|
|
+ };
|
|
|
+ popupData.data.warnType = warnRs[i].warnType;
|
|
|
+ popupData.data.title = warnRs[i].warnTitle;
|
|
|
+ popupData.data.iconUrl = warnRs[i].iconUrl;
|
|
|
+ popupData.data.iconNum = warnRs[i].iconNum;
|
|
|
+ popupData.data.message = warnRs[i].warnMessage;
|
|
|
+ popupData.data.qrCodeUrl = warnRs[i].qrCodeUrl;
|
|
|
+ this.popupWarnList.push(popupData);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* this.popupWarnList.push(
|
|
|
+ {
|
|
|
+ type: 9, // 9: 警告
|
|
|
+ data: {
|
|
|
+ warnType: 1,
|
|
|
+ title: "黄牌",
|
|
|
+ iconUrl: "/static/common/card_yellows.png",
|
|
|
+ iconNum: 1,
|
|
|
+ message: `亲爱的参赛者:
|
|
|
+ 收到此黄牌,说明您的比赛数据被系统判定为存在异常,此次比赛(活动)为徒步定向校园文化主题活动,请自觉遵守规则,如果您收到的黄牌数量过多<span style='color: red'>(超过2张)</span>,您的成绩将影响到您的院系/单位成绩,同时您的个人成绩也有可能根据规则被取消。如果您坚持您的比赛数据没有问题,请联系我们的客服人员,谢谢!
|
|
|
+ 让我们一起创造文明、和谐的校园生活,感谢您的支持!`,
|
|
|
+ qrCodeUrl: "https://orienteering.beswell.com/shanda/%E8%AD%A6%E5%91%8A%E4%BA%8C%E7%BB%B4%E7%A0%81%402x.png"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ); */
|
|
|
+ // console.log("popupMessageList", this.popupMessageList);
|
|
|
+
|
|
|
+ if (this.popupWarnList.length > 0) {
|
|
|
+ this.$refs.mypopupWarn.popupOpen();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ console.log("warnMessageQuery err", err)
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
onNoMoreRemindersClick() {
|
|
|
this.$refs.mypopupMessage.popupClose();
|
|
|
uni.setStorageSync(this.messageKey, true);
|
|
|
@@ -1116,8 +1227,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
this.$refs.mypopupExchg.popupOpen();
|
|
|
},
|
|
|
onTab1Click(val) {
|
|
|
- // console.log("onTab1Click: ", val);
|
|
|
+ console.log("onTab1Click: ", val);
|
|
|
this.tab1Current = val;
|
|
|
+ this.initTab();
|
|
|
},
|
|
|
onTab2Click(val) {
|
|
|
// console.log("onTab2Click: ", val);
|
|
|
@@ -1196,6 +1308,26 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
|
|
|
line-height: 26px;
|
|
|
color: #f3d809;
|
|
|
}
|
|
|
+
|
|
|
+ .today {
|
|
|
+ margin-top: 8px;
|
|
|
+ color: #751f00;
|
|
|
+ font-size: 16px;
|
|
|
+ /* font-family: "黑体", sans-serif; */
|
|
|
+ font-weight: 3700;
|
|
|
+ position: relative;
|
|
|
+ z-index: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .today::after {
|
|
|
+ content: attr(data-content);
|
|
|
+ -webkit-text-stroke: 3px #DCA452;
|
|
|
+ /* font-family: "黑体", sans-serif; */
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
|
|
|
.tcbar {
|
|
|
display: none;
|