| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242 |
- <!--
- [报名] 样式3 - 排名总览
- http://localhost:5173/card/#/pages/bm/style4/rankOverview
- https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankOverview
- -->
- <template>
- <view class="body">
- <view v-if="pageReady" class="content uni-column">
- <view class="uni-column" :class="cssTop">
- <my-topbar :mcName="mcName" :class="cssTopbarColor"
- @btnBackClick="btnBack" @btnInfoClick="btnInfo"></my-topbar>
-
- <view class="topcontent uni-column uni-jcsa">
- <view class="logo"></view>
- <text v-if="configParam.subTitle.length > 0" class="top-acttime">{{configParam.subTitle}}</text>
- <text v-else class="top-acttime">{{fmtMcTime2(beginSecond, endSecond)}}</text>
- </view>
- </view>
- <view v-if="configParam.midType == 0" class="midType0 uni-column">
- <view class="mid-0 uni-row uni-jcc">
- <view class="mid-0-select">
- <e-select v-model="ocaId" :options="mapList" :search="false" :inputClick="true"
- maxHeight="300px" :clearable="false" @change="eSelectChange"></e-select>
- </view>
- <text v-if="popupHelpList.length > 0" class="mid-0-help" @click="btnHelp">帮助</text>
- </view>
- <view class="midType0-mid-1 uni-row uni-jcsa">
- <view class="uni-row">
- <image v-if="popupWarnList.length > 0" class="mid-1-yellowCard" mode="aspectFit"
- @click="btnWarn" src="/static/common/card_yellow.gif"></image>
- <text class="mid-1-text">{{nickName}}</text>
- </view>
- <text class="mid-1-text">{{coiName}}</text>
- <text class="mid-1-text" style="color: #aaaaaa;" v-if="mcState==1 && allowMcSignUp"
- @click="btnReGroup">修改</text>
- </view>
- <view class="mid-2 uni-row uni-jcsa">
- <view class="uni-column">
- <text class="mid-2-value">{{regionTotalNum}}</text>
- <text class="mid-2-text">总场次</text>
- </view>
- <view class="mid-line"></view>
- <view class="uni-column">
- <text class="mid-2-value">{{regionTotalCp}}</text>
- <text class="mid-2-text">总打点数</text>
- </view>
- <view class="mid-line"></view>
- <view class="uni-column">
- <text class="mid-2-value">{{regionTotalCpRankNum}}</text>
- <text class="mid-2-text">个人排名</text>
- </view>
- </view>
- </view>
-
- <view v-if="configParam.midType == 1" class="midType1 uni-column">
- <view class="mid-0 uni-row uni-jcc">
- <view class="mid-0-select">
- <e-select v-model="ocaId" :options="mapList" :search="false" :inputClick="true"
- maxHeight="300px" :clearable="false" @change="eSelectChange"></e-select>
- </view>
- <view class="mid-0-right uni-row uni-jcsa">
- <text class="" style="" v-if="mcState==1 && allowMcSignUp"
- @click="btnReGroup">修改</text>
- <text v-if="popupHelpList.length > 0" class="" @click="btnHelp">帮助</text>
- </view>
- </view>
- <view class="midType1-mid-1 uni-row uni-jcsb">
- <view class="uni-row">
- <image v-if="popupWarnList.length > 0" class="mid-1-yellowCard" mode="aspectFit"
- @click="btnWarn" src="/static/common/card_yellow.gif"></image>
- <text class="mid-1-name">{{nickName}}</text>
- </view>
- <text class="mid-1-name">{{coiName}}</text>
- <text class="uni-nowrap">总场次:{{regionTotalNum}}</text>
- </view>
- <view class="mid-2 uni-row uni-jcsa">
- <view class="uni-column">
- <text class="mid-2-value" style="color: #ff0045;">{{regionTotalSysPoint}}</text>
- <text class="mid-2-text">百味豆(个)</text>
- </view>
-
- <view class="mid-line"></view>
-
- <view class="uni-column">
- <text class="mid-2-value">{{fmtDistanct(regionTotalDictance)}}</text>
- <text class="mid-2-text">总里程km</text>
- </view>
-
- <view class="mid-line"></view>
- <view class="uni-column">
- <text class="mid-2-value">{{regionTotalCp}}</text>
- <text class="mid-2-text">打点数(个)</text>
- </view>
-
- <view class="mid-line"></view>
-
- <view class="uni-column">
- <text class="mid-2-value">{{fmtPace(regionFastPace)}}</text>
- <text class="mid-2-text">最快配速</text>
- </view>
- </view>
- </view>
- <view class="main uni-column">
- <text class="main-title">选择比赛路线</text>
- <my-pathList :style="pathListStyle.style" :pathList="pathList"
- :selectedPath="ocaId" :mcState="mcState" :showLine="pathListStyle.showLine"
- @onPathClick="onPathClick"></my-pathList>
- </view>
-
- <view class="bottom uni-column">
- <button class="btnStartGame" @click="btnStartGame">开始比赛</button>
- </view>
-
- <my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
- <my-popup ref="mypopupHelp" :config="popupHelpConfig" :dataList="popupHelpList"></my-popup>
- <my-popup ref="mypopupWarn" :config="popupWarnConfig" :dataList="popupWarnList"></my-popup>
- <!-- <my-popup-map ref="mypopupmap" :point="navPoint"></my-popup-map> -->
- </view>
- </view>
- </template>
- <script>
- import tools from '/common/tools';
- import {
- defaultPopUpDataList,
- defaultPopUpDataList2
- } from '/common/define';
- import {
- token,
- apiMapListQuery,
- apiMatchRsDetailQuery,
- apiCardConfigQuery,
- apiIsAllowMcSignUp,
- apiWarnMessageQuery,
- checkResCode
- } from '/common/api';
- export default {
- data() {
- return {
- pageReady: false,
- // audioSrc: "/static/audio/2.mp3",
- // audioSrc: "https://oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
- // audioSrc: "http://t-oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
- pageName: "rankOverview",
- firstEnterKey: 'firstEnter-bm-style4',
- rankKey: "rank-bm-style4",
- mapKey: "rank-bm-style4-map",
- queryObj: {},
- queryString: "",
- token: "",
- ecId: 0, // 卡片id
- mcId: 0, // 赛事id
- mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
- mcName: "", // 赛事名称
- coiName: "", // 已报名单位名称
- acttime: "", // 活动时间
- beginSecond: null, // 活动或赛事开始时间戳,单位秒
- endSecond: null, // 活动或赛事结束时间戳,单位秒
- ocaId: 0, // 关联id,带入到App活动详情页面
- nickName: "", // 昵称
- totalNum: null, // 总场次
- totalDistanct: null, // 总距离,单位米
- totalDistanctRankNum: null, // 总距离排名
- totalCp: null, // 总打点数
- totalCpRankNum: null, // 总打点数排名
- totalSysPoint: null, // 总百味豆
- totalSysPointRankNum: null, // 总百味豆排名
- fastPace: null, // 个人最快配速
- fastPaceRankNum: null, // 个人最快配速排名
- regionTotalNum: null, // 地图内总场次
- regionTotalCp: null, // 地图内打点数
- regionTotalCpRankNum: null, // 地图内个人打点排名
- regionTotalSysPoint: null, // 地图内积分(百味豆)
- regionTotalDictance: null, // 地图内里程(单位米)
- regionFastPace: null, // 地图内最快配速
- ocaRs: [], // 卡片对应活动集合
- mapList: [], // 地图列表
- interval: null,
- mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
- allowMcSignUp: false, // 是否允许重新分组
- cssTop: "",
- cssTopbarColor: "",
- pathList: {},
- pathListStyle: {},
- popupRuleConfig: {}, // 规则弹窗配置
- popupHelpConfig: {}, // 帮助弹窗配置
- // popupWarnConfig: {}, // 警告弹窗配置
- popupWarnConfig: {
- "height": "550px"
- },
- popupDataList: [],
- popupHelpList: [],
- popupWarnList: [],
- navPoint: {},
- configParam: {
- subTitle: "",
- midType: 0
- },
- }
- },
- computed: {
- pathListLen() {
- return Object.keys(this.pathList).length;
- }
- },
- onLoad(query) { // 类型非必填,可自动推导
- // uni.showLoading({
- // title: '加载中'
- // });
-
- // console.log("query:", query);
- this.queryObj = query;
- this.queryString = tools.objectToQueryString(this.queryObj);
- // console.log(queryString);
- this.token = query["token"] ?? token;
- this.ecId = query["id"] ?? 0;
- this.firstEnterKey += "-" + this.ecId;
- console.log("firstEnterKey:", this.firstEnterKey);
- this.rankKey += "-" + this.ecId;
- console.log("rankKey:", this.rankKey);
- this.mapKey += "-" + this.ecId;
- console.log("mapKey:", this.mapKey);
- tools.removeCssCode();
- const mapValue = uni.getStorageSync(this.mapKey);
- if (mapValue) {
- console.log("mapValue:", mapValue);
- this.ocaId = mapValue;
- }
- this.getCardConfigQuery();
- },
- // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
- onReady() {
- // this.dealFirstEnter();
- // this.playMusic();
- },
- onShow() {
- // uni.showToast({
- // icon: "none",
- // title: "[rankOverview] onShow"
- // })
- // if (this.$audio.audioStatus == 2 && this.$audio.audioSrc == this.audioSrc) {
- // this.$audio.play();
- // }
- },
- onUnload() {
- this.clear();
- },
- methods: {
- playMusic() {
- return;
- // uni.showToast({
- // title: 'playMusic',
- // icon: 'none',
- // duration: 2000
- // });
- // if (this.$audio.audioStatus == 0 || this.$audio.audioSrc != this.audioSrc) {
- // this.$audio.playAudio(this.audioSrc);
- // }
- },
- dealNotice(rank) {
- // console.log('[dealFirstEnter]');
- let that = this;
- uni.getStorage({
- key: that.rankKey,
- success: (res) => {
- console.log('[getStorage]', that.rankKey, res.data);
- const oldRank = res.data;
- if (oldRank != rank) {
- // that.notice = true;
- that.setRankValue(rank);
- }
- },
- fail: (e) => {
- console.log('[getStorage] fail', that.rankKey, e);
- // that.notice = false;
- that.setRankValue(rank);
- },
- })
- },
- setRankValue(data) {
- let that = this;
- uni.setStorage({
- key: that.rankKey,
- data: data,
- success: () => {
- console.log('[setStorage] success', that.rankKey, data);
- },
- fail: (e) => {
- console.log('[setStorage] fail', that.rankKey, e);
- },
- })
- },
- dealFirstEnter() {
- // console.log('[dealFirstEnter]');
- let that = this;
- uni.getStorage({
- key: that.firstEnterKey,
- success: (res) => {
- console.log('[getStorage]', that.firstEnterKey, res.data);
- },
- fail: (e) => {
- console.log('[getStorage] fail', that.firstEnterKey, e);
- that.btnInfo();
- that.setFirstEnterValue(true);
- },
- })
- },
- setFirstEnterValue(data) {
- let that = this;
- uni.setStorage({
- key: that.firstEnterKey,
- data: data,
- success: () => {
- console.log('[setStorage] success', that.firstEnterKey, data);
- },
- fail: (e) => {
- console.log('[setStorage] fail', that.firstEnterKey, e);
- },
- })
- },
- clear() {
- if (this.interval != null) {
- clearInterval(this.interval);
- this.interval = null;
- }
- },
- loadConfig(config) {
- // console.log("config", config);
- // 加载CSS样式
- const css = config.css;
- if (css != undefined && css.length > 0) {
- tools.loadCssCode(css);
- if (css.indexOf(".top{") >= 0) {
- this.cssTop = "top";
- }
- if (css.indexOf(".topbar-color{") >= 0) {
- this.cssTopbarColor = "topbar-color";
- }
- }
- if (this.cssTop == "") {
- this.cssTop = "top-default";
- }
- if (this.cssTopbarColor == "") {
- this.cssTopbarColor = "topbar-color-default";
- }
- // console.log("[loadConfig] cssTop:", this.cssTop);
- // console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);
- // 加载比赛路线数据
- const pathList = config.pathList;
- // console.log("[loadConfig] pathList:", pathList);
- if (pathList != undefined) {
- this.pathList = pathList;
- }
- // 加载比赛路线样式
- const pathListStyle = config.pathListStyle;
- // console.log("[loadConfig] pathList:", pathList);
- if (pathListStyle != undefined) {
- this.pathListStyle = pathListStyle;
- }
- // 加载规则弹窗配置
- const popupRuleConfig = config.popupRuleConfig;
- if (popupRuleConfig != undefined) {
- this.popupRuleConfig = popupRuleConfig;
- }
- // console.log("[loadConfig] popupRuleConfig:", this.popupRuleConfig);
-
- // 加载帮助弹窗配置
- const popupHelpConfig = config.popupHelpConfig;
- if (popupHelpConfig != undefined) {
- this.popupHelpConfig = popupHelpConfig;
- }
- // console.log("[loadConfig] popupHelpConfig:", this.popupHelpConfig);
-
- // 加载警告弹窗配置
- 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);
- if (popupDataList != undefined && popupDataList.length > 0) {
- for (var i = 0; i < popupDataList.length; i++) {
- // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
- if (popupDataList[i] == 'default') {
- for (var j = 0; j < defaultPopUpDataList.length; j++) {
- this.popupDataList.push(defaultPopUpDataList[j]);
- }
- } else if (popupDataList[i] == 'default2') {
- for (var j = 0; j < defaultPopUpDataList2.length; j++) {
- this.popupDataList.push(defaultPopUpDataList2[j]);
- }
- } else {
- this.popupDataList.push(popupDataList[i]);
- }
- }
- } else {
- this.popupDataList = defaultPopUpDataList;
- console.log("[loadConfig] popupDataList 加载默认列表");
- }
- // console.log("[loadConfig] popupDataList:", this.popupDataList);
-
- // 加载弹窗(帮助)数据
- const popupHelpList = config.popupHelpList;
- if (popupHelpList != undefined && popupHelpList.length > 0) {
- for (var i = 0; i < popupHelpList.length; i++) {
- // console.log("[loadConfig] popupHelpList", i, popupHelpList[i]);
- this.popupHelpList.push(popupHelpList[i]);
- }
- }
- // console.log("[loadConfig] popupHelpList:", this.popupHelpList);
-
- // 加载页面参数
- const param = config.param;
- if (param != undefined) {
- if (param.subTitle != undefined && param.subTitle.length > 0) {
- this.configParam.subTitle = param.subTitle;
- }
- if (param.midType != undefined && param.midType >= 0) {
- this.configParam.midType = param.midType;
- }
- }
- // console.log("[loadConfig] param:", this.configParam);
- this.pageReady = true;
- // uni.hideLoading();
- },
- // 获取倒计时
- getCountdown() {
- // console.log(this.endSecond)
- if (this.endSecond > 0) {
- const now = Date.now() / 1000;
- const dif = this.endSecond - now;
- // const dif = 3600*24 - 60;
- if (dif > 0) {
- this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
- } else {
- this.countdown = "活动已结束";
- }
- // this.countdown = tools.convertSecondsToHMS(dif);
- } else {
- this.countdown = "距结束 --天--小时";
- }
- },
- // 格式化 距离
- fmtDistanct(val) {
- if (val >= 0) {
- return Math.round(val * 100 / 1000) / 100;
- } else {
- return '--';
- }
- /* if (val < 1000)
- return Math.round(val * 10 / 1000) / 10;
- else
- return Math.round(val / 1000); */
- },
- // 格式化 配速
- fmtPace(val) {
- if (val >= 0) {
- return tools.convertSecondsToHMS(val, 2);
- } else {
- return '--';
- }
- },
- fmtMcTime(timestamp) {
- return tools.fmtMcTime(timestamp);
- },
- // 获取活动时间
- getActtime() {
- this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
- },
- fmtMcTime2(timestamp1, timestamp2) {
- return tools.fmtMcTime2(timestamp1, timestamp2);
- },
- getCardConfigQuery() {
- uni.request({
- url: apiCardConfigQuery,
- header: {
- "Content-Type": "application/x-www-form-urlencoded",
- "token": this.token,
- },
- method: "POST",
- data: {
- ecId: this.ecId,
- pageName: this.pageName
- },
- success: (res) => {
- // console.log("getCardConfigQuery", res)
- const data = res.data.data;
- // console.log("configJson", data.configJson);
- const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
- // console.log("configJson", data.configJson);
- /* const config = {
- "css": `
- .top{
- position: relative;
- width: 100%;
- height: 220px;
- padding-top: 36px;
- justify-content: space-between;
- background-image: url('static/backgroud/top_bg_sddx2.png');
- background-repeat: no-repeat;
- background-position-x: center;
- background-position-y: center;
- background-size: cover;
- }
- .topbar-rule {
- color: #FFFFFF;
- border-radius: 4px;
- background: #FF870D;
- }
- .logo{
- width: 180.5px !important;
- height: 130.5px !important;
- background-image: url('static/logo/sddx_jjyjy.png');
- }
- .top-acttime{
- display: flex !important;
- font-size: 20px !important;
- line-height: 30px !important;
- }
- .topbar-color{
- color: #ffffff;
- }
- .midType0{
- margin-top: -20px !important;
- }
- .main-title {
- display: none !important;
- }
- .btnStartGame{
- background-color: #a43a07 !important;
- }
- .e-select{
- background-color: #a43a07 !important;
- }
- .swiper-item-button{
- background-color: #a43a07 !important;
- }
- .uni-swiper-dot-active{
- background: #a43a07 !important;
- }
- `,
- "pathList": {
- "row1": [{
- "type": 4,
- "pathImg": "/static/common/sdzxxq2.png",
- "pathName": "山东大学中心校区",
- "path": {
- "ocaId": 1,
- "mcType": 3
- },
- "navImg": "/static/common/nav3.png",
- "point": {
- "longitude": 117.022194,
- "latitude": 36.661612,
- "name": "山东大学中心校区起始点"
- }
- }
- ]
- },
- "pathListStyle" : {
- "showLine" : true,
- "style": "justify-content: center;"
- },
- "popupRuleConfig": {
- "height": "560px"
- },
- "popupDataList": [
- {
- "type": 7,
- "data": {
- "topLogo": {
- "src": "/static/logo/sddx.png",
- "width": "80px",
- "height": "80px"
- },
- "title": "“筑梦宿州·创赢未来 ”特训营",
- "content": "<span style='display:block; text-align: center; margin: 20px; font-weight: bold;'>欢乐定向赛</span> 欢迎加入“筑梦宿州·创赢未来”特训营定向赛!在这里,你将亲历百年奥运精英运动——定向运动,体验个人与团队目标的完美融合,过程中运动与智慧并重。完赛即享奖励,最佳团队更享奖上奖!让我们携手加油吧!<br><br><span style='display:block; text-align: right;'>山东大学经济研究院</span>",
- "imageList": []
- }
- },
- {
- "type": 7,
- "data": {
- "topLogo": {
- "src": "/static/logo/sddx.png",
- "width": "80px",
- "height": "80px"
- },
- "title": "活动流程",
- "content": "<span style='line-height: 30px;'>① 选择战队赛事报名 ↓ <br>② 选择场地导航至起点 ↓ <br>③ 进入活动起点打点 ↓ <br>④ 按序号依次打点 ↓ <br>⑤ 知识问答 ↓ <br>⑥ 终点打点 ↓ <br>⑦ 查看成绩 ↓ <br>⑧ 获得奖励</span>",
- "imageList": []
- }
- },
- {
- "type": 7,
- "data": {
- "topLogo": {
- "src": "/static/logo/sddx.png",
- "width": "80px",
- "height": "80px"
- },
- "title": "定向运动怎么玩?",
- "content": "",
- "imageList": [{
- "src": "/static/common/qrcode_spjc.png",
- "width": "140.5px",
- "height": "163.5px"
- }]
- }
- },
- {
- "type": 7,
- "data": {
- "topLogo": {
- "src": "/static/logo/sddx.png",
- "width": "80px",
- "height": "80px"
- },
- "title": "赛事规则及奖励",
- "content": "<br><span style='line-height: 22px;'>规则:<br>1. 选择心仪战队,共筑个人与战队荣耀。<br>2. 在规定的时间内,<span style='color: #FF8D1A;'>不限完赛次数</span>,最终成绩以完赛累计积分计算。<br>3. 途经点成功打点1积分,正确答题1积分。<br>4. 未成功完赛(未打结束点)积分不计入。<br><br>奖励:<br><span style='color: #FF8D1A;'>完赛奖、最佳战队奖、个人前三名</span></span>",
- "imageList": []
- }
- },
- "default2"
- ],
- "popupWarnConfig": {
- "height": "550px"
- },
- "popupHelpConfig": {
- "height": "539px"
- },
- "popupHelpList": [
- ],
- "param": {
- "subTitle": "“筑梦宿州·创赢未来 ”特训营",
- "midType": 0
- }
- }; */
- this.loadConfig(config);
- this.matchRsDetailQuery();
- this.warnMessageQuery();
- setTimeout(this.dealFirstEnter, 500);
- },
- fail: (err) => {
- console.log("getCardConfigQuery err", err)
- },
- });
- },
- // 卡片对应地图列表详情查询
- mapListQuery() {
- uni.request({
- url: apiMapListQuery,
- header: {
- "Content-Type": "application/x-www-form-urlencoded",
- "token": this.token,
- },
- method: "POST",
- data: {
- mcId: this.mcId
- },
- success: (res) => {
- // console.log("mapListQuery", res);
- if (res.data.code == 0) {
- const data = res.data.data;
- this.mapList = data;
- let mapItems = [];
- for (var i = 0; i < data.length; i++) {
- let map = {};
- map.text = data[i].mapName;
- map.value = data[i].ocaId;
- mapItems.push(map);
- if (i == 0 && this.ocaId == 0) {
- this.ocaId = data[i].ocaId;
- this.matchRsDetailQuery();
- uni.setStorageSync(this.mapKey, this.ocaId);
- }
- }
- this.mapList = mapItems;
- // console.log("mapList", this.mapList);
- }
- },
- fail: (err) => {
- console.log("mapListQuery err", err);
- },
- });
- },
- // 卡片对应线上赛多个活动查询
- matchRsDetailQuery() {
- uni.request({
- url: apiMatchRsDetailQuery,
- header: {
- "Content-Type": "application/x-www-form-urlencoded",
- "token": this.token,
- },
- method: "POST",
- data: {
- ecId: this.ecId,
- ocaId: this.ocaId
- },
- success: (res) => {
- // console.log("matchRsDetailQuery", res);
- if (checkResCode(res)) {
- const data = res.data.data;
- this.mcType = data.mcType;
- this.mcId = data.mcId;
- this.mcName = data.mcName;
- this.coiName = data.coiName;
- this.beginSecond = data.beginSecond;
- this.endSecond = data.endSecond;
- this.nickName = data.nickName;
- this.totalNum = data.totalNum;
- this.totalDistanct = data.totalDistanct;
- this.totalDistanctRankNum = data.totalDistanctRankNum;
- this.totalCp = data.totalCp;
- this.totalCpRankNum = data.totalCpRankNum;
- this.totalSysPoint = data.totalSysPoint;
- this.totalSysPointRankNum = data.totalSysPointRankNum;
- this.fastPace = data.fastPace;
- this.fastPaceRankNum = data.fastPaceRankNum;
- this.regionTotalNum = data.regionTotalNum;
- this.regionTotalCp = data.regionTotalCp;
- this.regionTotalCpRankNum = data.regionTotalCpRankNum;
- this.regionTotalSysPoint = data.regionTotalSysPoint;
- this.regionTotalDictance = data.regionTotalDictance;
- this.regionFastPace = data.regionFastPace;
- this.ocaRs = data.ocaRs;
- this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
- const rank = JSON.stringify(data);
- this.dealNotice(rank);
- this.getCountdown();
- this.getActtime();
- this.isAllowMcSignUp();
- this.mapListQuery();
- this.clear();
- this.interval = setInterval(this.getCountdown, 60000);
- }
- },
- fail: (err) => {
- console.log("matchRsDetailQuery err", err)
- },
- });
- },
- // 是否允许重新分组(报名)
- isAllowMcSignUp() {
- uni.request({
- url: apiIsAllowMcSignUp,
- header: {
- "Content-Type": "application/x-www-form-urlencoded",
- "token": this.token,
- },
- method: "POST",
- data: {
- ecId: this.ecId
- },
- success: (res) => {
- // console.log("isAllowMcSignUp", res)
- if (res.data.code == 0) {
- const data = res.data.data;
- this.allowMcSignUp = data.allowSignUp;
- }
- },
- fail: (err) => {
- console.log("isAllowMcSignUp err", err)
- },
- });
- },
- // 警告列表查询
- 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);
- }
- },
- fail: (err) => {
- console.log("warnMessageQuery err", err)
- },
- });
- },
- btnBack() {
- // const url = `action://to_home/`;
- // tools.appAction(url);
- // uni.navigateTo({
- // url: "/pages/bm/style4/rankList?" + this.queryString
- // });
- const url = "/pages/bm/style4/rankList?" + this.queryString;
- tools.appAction(url, "uni.navigateTo");
- },
- btnInfo() {
- // console.log(this.$refs.mypopup);
- this.$refs.mypopup.popupOpen();
- },
- btnHelp() {
- this.$refs.mypopupHelp.popupOpen();
- },
- btnWarn() {
- this.$refs.mypopupWarn.popupOpen();
- },
- btnReGroup() {
- this.queryObj.from = "rankOverview";
- this.queryString = tools.objectToQueryString(this.queryObj);
- // uni.navigateTo({
- // url: '/pages/bm/style4/signup?' + this.queryString
- // });
- const url = '/pages/bm/style4/signup?' + this.queryString;
- tools.appAction(url, "uni.navigateTo");
- },
- onOverviewClick(ovtype) {
- this.queryObj.ovtype = ovtype;
- this.queryString = tools.objectToQueryString(this.queryObj);
- // uni.navigateTo({
- // url: "/pages/bm/style4/rankList?" + this.queryString
- // });
- const url = "/pages/bm/style4/rankList?" + this.queryString;
- tools.appAction(url, "uni.navigateTo");
- },
- eSelectChange(data) {
- // console.log("eSelectChange:", data);
- this.ocaId = data.value;
- this.matchRsDetailQuery();
- uni.setStorageSync(this.mapKey, this.ocaId);
- },
- onPathClick(data) {
- console.log("onPathClick:", data);
- if (this.ocaId != data.path.ocaId) {
- this.ocaId = data.path.ocaId;
- this.matchRsDetailQuery();
- uni.setStorageSync(this.mapKey, data.path.ocaId);
- }
- },
- btnStartGame() {
- // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
- if (this.mcState == 1) {
- const url = `action://to_detail/?id=${this.ocaId}&matchType=${this.mcType}`;
- tools.appAction(url);
- } else if (this.mcState == 0) {
- uni.showToast({
- title: '比赛尚未开始',
- icon: 'none',
- duration: 3000
- });
- } else if (this.mcState == 2) {
- uni.showToast({
- title: '比赛已结束',
- icon: 'none',
- duration: 3000
- });
- }
- }
- }
- }
- </script>
- <style scoped>
- .content {
- width: 100vw;
- min-height: 100vh;
- overflow-x: scroll;
- }
- .top-default {
- position: relative;
- z-index: 10;
- width: 100%;
- height: 270px;
- padding-top: 36px;
- justify-content: space-between;
- background-image: url("/static/backgroud/top_bg_egg2.png");
- background-repeat: no-repeat;
- background-position-x: center;
- background-position-y: -8px;
- background-size: 100% 100%;
- /* background-size: cover; */
- }
- .topbar-color-default {
- color: #333333;
- }
- .topcontent {
- height: 90%;
- margin-bottom: 50px;
- }
- .logo {
- width: 80px;
- height: 80px;
- margin-top: 10px;
- /* background-image: url('/static/logo/sddx.png'); */
- background-repeat: no-repeat;
- background-position-x: center;
- background-position-y: center;
- background-size: contain;
- }
- .top-acttime {
- display: none;
- text-shadow: 3px 3px 0px #640008;
- font-family: YouSheBiaoTiHei;
- /* font-family: Arial, Helvetica, sans-serif; */
- font-weight: bold;
- color: #ffee0b;
- font-size: 26px;
- }
- .topbtm {
- width: 100%;
- /* height: 60rpx; */
- margin-bottom: 40px;
- justify-content: space-evenly;
- }
- .topbtm-name {
- /* width: 320rpx; */
- /* height: 28px; */
- padding: 5px 12px;
- background-color: #9fda39;
- border-radius: 5px;
- /* backdrop-filter: blur(30px); */
- text-align: center;
- font-weight: 500;
- color: #497400;
- font-size: 14px;
- }
- .midType0 {
- width: 90%;
- height: 150px;
- position: relative;
- z-index: 20;
- margin-top: -40px;
- background: #ffffff;
- border-radius: 9px;
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
- font-family: Source Han Sans CN;
- }
- .midType1 {
- width: 90%;
- /* height: 112px; */
- height: 150px;
- position: relative;
- z-index: 20;
- margin-top: -70px;
- background: #ffffff;
- border-radius: 9px;
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
- font-family: Source Han Sans CN;
- }
-
- .mid-0 {
- width: 90%;
- margin: 12px;
- }
-
- .mid-0-select {
- width: 60%;
- font-weight: 500;
- color: #8e8e8e;
- font-size: 14px;
- }
-
- .mid-0-help {
- position: absolute;
- right: 30px;
- font-size: 12px;
- font-weight: 500;
- color: #992900;
- }
- .mid-0-right {
- position: absolute;
- width: 60px;
- /* background-color: #81cd00; */
- right: 10px;
- font-size: 12px;
- font-weight: 500;
- color: #992900;
- }
-
- .midType0-mid-1 {
- width: 90%;
- margin-bottom: 12px;
- }
-
- .midType1-select {
- /* width: 46%; */
- min-width: 46%;
- max-width: 50%;
- margin: 0 5px;
- font-weight: 500;
- color: #8e8e8e;
- font-size: 14px;
- }
-
- .midType1-mid-1 {
- width: 90%;
- margin-bottom: 12px;
- font-weight: 500;
- color: #8e8e8e;
- font-size: 14px;
- }
-
- .mid-1-yellowCard {
- width: 15px;
- height: 20px;
- margin-right: 10px;
- }
- .mid-1-name {
- max-width: 360rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- .mid-1-text {
- /* min-width: 60px; */
- font-weight: 500;
- color: #9a300e;
- font-size: 12px;
- }
- .mid-2 {
- width: 92%;
- /* margin: 0 10px; */
- }
- .mid-2-value {
- font-weight: 900;
- font-size: 22px;
- line-height: 25px;
- }
- .mid-2-text {
- color: #989898;
- font-size: 12px;
- }
- .mid-line {
- width: 0px;
- height: 40px;
- border: 1px solid;
- border-color: #e6e6e6;
- }
- .overview-1 {
- width: 111px;
- height: 54px;
- background: #ffb40b;
- border-radius: 50%;
- box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
- pointer-events: auto;
- }
- .overview-2 {
- margin-top: -43px;
- color: #ffffff;
- font-size: 18px;
- pointer-events: auto;
- }
- .overview-3 {
- width: 111px;
- height: 54px;
- background: #f39509;
- border-radius: 50%;
- box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
- pointer-events: auto;
- }
- .overview-4 {
- width: 111px;
- height: 54px;
- background: #81cd00;
- border-radius: 50%;
- box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
- pointer-events: auto;
- }
- .overview-5 {
- width: 111px;
- height: 54px;
- background: #64cbb0;
- border-radius: 50%;
- box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
- pointer-events: auto;
- }
- .ovline1 {
- margin-top: 9px;
- color: #ffffff;
- font-size: 12px;
- }
- .ovline2 {
- color: #ffffff;
- font-size: 16px;
- }
- .main {
- width: 100%;
- margin-top: 20px;
- margin-bottom: 20px;
- /* height: 70vh; */
- justify-content: space-around;
- /* justify-content: space-between; */
- }
- .main-title {
- margin-bottom: 10px;
- font-weight: 550;
- color: #333333;
- font-size: 16px;
- }
- .bottom {
- width: 100%;
- flex-grow: 1;
- justify-content: flex-end;
- }
- .btnStartGame {
- width: 70%;
- height: 80rpx;
- /* margin-top: 50rpx; */
- margin-bottom: 20rpx;
- /* font-weight: bold; */
- color: white;
- font-size: 32rpx;
- line-height: 80rpx;
- border-radius: 27px;
- background-color: #2e85ec;
- }
-
- /deep/ .e-select {
- /* width: 60%; */
- height: 60rpx;
- background: #2e85ec;
- color: #ffffff;
- border-radius: 18px;
- justify-content: space-around;
- font-size: 16px;
- font-weight: 500;
- line-height: 60rpx;
- text-align: center;
- border: none !important;
- }
- /deep/ .e-select-input-text {
- color: inherit !important;
- }
- /deep/ .e-select-selector-item {
- color: #818181;
- }
- /deep/ .uni-icons {
- color: inherit !important;
- }
- /deep/ .e-select-icon {
- width: 26px !important;
- }
- </style>
|