rankOverview.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279
  1. <!--
  2. [报名] 样式3 - 排名总览
  3. http://localhost:5173/card/#/pages/bm/style4/rankOverview
  4. https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankOverview
  5. -->
  6. <template>
  7. <view class="body">
  8. <view class="content uni-column">
  9. <view class="uni-column" :class="cssTop">
  10. <my-topbar :mcName="mcName" :class="cssTopbarColor"
  11. @btnBackClick="btnBack" @btnInfoClick="btnInfo"></my-topbar>
  12. <view class="topcontent uni-column uni-jcsa">
  13. <view class="logo"></view>
  14. <text v-if="configParam.subTitle.length > 0" class="top-acttime">{{configParam.subTitle}}</text>
  15. <text v-else class="top-acttime">{{fmtMcTime2(beginSecond, endSecond)}}</text>
  16. </view>
  17. </view>
  18. <view v-if="configParam.midType == 0" class="midType0 uni-column">
  19. <view class="mid-0 uni-row uni-jcc">
  20. <view class="midType0-select">
  21. <e-select v-model="ocaId" :options="mapList" :search="false" :inputClick="true"
  22. maxHeight="300px" :clearable="false" @change="eSelectChange"></e-select>
  23. </view>
  24. <text v-if="popupHelpList.length > 0" class="mid-0-help" @click="btnHelp">帮助</text>
  25. </view>
  26. <view class="midType0-mid-1 uni-row uni-jcsa">
  27. <view class="uni-row">
  28. <image v-if="popupWarnList.length > 0" class="mid-1-yellowCard" mode="aspectFit"
  29. @click="btnWarn" src="/static/common/card_yellow.gif"></image>
  30. <text class="mid-1-text">{{nickName}}</text>
  31. </view>
  32. <text class="mid-1-text">{{coiName}}</text>
  33. <text class="mid-1-text" style="color: #aaaaaa;" v-if="mcState==1 && allowMcSignUp"
  34. @click="btnReGroup">修改</text>
  35. </view>
  36. <view class="mid-2 uni-row uni-jcsa">
  37. <view class="uni-column">
  38. <text class="mid-2-value">{{regionTotalNum}}</text>
  39. <text class="mid-2-text">总场次</text>
  40. </view>
  41. <view class="mid-line"></view>
  42. <view class="uni-column">
  43. <text class="mid-2-value">{{regionTotalCp}}</text>
  44. <text class="mid-2-text">总打点数</text>
  45. </view>
  46. <view class="mid-line"></view>
  47. <view class="uni-column">
  48. <text class="mid-2-value">{{regionTotalCpRankNum}}</text>
  49. <text class="mid-2-text">个人排名</text>
  50. </view>
  51. </view>
  52. </view>
  53. <view v-if="configParam.midType == 1" class="midType1 uni-column">
  54. <view class="midType1-mid-1 uni-row uni-jcsb">
  55. <text class="mid-1-name">{{nickName}}asdfasdfasdf</text>
  56. <view class="midType1-select">
  57. <e-select v-model="ocaId" :options="mapList" :search="false" :inputClick="true"
  58. maxHeight="300px" :clearable="false" @change="eSelectChange"></e-select>
  59. </view>
  60. <text class="uni-nowrap">总场次:{{regionTotalNum}}</text>
  61. </view>
  62. <view class="mid-2 uni-row uni-jcsa">
  63. <view class="uni-column">
  64. <text class="mid-2-value" style="color: #ff0045;">{{regionTotalSysPoint}}</text>
  65. <text class="mid-2-text">百味豆(个)</text>
  66. </view>
  67. <view class="mid-line"></view>
  68. <view class="uni-column">
  69. <text class="mid-2-value">{{fmtDistanct(regionTotalDictance)}}</text>
  70. <text class="mid-2-text">总里程km</text>
  71. </view>
  72. <view class="mid-line"></view>
  73. <view class="uni-column">
  74. <text class="mid-2-value">{{regionTotalCp}}</text>
  75. <text class="mid-2-text">打点数(个)</text>
  76. </view>
  77. <view class="mid-line"></view>
  78. <view class="uni-column">
  79. <text class="mid-2-value">{{fmtPace(regionFastPace)}}</text>
  80. <text class="mid-2-text">最快配速</text>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="main uni-column">
  85. <text class="main-title">选择比赛路线</text>
  86. <my-pathList :style="pathListStyle.style" :pathList="pathList"
  87. :selectedPath="ocaId" :mcState="mcState" :showLine="pathListStyle.showLine"
  88. @onPathClick="onPathClick"></my-pathList>
  89. </view>
  90. <view class="bottom uni-column">
  91. <button class="btnStartGame" @click="btnStartGame">开始比赛</button>
  92. </view>
  93. <my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
  94. <my-popup ref="mypopupHelp" :config="popupHelpConfig" :dataList="popupHelpList"></my-popup>
  95. <my-popup ref="mypopupWarn" :config="popupWarnConfig" :dataList="popupWarnList"></my-popup>
  96. <!-- <my-popup-map ref="mypopupmap" :point="navPoint"></my-popup-map> -->
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. import tools from '/common/tools';
  102. import {
  103. defaultPopUpDataList
  104. } from '/common/define';
  105. import {
  106. token,
  107. apiMapListQuery,
  108. apiMatchRsDetailQuery,
  109. apiCardConfigQuery,
  110. apiIsAllowMcSignUp,
  111. apiWarnMessageQuery,
  112. checkResCode
  113. } from '/common/api';
  114. export default {
  115. data() {
  116. return {
  117. // audioSrc: "/static/audio/2.mp3",
  118. // audioSrc: "https://oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
  119. // audioSrc: "http://t-oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
  120. pageName: "rankOverview",
  121. firstEnterKey: 'firstEnter-bm-style4',
  122. rankKey: "rank-bm-style4",
  123. mapKey: "rank-bm-style4-map",
  124. queryObj: {},
  125. queryString: "",
  126. token: "",
  127. ecId: 0, // 卡片id
  128. mcId: 0, // 赛事id
  129. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  130. mcName: "", // 赛事名称
  131. coiName: "", // 已报名单位名称
  132. acttime: "", // 活动时间
  133. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  134. endSecond: null, // 活动或赛事结束时间戳,单位秒
  135. ocaId: 0, // 关联id,带入到App活动详情页面
  136. nickName: "", // 昵称
  137. totalNum: null, // 总场次
  138. totalDistanct: null, // 总距离,单位米
  139. totalDistanctRankNum: null, // 总距离排名
  140. totalCp: null, // 总打点数
  141. totalCpRankNum: null, // 总打点数排名
  142. totalSysPoint: null, // 总百味豆
  143. totalSysPointRankNum: null, // 总百味豆排名
  144. fastPace: null, // 个人最快配速
  145. fastPaceRankNum: null, // 个人最快配速排名
  146. regionTotalNum: null, // 地图内总场次
  147. regionTotalCp: null, // 地图内打点数
  148. regionTotalCpRankNum: null, // 地图内个人打点排名
  149. regionTotalSysPoint: null, // 地图内积分(百味豆)
  150. regionTotalDictance: null, // 地图内里程(单位米)
  151. regionFastPace: null, // 地图内最快配速
  152. ocaRs: [], // 卡片对应活动集合
  153. mapList: [], // 地图列表
  154. interval: null,
  155. mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  156. allowMcSignUp: false, // 是否允许重新分组
  157. cssTop: "",
  158. cssTopbarColor: "",
  159. pathList: {},
  160. pathListStyle: {},
  161. popupRuleConfig: {}, // 规则弹窗配置
  162. popupHelpConfig: {}, // 帮助弹窗配置
  163. // popupWarnConfig: {}, // 警告弹窗配置
  164. popupWarnConfig: {
  165. "height": "550px"
  166. },
  167. popupDataList: [],
  168. popupHelpList: [],
  169. popupWarnList: [],
  170. navPoint: {},
  171. configParam: {
  172. subTitle: "",
  173. midType: 0
  174. },
  175. }
  176. },
  177. computed: {
  178. pathListLen() {
  179. return Object.keys(this.pathList).length;
  180. }
  181. },
  182. onLoad(query) { // 类型非必填,可自动推导
  183. // console.log("query:", query);
  184. this.queryObj = query;
  185. this.queryString = tools.objectToQueryString(this.queryObj);
  186. // console.log(queryString);
  187. this.token = query["token"] ?? token;
  188. this.ecId = query["id"] ?? 0;
  189. this.firstEnterKey += "-" + this.ecId;
  190. console.log("firstEnterKey:", this.firstEnterKey);
  191. this.rankKey += "-" + this.ecId;
  192. console.log("rankKey:", this.rankKey);
  193. this.mapKey += "-" + this.ecId;
  194. console.log("mapKey:", this.mapKey);
  195. tools.removeCssCode();
  196. const mapValue = uni.getStorageSync(this.mapKey);
  197. if (mapValue) {
  198. console.log("mapValue:", mapValue);
  199. this.ocaId = mapValue;
  200. }
  201. this.getCardConfigQuery();
  202. },
  203. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  204. onReady() {
  205. // this.dealFirstEnter();
  206. // this.playMusic();
  207. },
  208. onShow() {
  209. // uni.showToast({
  210. // icon: "none",
  211. // title: "[rankOverview] onShow"
  212. // })
  213. // if (this.$audio.audioStatus == 2 && this.$audio.audioSrc == this.audioSrc) {
  214. // this.$audio.play();
  215. // }
  216. },
  217. onUnload() {
  218. this.clear();
  219. },
  220. methods: {
  221. playMusic() {
  222. return;
  223. // uni.showToast({
  224. // title: 'playMusic',
  225. // icon: 'none',
  226. // duration: 2000
  227. // });
  228. // if (this.$audio.audioStatus == 0 || this.$audio.audioSrc != this.audioSrc) {
  229. // this.$audio.playAudio(this.audioSrc);
  230. // }
  231. },
  232. dealNotice(rank) {
  233. // console.log('[dealFirstEnter]');
  234. let that = this;
  235. uni.getStorage({
  236. key: that.rankKey,
  237. success: (res) => {
  238. console.log('[getStorage]', that.rankKey, res.data);
  239. const oldRank = res.data;
  240. if (oldRank != rank) {
  241. // that.notice = true;
  242. that.setRankValue(rank);
  243. }
  244. },
  245. fail: (e) => {
  246. console.log('[getStorage] fail', that.rankKey, e);
  247. // that.notice = false;
  248. that.setRankValue(rank);
  249. },
  250. })
  251. },
  252. setRankValue(data) {
  253. let that = this;
  254. uni.setStorage({
  255. key: that.rankKey,
  256. data: data,
  257. success: () => {
  258. console.log('[setStorage] success', that.rankKey, data);
  259. },
  260. fail: (e) => {
  261. console.log('[setStorage] fail', that.rankKey, e);
  262. },
  263. })
  264. },
  265. dealFirstEnter() {
  266. // console.log('[dealFirstEnter]');
  267. let that = this;
  268. uni.getStorage({
  269. key: that.firstEnterKey,
  270. success: (res) => {
  271. console.log('[getStorage]', that.firstEnterKey, res.data);
  272. },
  273. fail: (e) => {
  274. console.log('[getStorage] fail', that.firstEnterKey, e);
  275. that.btnInfo();
  276. that.setFirstEnterValue(true);
  277. },
  278. })
  279. },
  280. setFirstEnterValue(data) {
  281. let that = this;
  282. uni.setStorage({
  283. key: that.firstEnterKey,
  284. data: data,
  285. success: () => {
  286. console.log('[setStorage] success', that.firstEnterKey, data);
  287. },
  288. fail: (e) => {
  289. console.log('[setStorage] fail', that.firstEnterKey, e);
  290. },
  291. })
  292. },
  293. clear() {
  294. if (this.interval != null) {
  295. clearInterval(this.interval);
  296. this.interval = null;
  297. }
  298. },
  299. loadConfig(config) {
  300. // console.log("config", config);
  301. // 加载CSS样式
  302. const css = config.css;
  303. if (css != undefined && css.length > 0) {
  304. tools.loadCssCode(css);
  305. if (css.indexOf(".top{") >= 0) {
  306. this.cssTop = "top";
  307. }
  308. if (css.indexOf(".topbar-color{") >= 0) {
  309. this.cssTopbarColor = "topbar-color";
  310. }
  311. }
  312. if (this.cssTop == "") {
  313. this.cssTop = "top-default";
  314. }
  315. if (this.cssTopbarColor == "") {
  316. this.cssTopbarColor = "topbar-color-default";
  317. }
  318. console.log("[loadConfig] cssTop:", this.cssTop);
  319. console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);
  320. // 加载比赛路线数据
  321. const pathList = config.pathList;
  322. // console.log("[loadConfig] pathList:", pathList);
  323. if (pathList != undefined) {
  324. this.pathList = pathList;
  325. }
  326. // 加载比赛路线样式
  327. const pathListStyle = config.pathListStyle;
  328. // console.log("[loadConfig] pathList:", pathList);
  329. if (pathListStyle != undefined) {
  330. this.pathListStyle = pathListStyle;
  331. }
  332. // 加载规则弹窗配置
  333. const popupRuleConfig = config.popupRuleConfig;
  334. if (popupRuleConfig != undefined) {
  335. this.popupRuleConfig = popupRuleConfig;
  336. }
  337. // console.log("[loadConfig] popupRuleConfig:", this.popupRuleConfig);
  338. // 加载帮助弹窗配置
  339. const popupHelpConfig = config.popupHelpConfig;
  340. if (popupHelpConfig != undefined) {
  341. this.popupHelpConfig = popupHelpConfig;
  342. }
  343. // console.log("[loadConfig] popupHelpConfig:", this.popupHelpConfig);
  344. // 加载警告弹窗配置
  345. const popupWarnConfig = config.popupWarnConfig;
  346. if (popupWarnConfig != undefined) {
  347. this.popupWarnConfig = popupWarnConfig;
  348. }
  349. // console.log("[loadConfig] popupWarnConfig:", this.popupWarnConfig);
  350. // 加载弹窗数据
  351. const popupDataList = config.popupDataList;
  352. // console.log("[loadConfig] popupDataList:", popupDataList);
  353. if (popupDataList != undefined && popupDataList.length > 0) {
  354. for (var i = 0; i < popupDataList.length; i++) {
  355. // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
  356. if (popupDataList[i] == 'default') {
  357. for (var j = 0; j < defaultPopUpDataList.length; j++) {
  358. this.popupDataList.push(defaultPopUpDataList[j]);
  359. }
  360. } else {
  361. this.popupDataList.push(popupDataList[i]);
  362. }
  363. }
  364. } else {
  365. this.popupDataList = defaultPopUpDataList;
  366. console.log("[loadConfig] popupDataList 加载默认列表");
  367. }
  368. // console.log("[loadConfig] popupDataList:", this.popupDataList);
  369. // 加载弹窗(帮助)数据
  370. const popupHelpList = config.popupHelpList;
  371. if (popupHelpList != undefined && popupHelpList.length > 0) {
  372. for (var i = 0; i < popupHelpList.length; i++) {
  373. // console.log("[loadConfig] popupHelpList", i, popupHelpList[i]);
  374. this.popupHelpList.push(popupHelpList[i]);
  375. }
  376. }
  377. // console.log("[loadConfig] popupHelpList:", this.popupHelpList);
  378. // 加载页面参数
  379. const param = config.param;
  380. if (param != undefined) {
  381. if (param.subTitle != undefined && param.subTitle.length > 0) {
  382. this.configParam.subTitle = param.subTitle;
  383. }
  384. if (param.midType != undefined && param.midType >= 0) {
  385. this.configParam.midType = param.midType;
  386. }
  387. }
  388. // console.log("[loadConfig] param:", this.configParam);
  389. },
  390. // 获取倒计时
  391. getCountdown() {
  392. // console.log(this.endSecond)
  393. if (this.endSecond > 0) {
  394. const now = Date.now() / 1000;
  395. const dif = this.endSecond - now;
  396. // const dif = 3600*24 - 60;
  397. if (dif > 0) {
  398. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  399. } else {
  400. this.countdown = "活动已结束";
  401. }
  402. // this.countdown = tools.convertSecondsToHMS(dif);
  403. } else {
  404. this.countdown = "距结束 --天--小时";
  405. }
  406. },
  407. // 格式化 距离
  408. fmtDistanct(val) {
  409. if (val >= 0) {
  410. return Math.round(val * 100 / 1000) / 100;
  411. } else {
  412. return '--';
  413. }
  414. /* if (val < 1000)
  415. return Math.round(val * 10 / 1000) / 10;
  416. else
  417. return Math.round(val / 1000); */
  418. },
  419. // 格式化 配速
  420. fmtPace(val) {
  421. if (val >= 0) {
  422. return tools.convertSecondsToHMS(val, 2);
  423. } else {
  424. return '--';
  425. }
  426. },
  427. fmtMcTime(timestamp) {
  428. return tools.fmtMcTime(timestamp);
  429. },
  430. // 获取活动时间
  431. getActtime() {
  432. this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
  433. },
  434. fmtMcTime2(timestamp1, timestamp2) {
  435. return tools.fmtMcTime2(timestamp1, timestamp2);
  436. },
  437. getCardConfigQuery() {
  438. uni.request({
  439. url: apiCardConfigQuery,
  440. header: {
  441. "Content-Type": "application/x-www-form-urlencoded",
  442. "token": this.token,
  443. },
  444. method: "POST",
  445. data: {
  446. ecId: this.ecId,
  447. pageName: this.pageName
  448. },
  449. success: (res) => {
  450. // console.log("getCardConfigQuery", res)
  451. const data = res.data.data;
  452. // console.log("configJson", data.configJson);
  453. const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
  454. // console.log("configJson", data.configJson);
  455. /* const config = {
  456. "css": `
  457. .top{
  458. position: relative;
  459. width: 100%;
  460. height: 220px;
  461. padding-top: 36px;
  462. justify-content: space-between;
  463. background-image: url('static/backgroud/top_bg_dengshanjie.png');
  464. background-repeat: no-repeat;
  465. background-position-x: center;
  466. background-position-y: center;
  467. background-size: cover;
  468. }
  469. .topcontent {
  470. display: none !important;
  471. }
  472. .topbar-color{
  473. color: #333333;
  474. }
  475. .mid{
  476. margin-top: -40px !important;
  477. }
  478. .btnStartGame{
  479. background-color: #ff870e !important;
  480. }
  481. .e-select{
  482. background-color: #ff870e !important;
  483. }
  484. .swiper-item-button{
  485. background-color: #ff870e !important;
  486. }
  487. .uni-swiper-dot-active{
  488. background: #ff870e !important;
  489. }
  490. `,
  491. "pathList": {
  492. "row1": [{
  493. "type": 3,
  494. "pathImg": "/static/common/lingxiucheng.png",
  495. "path": {
  496. "ocaId": 1,
  497. "mcType": 3
  498. },
  499. "navImg": "/static/common/nav.png",
  500. "point": {
  501. "longitude": 117.022194,
  502. "latitude": 36.661612,
  503. "name": "领秀城起始点"
  504. }
  505. },
  506. {
  507. "type": 3,
  508. "pathImg": "/static/common/quanchenggongyuan.png",
  509. "path": {
  510. "ocaId": 1,
  511. "mcType": 3
  512. },
  513. "navImg": "/static/common/nav.png",
  514. "point": {
  515. "longitude": 117.022194,
  516. "latitude": 36.661612,
  517. "name": "泉城公园起始点"
  518. }
  519. }
  520. ],
  521. "row2": [{
  522. "type": 3,
  523. "pathImg": "/static/common/baihuagongyuan.png",
  524. "path": {
  525. "ocaId": 1,
  526. "mcType": 3
  527. },
  528. "navImg": "/static/common/nav.png",
  529. "point": {
  530. "longitude": 117.022194,
  531. "latitude": 36.661612,
  532. "name": "百花公园起始点"
  533. }
  534. },
  535. {
  536. "type": 3,
  537. "pathImg": "/static/common/aotizhongxin.png",
  538. "path": {
  539. "ocaId": 1,
  540. "mcType": 3
  541. },
  542. "navImg": "/static/common/nav.png",
  543. "point": {
  544. "longitude": 117.022194,
  545. "latitude": 36.661612,
  546. "name": "奥体中心起始点"
  547. }
  548. }
  549. ],
  550. "row3": [{
  551. "type": 3,
  552. "pathImg": "/static/common/muniushan.png",
  553. "path": {
  554. "ocaId": 1,
  555. "mcType": 3
  556. },
  557. "navImg": "/static/common/nav.png",
  558. "point": {
  559. "longitude": 117.022194,
  560. "latitude": 36.661612,
  561. "name": "牧牛山起始点"
  562. }
  563. }]
  564. },
  565. "pathListStyle" : {
  566. "showLine" : true,
  567. "style": "justify-content: flex-start;"
  568. },
  569. "popupRuleConfig": {
  570. "height": "530px"
  571. },
  572. "popupDataList": [
  573. {
  574. "type": 7,
  575. "data": {
  576. "title": "活动规则",
  577. "content": "<br>① 任何人、任何时间均可体验参赛。<br><br>② 6个场地任意选,比赛时间内,不限次数参赛。<br><br>③ 1次成功打点,获取1个百味豆。<br><br>④ 1次正确答题,获取1个百味豆。"
  578. }
  579. },
  580. {
  581. "type": 7,
  582. "data": {
  583. "title": "活动奖励",
  584. "content": "<br><li>活动: 20个百味豆兑换一个鸡蛋<br><span style='font-size: 12px; color:#999999;'>(限本次活动百味豆,兑换以“蛋叔券”为准)</style><li>百味豆越多,“蛋叔”给你的鸡蛋 越多,上不封顶!<li>随时可以兑换哦~<li>能不能吃上自己挣的鸡蛋,就看你的了!<li style='color:#FF870E;'><span style='color:#FF870E;'>同时,参赛即可获取合作机构的奖励!</span><br><br>",
  585. "imageList": [{
  586. "src": "/static/common/danshu.png",
  587. "width": "183px",
  588. "height": "81px"
  589. }]
  590. }
  591. },
  592. {
  593. "type": 7,
  594. "data": {
  595. "title": "合作机构",
  596. "logo": {
  597. "src": "/static/logo/xxhpgy.png",
  598. "width": "120px",
  599. "height": "120px",
  600. "memo": "星星和蒲公英双语阅读馆"
  601. },
  602. "content": "星星和蒲公英双语阅读馆,济南儿童阅读网红圣地!馆藏2W+册正版图书,涵盖中英文大奖绘本、桥梁书、自然科学与文学社科名著,以及艺术画册和摄影图集。开展面向4-12岁孩子的中文阅读读书会&中英双语阅读课。<br><br><span style='color:#FF870E;'>礼品一:到店阅读权限一年<br>礼品二:店内饮品五折券一张</span>",
  603. "pointList": [
  604. {
  605. "name": "电话:<a href='tel:18765812082' style='color: #333333;'>18765812082</a>",
  606. "longitude": 117.075174,
  607. "latitude": 36.654108
  608. }
  609. ]
  610. }
  611. },
  612. {
  613. "type": 7,
  614. "data": {
  615. "title": "合作机构",
  616. "logo": {
  617. "src": "/static/logo/wensiyu.png",
  618. "width": "120px",
  619. "height": "120px",
  620. "memo": "文思语少年读书会"
  621. },
  622. "content": "文思语少年读书会,专注于为4-15岁儿童和家庭提供阅读素养发展解决方案和产品。读书会以整本书精读伴读为核心,塑造良好的读书习惯,训练阅读理解能力,培养创意作文能力。<br><br><span style='color:#FF870E;'>礼品:《山海经》精装套系书<br>书籍原价158元,仅需19.9元/套,不限领取次数,多余权限可赠送他人使用!</span>",
  623. "pointList": [
  624. {
  625. "name": "电话:<a href='tel:17663733631' style='color: #333333;'>17663733631</a>",
  626. "longitude": 117.075174,
  627. "latitude": 36.654108
  628. }
  629. ]
  630. }
  631. },
  632. {
  633. "type": 7,
  634. "data": {
  635. "title": "合作机构",
  636. "logo": {
  637. "src": "/static/logo/lezhigu.png",
  638. "width": "120px",
  639. "height": "120px",
  640. "memo": "乐知谷"
  641. },
  642. "content": "乐知谷是济南科学类口碑最好的机构,主做面向4-12岁儿童,内容涵盖工程科技、自然科学、生命科学、地球太空、PBL综合项目等五大板块,室内&户外相结合,真正将实验、动手、探究融于生活,培养独立思考、永存好奇、敢于创造的未来型孩子。<br><span style='color:#FF870E;'>礼品:乐知谷经典工程体验课《建造一座斜拉桥》一堂,感受力学结构的科技含量课程每人限参与1次,多余权限可赠送他人使用</span>",
  643. "pointList": [
  644. {
  645. "name": "电话:<a href='tel:19100652564' style='color: #333333;'>19100652564</a>",
  646. "longitude": 117.075174,
  647. "latitude": 36.654108
  648. }
  649. ]
  650. }
  651. },
  652. {
  653. "type": 7,
  654. "data": {
  655. "title": "合作机构",
  656. "logo": {
  657. "src": "/static/logo/kusentiyu.png",
  658. "width": "120px",
  659. "height": "120px",
  660. "memo": "酷森体育俱乐部"
  661. },
  662. "content": "酷森体育俱乐部包含少儿篮球、体能训练、跳绳,三大课程。拥有二十年以上资深学院派专家教练团队,制定系统的少儿运动训练体系,结合不同年龄及能力的孩子进行定制化教学,使其更符合不同孩子的综合能力提升。<br><br><span style='color:#FF870E;'>礼品:手机全年影视会员卡</span>",
  663. "pointList": [
  664. {
  665. "name": "电话:<a href='tel:15621875115' style='color: #333333;'>15621875115</a>",
  666. "longitude": 117.075174,
  667. "latitude": 36.654108
  668. }
  669. ]
  670. }
  671. }
  672. ],
  673. "popupWarnConfig": {
  674. "height": "550px"
  675. },
  676. "param": {
  677. "subTitle": "",
  678. "midType": 1
  679. }
  680. }; */
  681. this.loadConfig(config);
  682. this.matchRsDetailQuery();
  683. this.warnMessageQuery();
  684. setTimeout(this.dealFirstEnter, 500);
  685. },
  686. fail: (err) => {
  687. console.log("getCardConfigQuery err", err)
  688. },
  689. });
  690. },
  691. // 卡片对应地图列表详情查询
  692. mapListQuery() {
  693. uni.request({
  694. url: apiMapListQuery,
  695. header: {
  696. "Content-Type": "application/x-www-form-urlencoded",
  697. "token": this.token,
  698. },
  699. method: "POST",
  700. data: {
  701. mcId: this.mcId
  702. },
  703. success: (res) => {
  704. // console.log("mapListQuery", res);
  705. if (res.data.code == 0) {
  706. const data = res.data.data;
  707. this.mapList = data;
  708. let mapItems = [];
  709. for (var i = 0; i < data.length; i++) {
  710. let map = {};
  711. map.text = data[i].mapName;
  712. map.value = data[i].ocaId;
  713. mapItems.push(map);
  714. }
  715. this.mapList = mapItems;
  716. // console.log("mapList", this.mapList);
  717. }
  718. },
  719. fail: (err) => {
  720. console.log("mapListQuery err", err);
  721. },
  722. });
  723. },
  724. // 卡片对应线上赛多个活动查询
  725. matchRsDetailQuery() {
  726. uni.request({
  727. url: apiMatchRsDetailQuery,
  728. header: {
  729. "Content-Type": "application/x-www-form-urlencoded",
  730. "token": this.token,
  731. },
  732. method: "POST",
  733. data: {
  734. ecId: this.ecId,
  735. ocaId: this.ocaId
  736. },
  737. success: (res) => {
  738. // console.log("matchRsDetailQuery", res);
  739. if (checkResCode(res)) {
  740. const data = res.data.data;
  741. this.mcType = data.mcType;
  742. this.mcId = data.mcId;
  743. this.mcName = data.mcName;
  744. this.coiName = data.coiName;
  745. this.beginSecond = data.beginSecond;
  746. this.endSecond = data.endSecond;
  747. this.nickName = data.nickName;
  748. this.totalNum = data.totalNum;
  749. this.totalDistanct = data.totalDistanct;
  750. this.totalDistanctRankNum = data.totalDistanctRankNum;
  751. this.totalCp = data.totalCp;
  752. this.totalCpRankNum = data.totalCpRankNum;
  753. this.totalSysPoint = data.totalSysPoint;
  754. this.totalSysPointRankNum = data.totalSysPointRankNum;
  755. this.fastPace = data.fastPace;
  756. this.fastPaceRankNum = data.fastPaceRankNum;
  757. this.regionTotalNum = data.regionTotalNum;
  758. this.regionTotalCp = data.regionTotalCp;
  759. this.regionTotalCpRankNum = data.regionTotalCpRankNum;
  760. this.regionTotalSysPoint = data.regionTotalSysPoint;
  761. this.regionTotalDictance = data.regionTotalDictance;
  762. this.regionFastPace = data.regionFastPace;
  763. this.ocaRs = data.ocaRs;
  764. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  765. const rank = JSON.stringify(data);
  766. this.dealNotice(rank);
  767. this.getCountdown();
  768. this.getActtime();
  769. this.isAllowMcSignUp();
  770. this.mapListQuery();
  771. this.clear();
  772. this.interval = setInterval(this.getCountdown, 60000);
  773. }
  774. },
  775. fail: (err) => {
  776. console.log("matchRsDetailQuery err", err)
  777. },
  778. });
  779. },
  780. // 是否允许重新分组(报名)
  781. isAllowMcSignUp() {
  782. uni.request({
  783. url: apiIsAllowMcSignUp,
  784. header: {
  785. "Content-Type": "application/x-www-form-urlencoded",
  786. "token": this.token,
  787. },
  788. method: "POST",
  789. data: {
  790. ecId: this.ecId
  791. },
  792. success: (res) => {
  793. // console.log("isAllowMcSignUp", res)
  794. if (res.data.code == 0) {
  795. const data = res.data.data;
  796. this.allowMcSignUp = data.allowSignUp;
  797. }
  798. },
  799. fail: (err) => {
  800. console.log("isAllowMcSignUp err", err)
  801. },
  802. });
  803. },
  804. // 警告列表查询
  805. warnMessageQuery() {
  806. uni.request({
  807. url: apiWarnMessageQuery,
  808. header: {
  809. "Content-Type": "application/x-www-form-urlencoded",
  810. "token": this.token,
  811. },
  812. method: "POST",
  813. data: {
  814. ecId: this.ecId
  815. },
  816. success: (res) => {
  817. // console.log("warnMessageQuery", res);
  818. if (checkResCode(res)) {
  819. const warnRs = res.data.data;
  820. this.popupWarnList.length = 0;
  821. for (var i = 0; i < warnRs.length; i++) {
  822. let popupData = {
  823. type: 9, // 9: 警告
  824. data: {}
  825. };
  826. popupData.data.warnType = warnRs[i].warnType;
  827. popupData.data.title = warnRs[i].warnTitle;
  828. popupData.data.iconUrl = warnRs[i].iconUrl;
  829. popupData.data.iconNum = warnRs[i].iconNum;
  830. popupData.data.message = warnRs[i].warnMessage;
  831. popupData.data.qrCodeUrl = warnRs[i].qrCodeUrl;
  832. this.popupWarnList.push(popupData);
  833. }
  834. /* this.popupWarnList.push(
  835. {
  836. type: 9, // 9: 警告
  837. data: {
  838. warnType: 1,
  839. title: "黄牌",
  840. iconUrl: "/static/common/card_yellows.png",
  841. iconNum: 1,
  842. message: `亲爱的参赛者:
  843.   收到此黄牌,说明您的比赛数据被系统判定为存在异常,此次比赛(活动)为徒步定向校园文化主题活动,请自觉遵守规则,如果您收到的黄牌数量过多<span style='color: red'>(超过2张)</span>,您的成绩将影响到您的院系/单位成绩,同时您的个人成绩也有可能根据规则被取消。如果您坚持您的比赛数据没有问题,请联系我们的客服人员,谢谢!
  844.   让我们一起创造文明、和谐的校园生活,感谢您的支持!`,
  845. qrCodeUrl: "https://orienteering.beswell.com/shanda/%E8%AD%A6%E5%91%8A%E4%BA%8C%E7%BB%B4%E7%A0%81%402x.png"
  846. }
  847. }
  848. ); */
  849. // console.log("popupMessageList", this.popupMessageList);
  850. }
  851. },
  852. fail: (err) => {
  853. console.log("warnMessageQuery err", err)
  854. },
  855. });
  856. },
  857. btnBack() {
  858. // const url = `action://to_home/`;
  859. // tools.appAction(url);
  860. // uni.navigateTo({
  861. // url: "/pages/bm/style4/rankList?" + this.queryString
  862. // });
  863. const url = "/pages/bm/style4/rankList?" + this.queryString;
  864. tools.appAction(url, "uni.navigateTo");
  865. },
  866. btnInfo() {
  867. // console.log(this.$refs.mypopup);
  868. this.$refs.mypopup.popupOpen();
  869. },
  870. btnHelp() {
  871. this.$refs.mypopupHelp.popupOpen();
  872. },
  873. btnWarn() {
  874. this.$refs.mypopupWarn.popupOpen();
  875. },
  876. btnReGroup() {
  877. this.queryObj.from = "rankOverview";
  878. this.queryString = tools.objectToQueryString(this.queryObj);
  879. // uni.navigateTo({
  880. // url: '/pages/bm/style4/signup?' + this.queryString
  881. // });
  882. const url = '/pages/bm/style4/signup?' + this.queryString;
  883. tools.appAction(url, "uni.navigateTo");
  884. },
  885. onOverviewClick(ovtype) {
  886. this.queryObj.ovtype = ovtype;
  887. this.queryString = tools.objectToQueryString(this.queryObj);
  888. // uni.navigateTo({
  889. // url: "/pages/bm/style4/rankList?" + this.queryString
  890. // });
  891. const url = "/pages/bm/style4/rankList?" + this.queryString;
  892. tools.appAction(url, "uni.navigateTo");
  893. },
  894. eSelectChange(data) {
  895. // console.log("eSelectChange:", data);
  896. this.ocaId = data.value;
  897. this.matchRsDetailQuery();
  898. uni.setStorageSync(this.mapKey, this.ocaId);
  899. },
  900. onPathClick(data) {
  901. console.log("onPathClick:", data);
  902. if (this.ocaId != data.path.ocaId) {
  903. this.ocaId = data.path.ocaId;
  904. this.matchRsDetailQuery();
  905. uni.setStorageSync(this.mapKey, data.path.ocaId);
  906. }
  907. },
  908. btnStartGame() {
  909. // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  910. if (this.mcState == 1) {
  911. const url = `action://to_detail/?id=${this.ocaId}&matchType=${this.mcType}`;
  912. tools.appAction(url);
  913. } else if (this.mcState == 0) {
  914. uni.showToast({
  915. title: '比赛尚未开始',
  916. icon: 'none',
  917. duration: 3000
  918. });
  919. } else if (this.mcState == 2) {
  920. uni.showToast({
  921. title: '比赛已结束',
  922. icon: 'none',
  923. duration: 3000
  924. });
  925. }
  926. }
  927. }
  928. }
  929. </script>
  930. <style scoped>
  931. .content {
  932. width: 100vw;
  933. min-height: 100vh;
  934. overflow-x: scroll;
  935. }
  936. .top-default {
  937. position: relative;
  938. z-index: 10;
  939. width: 100%;
  940. height: 270px;
  941. padding-top: 36px;
  942. justify-content: space-between;
  943. background-image: url("/static/backgroud/top_bg_egg2.png");
  944. background-repeat: no-repeat;
  945. background-position-x: center;
  946. background-position-y: -8px;
  947. background-size: 100% 100%;
  948. /* background-size: cover; */
  949. }
  950. .topbar-color-default {
  951. color: #333333;
  952. }
  953. .topcontent {
  954. height: 90%;
  955. margin-bottom: 50px;
  956. }
  957. .logo {
  958. width: 80px;
  959. height: 80px;
  960. margin-top: 10px;
  961. /* background-image: url('/static/logo/sddx.png'); */
  962. background-repeat: no-repeat;
  963. background-position-x: center;
  964. background-position-y: center;
  965. background-size: contain;
  966. }
  967. .top-acttime {
  968. display: none;
  969. text-shadow: 3px 3px 0px #640008;
  970. font-family: YouSheBiaoTiHei;
  971. /* font-family: Arial, Helvetica, sans-serif; */
  972. font-weight: bold;
  973. color: #ffee0b;
  974. font-size: 26px;
  975. }
  976. .topbtm {
  977. width: 100%;
  978. /* height: 60rpx; */
  979. margin-bottom: 40px;
  980. justify-content: space-evenly;
  981. }
  982. .topbtm-name {
  983. /* width: 320rpx; */
  984. /* height: 28px; */
  985. padding: 5px 12px;
  986. background-color: #9fda39;
  987. border-radius: 5px;
  988. /* backdrop-filter: blur(30px); */
  989. text-align: center;
  990. font-weight: 500;
  991. color: #497400;
  992. font-size: 14px;
  993. }
  994. .midType0 {
  995. width: 90%;
  996. height: 150px;
  997. position: relative;
  998. z-index: 20;
  999. margin-top: -40px;
  1000. background: #ffffff;
  1001. border-radius: 9px;
  1002. box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
  1003. font-family: Source Han Sans CN;
  1004. }
  1005. .midType1 {
  1006. width: 90%;
  1007. height: 112px;
  1008. position: relative;
  1009. z-index: 20;
  1010. margin-top: -70px;
  1011. background: #ffffff;
  1012. border-radius: 9px;
  1013. box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
  1014. font-family: Source Han Sans CN;
  1015. }
  1016. .mid-0 {
  1017. width: 90%;
  1018. margin: 12px;
  1019. }
  1020. .midType0-select {
  1021. width: 60%;
  1022. font-weight: 500;
  1023. color: #8e8e8e;
  1024. font-size: 14px;
  1025. }
  1026. .mid-0-help {
  1027. position: absolute;
  1028. right: 30px;
  1029. font-size: 12px;
  1030. font-weight: 500;
  1031. color: #992900;
  1032. }
  1033. .midType0-mid-1 {
  1034. width: 90%;
  1035. margin-bottom: 12px;
  1036. }
  1037. .midType1-select {
  1038. /* width: 46%; */
  1039. min-width: 46%;
  1040. max-width: 50%;
  1041. margin: 0 5px;
  1042. font-weight: 500;
  1043. color: #8e8e8e;
  1044. font-size: 14px;
  1045. }
  1046. .midType1-mid-1 {
  1047. width: 90%;
  1048. margin: 12px;
  1049. font-weight: 500;
  1050. color: #8e8e8e;
  1051. font-size: 14px;
  1052. }
  1053. .mid-1-yellowCard {
  1054. width: 15px;
  1055. height: 20px;
  1056. margin-right: 10px;
  1057. }
  1058. .mid-1-name {
  1059. max-width: 360rpx;
  1060. white-space: nowrap;
  1061. overflow: hidden;
  1062. text-overflow: ellipsis;
  1063. }
  1064. .mid-1-text {
  1065. /* min-width: 60px; */
  1066. font-weight: 500;
  1067. color: #9a300e;
  1068. font-size: 12px;
  1069. }
  1070. .mid-2 {
  1071. width: 92%;
  1072. /* margin: 0 10px; */
  1073. }
  1074. .mid-2-value {
  1075. font-weight: 900;
  1076. font-size: 22px;
  1077. line-height: 25px;
  1078. }
  1079. .mid-2-text {
  1080. color: #989898;
  1081. font-size: 12px;
  1082. }
  1083. .mid-line {
  1084. width: 0px;
  1085. height: 40px;
  1086. border: 1px solid;
  1087. border-color: #e6e6e6;
  1088. }
  1089. .overview-1 {
  1090. width: 111px;
  1091. height: 54px;
  1092. background: #ffb40b;
  1093. border-radius: 50%;
  1094. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1095. pointer-events: auto;
  1096. }
  1097. .overview-2 {
  1098. margin-top: -43px;
  1099. color: #ffffff;
  1100. font-size: 18px;
  1101. pointer-events: auto;
  1102. }
  1103. .overview-3 {
  1104. width: 111px;
  1105. height: 54px;
  1106. background: #f39509;
  1107. border-radius: 50%;
  1108. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1109. pointer-events: auto;
  1110. }
  1111. .overview-4 {
  1112. width: 111px;
  1113. height: 54px;
  1114. background: #81cd00;
  1115. border-radius: 50%;
  1116. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1117. pointer-events: auto;
  1118. }
  1119. .overview-5 {
  1120. width: 111px;
  1121. height: 54px;
  1122. background: #64cbb0;
  1123. border-radius: 50%;
  1124. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1125. pointer-events: auto;
  1126. }
  1127. .ovline1 {
  1128. margin-top: 9px;
  1129. color: #ffffff;
  1130. font-size: 12px;
  1131. }
  1132. .ovline2 {
  1133. color: #ffffff;
  1134. font-size: 16px;
  1135. }
  1136. .main {
  1137. width: 100%;
  1138. margin-top: 20px;
  1139. margin-bottom: 20px;
  1140. /* height: 70vh; */
  1141. justify-content: space-around;
  1142. /* justify-content: space-between; */
  1143. }
  1144. .main-title {
  1145. margin-bottom: 10px;
  1146. font-weight: 550;
  1147. color: #333333;
  1148. font-size: 16px;
  1149. }
  1150. .bottom {
  1151. width: 100%;
  1152. flex-grow: 1;
  1153. justify-content: flex-end;
  1154. }
  1155. .btnStartGame {
  1156. width: 70%;
  1157. height: 80rpx;
  1158. /* margin-top: 50rpx; */
  1159. margin-bottom: 20rpx;
  1160. /* font-weight: bold; */
  1161. color: white;
  1162. font-size: 32rpx;
  1163. line-height: 80rpx;
  1164. border-radius: 27px;
  1165. background-color: #2e85ec;
  1166. }
  1167. /deep/ .e-select {
  1168. /* width: 60%; */
  1169. height: 60rpx;
  1170. background: #2e85ec;
  1171. color: #ffffff;
  1172. border-radius: 18px;
  1173. justify-content: space-around;
  1174. font-size: 16px;
  1175. font-weight: 500;
  1176. line-height: 60rpx;
  1177. text-align: center;
  1178. border: none !important;
  1179. }
  1180. /deep/ .e-select-input-text {
  1181. color: inherit !important;
  1182. }
  1183. /deep/ .e-select-selector-item {
  1184. color: #818181;
  1185. }
  1186. /deep/ .uni-icons {
  1187. color: inherit !important;
  1188. }
  1189. /deep/ .e-select-icon {
  1190. width: 26px !important;
  1191. }
  1192. </style>