rankOverview.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  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 class="mid uni-column">
  19. <view class="mid-0 uni-row uni-jcc">
  20. <view class="mid-0-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="mid-1 uni-row uni-jcsa">
  27. <text class="mid-1-text">{{nickName}}</text>
  28. <text class="mid-1-text">{{coiName}}</text>
  29. <text class="mid-1-text" style="color: #aaaaaa;" v-if="mcState==1 && allowMcSignUp"
  30. @click="btnReGroup">修改</text>
  31. </view>
  32. <view class="mid-2 uni-row uni-jcsa">
  33. <view class="uni-column">
  34. <text class="mid-2-value">{{regionTotalNum}}</text>
  35. <text class="mid-2-text">总场次</text>
  36. </view>
  37. <view class="mid-line"></view>
  38. <view class="uni-column">
  39. <text class="mid-2-value">{{regionTotalCp}}</text>
  40. <text class="mid-2-text">总打点数</text>
  41. </view>
  42. <view class="mid-line"></view>
  43. <view class="uni-column">
  44. <text class="mid-2-value">{{regionTotalCpRankNum}}</text>
  45. <text class="mid-2-text">个人排名</text>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="main uni-column">
  50. <text class="main-title">选择比赛路线</text>
  51. <my-pathList :style="pathListStyle.style" :pathList="pathList"
  52. :selectedPath="ocaId" :mcState="mcState" :showLine="pathListStyle.showLine"
  53. @onPathClick="onPathClick"></my-pathList>
  54. </view>
  55. <view class="bottom uni-column">
  56. <button class="btnStartGame" @click="btnStartGame">开始比赛</button>
  57. </view>
  58. <my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
  59. <my-popup ref="mypopupHelp" :config="popupHelpConfig" :dataList="popupHelpList"></my-popup>
  60. <!-- <my-popup-map ref="mypopupmap" :point="navPoint"></my-popup-map> -->
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import tools from '/common/tools';
  66. import {
  67. defaultPopUpDataList
  68. } from '/common/define';
  69. import {
  70. token,
  71. apiMapListQuery,
  72. apiMatchRsDetailQuery,
  73. apiCardConfigQuery,
  74. apiIsAllowMcSignUp,
  75. checkResCode
  76. } from '/common/api';
  77. export default {
  78. data() {
  79. return {
  80. // audioSrc: "/static/audio/2.mp3",
  81. // audioSrc: "https://oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
  82. // audioSrc: "http://t-oss-mbh5.colormaprun.com/card/static/audio/2.mp3",
  83. pageName: "rankOverview",
  84. firstEnterKey: 'firstEnter-bm-style4',
  85. rankKey: "rank-bm-style4",
  86. mapKey: "rank-bm-style4-map",
  87. queryObj: {},
  88. queryString: "",
  89. token: "",
  90. ecId: 0, // 卡片id
  91. mcId: 0, // 赛事id
  92. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  93. mcName: "", // 赛事名称
  94. coiName: "", // 已报名单位名称
  95. acttime: "", // 活动时间
  96. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  97. endSecond: null, // 活动或赛事结束时间戳,单位秒
  98. ocaId: 0, // 关联id,带入到App活动详情页面
  99. nickName: "", // 昵称
  100. totalNum: null, // 总场次
  101. totalDistanct: null, // 总距离,单位米
  102. totalDistanctRankNum: null, // 总距离排名
  103. totalCp: null, // 总打点数
  104. totalCpRankNum: null, // 总打点数排名
  105. totalSysPoint: null, // 总百味豆
  106. totalSysPointRankNum: null, // 总百味豆排名
  107. fastPace: null, // 个人最快配速
  108. fastPaceRankNum: null, // 个人最快配速排名
  109. regionTotalNum: null, // 地图内总场次
  110. regionTotalCp: null, // 地图内打点数
  111. regionTotalCpRankNum: null, // 地图内个人打点排名
  112. ocaRs: [], // 卡片对应活动集合
  113. mapList: [], // 地图列表
  114. interval: null,
  115. mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  116. allowMcSignUp: false, // 是否允许重新分组
  117. cssTop: "",
  118. cssTopbarColor: "",
  119. pathList: {},
  120. pathListStyle: {},
  121. popupRuleConfig: {}, // 规则弹窗配置
  122. popupHelpConfig: {}, // 帮助弹窗配置
  123. popupDataList: [],
  124. popupHelpList: [],
  125. navPoint: {},
  126. configParam: {
  127. subTitle: ""
  128. },
  129. }
  130. },
  131. computed: {
  132. pathListLen() {
  133. return Object.keys(this.pathList).length;
  134. }
  135. },
  136. onLoad(query) { // 类型非必填,可自动推导
  137. // console.log("query:", query);
  138. this.queryObj = query;
  139. this.queryString = tools.objectToQueryString(this.queryObj);
  140. // console.log(queryString);
  141. this.token = query["token"] ?? token;
  142. this.ecId = query["id"] ?? 0;
  143. this.firstEnterKey += "-" + this.ecId;
  144. console.log("firstEnterKey:", this.firstEnterKey);
  145. this.rankKey += "-" + this.ecId;
  146. console.log("rankKey:", this.rankKey);
  147. this.mapKey += "-" + this.ecId;
  148. console.log("mapKey:", this.mapKey);
  149. tools.removeCssCode();
  150. const mapValue = uni.getStorageSync(this.mapKey);
  151. if (mapValue) {
  152. console.log("mapValue:", mapValue);
  153. this.ocaId = mapValue;
  154. }
  155. this.getCardConfigQuery();
  156. },
  157. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  158. onReady() {
  159. // this.dealFirstEnter();
  160. // this.playMusic();
  161. },
  162. onShow() {
  163. // uni.showToast({
  164. // icon: "none",
  165. // title: "[rankOverview] onShow"
  166. // })
  167. // if (this.$audio.audioStatus == 2 && this.$audio.audioSrc == this.audioSrc) {
  168. // this.$audio.play();
  169. // }
  170. },
  171. onUnload() {
  172. this.clear();
  173. },
  174. methods: {
  175. playMusic() {
  176. return;
  177. // uni.showToast({
  178. // title: 'playMusic',
  179. // icon: 'none',
  180. // duration: 2000
  181. // });
  182. // if (this.$audio.audioStatus == 0 || this.$audio.audioSrc != this.audioSrc) {
  183. // this.$audio.playAudio(this.audioSrc);
  184. // }
  185. },
  186. dealNotice(rank) {
  187. // console.log('[dealFirstEnter]');
  188. let that = this;
  189. uni.getStorage({
  190. key: that.rankKey,
  191. success: (res) => {
  192. console.log('[getStorage]', that.rankKey, res.data);
  193. const oldRank = res.data;
  194. if (oldRank != rank) {
  195. // that.notice = true;
  196. that.setRankValue(rank);
  197. }
  198. },
  199. fail: (e) => {
  200. console.log('[getStorage] fail', that.rankKey, e);
  201. // that.notice = false;
  202. that.setRankValue(rank);
  203. },
  204. })
  205. },
  206. setRankValue(data) {
  207. let that = this;
  208. uni.setStorage({
  209. key: that.rankKey,
  210. data: data,
  211. success: () => {
  212. console.log('[setStorage] success', that.rankKey, data);
  213. },
  214. fail: (e) => {
  215. console.log('[setStorage] fail', that.rankKey, e);
  216. },
  217. })
  218. },
  219. dealFirstEnter() {
  220. // console.log('[dealFirstEnter]');
  221. let that = this;
  222. uni.getStorage({
  223. key: that.firstEnterKey,
  224. success: (res) => {
  225. console.log('[getStorage]', that.firstEnterKey, res.data);
  226. },
  227. fail: (e) => {
  228. console.log('[getStorage] fail', that.firstEnterKey, e);
  229. that.btnInfo();
  230. that.setFirstEnterValue(true);
  231. },
  232. })
  233. },
  234. setFirstEnterValue(data) {
  235. let that = this;
  236. uni.setStorage({
  237. key: that.firstEnterKey,
  238. data: data,
  239. success: () => {
  240. console.log('[setStorage] success', that.firstEnterKey, data);
  241. },
  242. fail: (e) => {
  243. console.log('[setStorage] fail', that.firstEnterKey, e);
  244. },
  245. })
  246. },
  247. clear() {
  248. if (this.interval != null) {
  249. clearInterval(this.interval);
  250. this.interval = null;
  251. }
  252. },
  253. loadConfig(config) {
  254. // console.log("config", config);
  255. // 加载CSS样式
  256. const css = config.css;
  257. if (css != undefined && css.length > 0) {
  258. tools.loadCssCode(css);
  259. if (css.indexOf(".top{") >= 0) {
  260. this.cssTop = "top";
  261. }
  262. if (css.indexOf(".topbar-color{") >= 0) {
  263. this.cssTopbarColor = "topbar-color";
  264. }
  265. }
  266. if (this.cssTop == "") {
  267. this.cssTop = "top-default";
  268. }
  269. if (this.cssTopbarColor == "") {
  270. this.cssTopbarColor = "topbar-color-default";
  271. }
  272. console.log("[loadConfig] cssTop:", this.cssTop);
  273. console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);
  274. // 加载比赛路线数据
  275. const pathList = config.pathList;
  276. // console.log("[loadConfig] pathList:", pathList);
  277. if (pathList != undefined) {
  278. this.pathList = pathList;
  279. }
  280. // 加载比赛路线样式
  281. const pathListStyle = config.pathListStyle;
  282. // console.log("[loadConfig] pathList:", pathList);
  283. if (pathListStyle != undefined) {
  284. this.pathListStyle = pathListStyle;
  285. }
  286. // 加载规则弹窗配置
  287. const popupRuleConfig = config.popupRuleConfig;
  288. if (popupRuleConfig != undefined) {
  289. this.popupRuleConfig = popupRuleConfig;
  290. }
  291. // console.log("[loadConfig] popupRuleConfig:", this.popupRuleConfig);
  292. // 加载帮助弹窗配置
  293. const popupHelpConfig = config.popupHelpConfig;
  294. if (popupHelpConfig != undefined) {
  295. this.popupHelpConfig = popupHelpConfig;
  296. }
  297. // console.log("[loadConfig] popupHelpConfig:", this.popupHelpConfig);
  298. // 加载弹窗数据
  299. const popupDataList = config.popupDataList;
  300. // console.log("[loadConfig] popupDataList:", popupDataList);
  301. if (popupDataList != undefined && popupDataList.length > 0) {
  302. for (var i = 0; i < popupDataList.length; i++) {
  303. // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
  304. if (popupDataList[i] == 'default') {
  305. for (var j = 0; j < defaultPopUpDataList.length; j++) {
  306. this.popupDataList.push(defaultPopUpDataList[j]);
  307. }
  308. } else {
  309. this.popupDataList.push(popupDataList[i]);
  310. }
  311. }
  312. } else {
  313. this.popupDataList = defaultPopUpDataList;
  314. console.log("[loadConfig] popupDataList 加载默认列表");
  315. }
  316. // console.log("[loadConfig] popupDataList:", this.popupDataList);
  317. // 加载弹窗(帮助)数据
  318. const popupHelpList = config.popupHelpList;
  319. if (popupHelpList != undefined && popupHelpList.length > 0) {
  320. for (var i = 0; i < popupHelpList.length; i++) {
  321. // console.log("[loadConfig] popupHelpList", i, popupHelpList[i]);
  322. this.popupHelpList.push(popupHelpList[i]);
  323. }
  324. }
  325. // console.log("[loadConfig] popupHelpList:", this.popupHelpList);
  326. // 加载页面参数
  327. const param = config.param;
  328. if (param != undefined) {
  329. if (param.subTitle != undefined && param.subTitle.length > 0) {
  330. this.configParam.subTitle = param.subTitle;
  331. }
  332. }
  333. // console.log("[loadConfig] param:", this.configParam);
  334. },
  335. // 获取倒计时
  336. getCountdown() {
  337. // console.log(this.endSecond)
  338. if (this.endSecond > 0) {
  339. const now = Date.now() / 1000;
  340. const dif = this.endSecond - now;
  341. // const dif = 3600*24 - 60;
  342. if (dif > 0) {
  343. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  344. } else {
  345. this.countdown = "活动已结束";
  346. }
  347. // this.countdown = tools.convertSecondsToHMS(dif);
  348. } else {
  349. this.countdown = "距结束 --天--小时";
  350. }
  351. },
  352. // 格式化 距离
  353. fmtDistanct(val) {
  354. return Math.round(val * 100 / 1000) / 100;
  355. /* if (val < 1000)
  356. return Math.round(val * 10 / 1000) / 10;
  357. else
  358. return Math.round(val / 1000); */
  359. },
  360. // 格式化 配速
  361. fmtPace(val) {
  362. return tools.convertSecondsToHMS(val, 2);
  363. },
  364. fmtMcTime(timestamp) {
  365. return tools.fmtMcTime(timestamp);
  366. },
  367. // 获取活动时间
  368. getActtime() {
  369. this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
  370. },
  371. fmtMcTime2(timestamp1, timestamp2) {
  372. return tools.fmtMcTime2(timestamp1, timestamp2);
  373. },
  374. getCardConfigQuery() {
  375. uni.request({
  376. url: apiCardConfigQuery,
  377. header: {
  378. "Content-Type": "application/x-www-form-urlencoded",
  379. "token": this.token,
  380. },
  381. method: "POST",
  382. data: {
  383. ecId: this.ecId,
  384. pageName: this.pageName
  385. },
  386. success: (res) => {
  387. // console.log("getCardConfigQuery", res)
  388. const data = res.data.data;
  389. // console.log("configJson", data.configJson);
  390. const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
  391. // console.log("configJson", data.configJson);
  392. /* const config = {
  393. "css": `
  394. .top{
  395. position: relative;
  396. width: 100%;
  397. height: 220px;
  398. padding-top: 36px;
  399. justify-content: space-between;
  400. background-image: url('static/backgroud/top_bg_sddx.png');
  401. background-repeat: no-repeat;
  402. background-position-x: center;
  403. background-position-y: center;
  404. background-size: cover;
  405. }
  406. .logo{
  407. background-image: url('static/logo/sddx.png');
  408. }
  409. .top-acttime{
  410. display: flex !important;
  411. }
  412. .topbar-color{
  413. color: #ffffff;
  414. }
  415. .mid{
  416. margin-top: -40px !important;
  417. }
  418. .btnStartGame{
  419. background-color: #a43a07 !important;
  420. }
  421. .e-select{
  422. background-color: #a43a07 !important;
  423. }
  424. .swiper-item-button{
  425. background-color: #a43a07 !important;
  426. }
  427. .uni-swiper-dot-active{
  428. background: #a43a07 !important;
  429. }
  430. `,
  431. "pathList": {
  432. "row1": [
  433. {
  434. "type": 3,
  435. "pathImg": "/static/common/sdzxxq.png",
  436. "path": {
  437. "ocaId": 9,
  438. "mcType": 3
  439. },
  440. "navImg": "/static/common/nav.png",
  441. "point": {
  442. "longitude": 117.05842197272015,
  443. "latitude": 36.6773045110179,
  444. "name": "山大中心校区起始点"
  445. }
  446. },
  447. {
  448. "type": 3,
  449. "pathImg": "/static/common/sdbtqxq.png",
  450. "path": {
  451. "ocaId": 19,
  452. "mcType": 3
  453. },
  454. "navImg": "/static/common/nav.png",
  455. "point": {
  456. "longitude": 117.01808165974633,
  457. "latitude": 36.651520245517816,
  458. "name": "山大趵突泉校区起始点"
  459. }
  460. }
  461. ],
  462. "row2": [
  463. {
  464. "type": 3,
  465. "pathImg": "/static/common/sdhjlxq.png",
  466. "path": {
  467. "ocaId": 10,
  468. "mcType": 3
  469. },
  470. "navImg": "/static/common/nav.png",
  471. "point": {
  472. "longitude": 117.06584701149195,
  473. "latitude": 36.68711365814297,
  474. "name": "山大洪家楼校区起始点"
  475. }
  476. },
  477. {
  478. "type": 3,
  479. "pathImg": "/static/common/sdrjyxq.png",
  480. "path": {
  481. "ocaId": 21,
  482. "mcType": 3
  483. },
  484. "navImg": "/static/common/nav.png",
  485. "point": {
  486. "longitude": 117.1434547046918,
  487. "latitude": 36.66680223258383,
  488. "name": "山大软件园校区起始点"
  489. }
  490. }
  491. ],
  492. "row3": [
  493. {
  494. "type": 3,
  495. "pathImg": "/static/common/sdxlsxq.png",
  496. "path": {
  497. "ocaId": 11,
  498. "mcType": 3
  499. },
  500. "navImg": "/static/common/nav.png",
  501. "point": {
  502. "longitude": 117.0517531094238,
  503. "latitude": 36.598365483441846,
  504. "name": "山大兴隆校区起始点"
  505. }
  506. },
  507. {
  508. "type": 3,
  509. "pathImg": "/static/common/sdqfsxq.png",
  510. "path": {
  511. "ocaId": 20,
  512. "mcType": 3
  513. },
  514. "navImg": "/static/common/nav.png",
  515. "point": {
  516. "longitude": 117.0281052458668,
  517. "latitude": 36.64736827526403,
  518. "name": "山大千佛山校区起始点"
  519. }
  520. }
  521. ]
  522. },
  523. "pathListStyle": {
  524. "showLine": true,
  525. "style": "justify-content: flex-start;"
  526. },
  527. "popupRuleConfig": {
  528. "height": "500px"
  529. },
  530. "popupDataList": [
  531. {
  532. "type": 1,
  533. "data": {
  534. "title": "山大24级新生校园定向赛",
  535. "img": "/static/logo/sddx.png",
  536. "content": "  开学季来袭!山大24级新生校园定向赛燃情启幕!探索校园每一个角落,挑战智慧与体能,全校师生共同开启新学期活力篇章!等你来挑战!"
  537. }
  538. },
  539. {
  540. "type": 7,
  541. "data": {
  542. "topLogo": {
  543. "src": "/static/logo/sddx.png",
  544. "width": "80px",
  545. "height": "80px"
  546. },
  547. "bottomLogo": {
  548. "src": "/static/logo/inzone.png",
  549. "width": "150px",
  550. "height": "30px"
  551. },
  552. "title": "活动流程",
  553. "content": "<br>① 起点打点 → ② 依次打点 → ③ 接受挑战 <br><br>④ 终点打点 → ⑤ 查看成绩 → ⑥ 赢取奖励",
  554. "imageList": []
  555. }
  556. },
  557. {
  558. "type": 7,
  559. "data": {
  560. "topLogo": {
  561. "src": "/static/logo/sddx.png",
  562. "width": "80px",
  563. "height": "80px"
  564. },
  565. "bottomLogo": {
  566. "src": "/static/logo/inzone.png",
  567. "width": "150px",
  568. "height": "30px"
  569. },
  570. "title": "赛事规则",
  571. "content": "<p style='margin-bottom:12px;'>① 选择所在校区,参赛时间自由、路线随机</p> <p style='margin-bottom:12px;'>② 准确填报院系,共筑个人与院系荣耀</p> <p style='margin-bottom:12px;'>③ 打点1次1积分,途经点正确答题1积分,多次完赛,点数累加</p> <p style='margin-bottom:12px;'>④ 正常完赛累计积分,未完赛积分不计入</p>",
  572. "imageList": []
  573. }
  574. },
  575. {
  576. "type": 7,
  577. "data": {
  578. "topLogo": {
  579. "src": "/static/logo/sddx.png",
  580. "width": "80px",
  581. "height": "80px"
  582. },
  583. "bottomLogo": {
  584. "src": "/static/logo/inzone.png",
  585. "width": "150px",
  586. "height": "30px"
  587. },
  588. "title": "赛事奖励1",
  589. "content": "团队奖:<br>院系累计积分前8名; <text style='color:red;'>奖励</text>:团队奖杯 <br><br>个人奖:<br>各校区累计积分前10名;<text style='color:red;'>奖励</text>:荣誉证书完赛者均可获得参赛证书。<br> <text style='color:#A6A6A6;'>(赛事结束后体育委员会自APP颁发)</text>",
  590. "imageList": []
  591. }
  592. },
  593. {
  594. "type": 7,
  595. "data": {
  596. "topLogo": {
  597. "src": "/static/logo/sddx.png",
  598. "width": "80px",
  599. "height": "80px"
  600. },
  601. "bottomLogo": {
  602. "src": "/static/logo/inzone.png",
  603. "width": "150px",
  604. "height": "30px"
  605. },
  606. "title": "赛事奖励2",
  607. "content": "<p style='margin-bottom:12px;'>外部奖励:<br>各校区前10名获银座集团价值<text style='color:red;'>200元</text>进阶宠爱大礼。</p> <p style='margin-bottom:12px;'>完赛一次,可获银座价值<text style='color:red;'>50元</text>新生宠爱盲盒。<text style='color:#A6A6A6;'>(数量有限,发完为止)</text></p>每获25积分,可获银座<text style='color:red;'>100减10</text>优惠券1张。封顶5张,可与店内优惠叠加使用。<br><text style='color:#A6A6A6;'>(部分商品、特殊特例商品除外)</text>",
  608. "imageList": []
  609. }
  610. },
  611. {
  612. "type": 7,
  613. "data": {
  614. "title": "安全提示",
  615. "content": "<br><text style='color:#FFBA99; font-size: 20px; margin-right: 5px;'>●</text> 避免聚集,注意安全<br><br> <text style='color:#FFBA99; font-size: 20px; margin-right: 5px;'>●</text> 评估自身健康,适时参与<br><br> <text style='color:#FFBA99; font-size: 20px; margin-right: 5px;'>●</text> 注意交通与场地安全",
  616. "imageList": [{
  617. "src": "/static/backgroud/shanda.png",
  618. "width": "300px",
  619. "height": "150px"
  620. }]
  621. }
  622. },
  623. {
  624. "type": 2,
  625. "data": {
  626. "title": "基本图例",
  627. "img": "/static/common/jbtl.png"
  628. }
  629. },
  630. {
  631. "type": 2,
  632. "data": {
  633. "title": "基本标识",
  634. "img": "/static/common/jbbs2.png"
  635. }
  636. },
  637. {
  638. "type": 7,
  639. "data": {
  640. "topLogo": {
  641. "src": "/static/logo/sddx.png",
  642. "width": "80px",
  643. "height": "80px"
  644. },
  645. "bottomLogo": {
  646. "src": "/static/logo/inzone.png",
  647. "width": "150px",
  648. "height": "30px"
  649. },
  650. "title": "山大定向赛咨询群",
  651. "content": "",
  652. "imageList": [{
  653. "src": "/static/common/qrcode_sddxszxq.png",
  654. "width": "116px",
  655. "height": "116px"
  656. }],
  657. "memo": "<view style='display:block; text-align:center;'>赛事规程、流程、奖励咨询 <br><view style='color:#808080; font-size:12px'>(7*24小时解答)</view></view>"
  658. }
  659. },
  660. {
  661. "type": 8,
  662. "data": {
  663. "title": "兑换地点",
  664. "topImg": {
  665. "src": "/static/logo/inzone2.png",
  666. "width": "72px",
  667. "height": "72px"
  668. },
  669. "topMemo": "<view style='color:#E60012;font-size:14px;'>品质消费引领者 &nbsp; &nbsp; 美好生活推荐官</view>",
  670. "bottomMemo": "<view style='display: flex; align-items: center; justify-content: center; margin-top: 20px; color: #E67300; font-weight: 500; font-size: 15px; text-decoration-line: underline;'><image src='static/common/bulb.png' style='width: 22px; height: 26px; margin-right: 6px;'></image>点击查看《优惠券使用说明》</view>",
  671. "bottomMemoUrl": "https://oss-mbh5.colormaprun.com/page/explanation/inzone.html",
  672. "pointList": [
  673. {
  674. "map": "中 心 校 区",
  675. "name": "银座燕山店",
  676. "longitude": 117.075174,
  677. "latitude": 36.654108
  678. },
  679. {
  680. "map": "洪家楼校区",
  681. "name": "银座洪楼店",
  682. "longitude": 117.062653,
  683. "latitude": 36.684249
  684. },
  685. {
  686. "map": "兴隆山校区",
  687. "name": "银座七里山店",
  688. "longitude": 117.004617,
  689. "latitude": 36.613655
  690. },
  691. {
  692. "map": "趵突泉校区",
  693. "name": "银座泉城广场店",
  694. "longitude": 117.023766,
  695. "latitude": 36.661532
  696. },
  697. {
  698. "map": "千佛山校区",
  699. "name": "银座玉函店",
  700. "longitude": 117.014735,
  701. "latitude": 36.647098
  702. },
  703. {
  704. "map": "软件园校区",
  705. "name": "银座高新店",
  706. "longitude": 117.122241,
  707. "latitude": 36.682175
  708. }
  709. ]
  710. }
  711. }
  712. ],
  713. "popupHelpConfig": {
  714. "height": "539px"
  715. },
  716. "popupHelpList": [
  717. {
  718. "type": 2,
  719. "data": {
  720. "title": "帮助",
  721. "img": "/static/common/qrcode_help.png",
  722. "imgParam": {
  723. "height": "370px"
  724. }
  725. }
  726. }
  727. ],
  728. "param": {
  729. "subTitle": "山东大学123周年庆"
  730. }
  731. }; */
  732. this.loadConfig(config);
  733. this.matchRsDetailQuery();
  734. setTimeout(this.dealFirstEnter, 500);
  735. },
  736. fail: (err) => {
  737. console.log("getCardConfigQuery err", err)
  738. },
  739. });
  740. },
  741. // 卡片对应地图列表详情查询
  742. mapListQuery() {
  743. uni.request({
  744. url: apiMapListQuery,
  745. header: {
  746. "Content-Type": "application/x-www-form-urlencoded",
  747. "token": this.token,
  748. },
  749. method: "POST",
  750. data: {
  751. mcId: this.mcId
  752. },
  753. success: (res) => {
  754. // console.log("mapListQuery", res);
  755. if (res.data.code == 0) {
  756. const data = res.data.data;
  757. this.mapList = data;
  758. let mapItems = [];
  759. for (var i = 0; i < data.length; i++) {
  760. let map = {};
  761. map.text = data[i].mapName;
  762. map.value = data[i].ocaId;
  763. mapItems.push(map);
  764. }
  765. this.mapList = mapItems;
  766. // console.log("mapList", this.mapList);
  767. }
  768. },
  769. fail: (err) => {
  770. console.log("mapListQuery err", err);
  771. },
  772. });
  773. },
  774. // 卡片对应线上赛多个活动查询
  775. matchRsDetailQuery() {
  776. uni.request({
  777. url: apiMatchRsDetailQuery,
  778. header: {
  779. "Content-Type": "application/x-www-form-urlencoded",
  780. "token": this.token,
  781. },
  782. method: "POST",
  783. data: {
  784. ecId: this.ecId,
  785. ocaId: this.ocaId
  786. },
  787. success: (res) => {
  788. // console.log("matchRsDetailQuery", res);
  789. if (checkResCode(res)) {
  790. const data = res.data.data;
  791. this.mcType = data.mcType;
  792. this.mcId = data.mcId;
  793. this.mcName = data.mcName;
  794. this.coiName = data.coiName;
  795. this.beginSecond = data.beginSecond;
  796. this.endSecond = data.endSecond;
  797. this.nickName = data.nickName;
  798. this.totalNum = data.totalNum;
  799. this.totalDistanct = data.totalDistanct;
  800. this.totalDistanctRankNum = data.totalDistanctRankNum;
  801. this.totalCp = data.totalCp;
  802. this.totalCpRankNum = data.totalCpRankNum;
  803. this.totalSysPoint = data.totalSysPoint;
  804. this.totalSysPointRankNum = data.totalSysPointRankNum;
  805. this.fastPace = data.fastPace;
  806. this.fastPaceRankNum = data.fastPaceRankNum;
  807. this.regionTotalNum = data.regionTotalNum;
  808. this.regionTotalCp = data.regionTotalCp;
  809. this.regionTotalCpRankNum = data.regionTotalCpRankNum;
  810. this.ocaRs = data.ocaRs;
  811. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  812. const rank = JSON.stringify(data);
  813. this.dealNotice(rank);
  814. this.getCountdown();
  815. this.getActtime();
  816. this.isAllowMcSignUp();
  817. this.mapListQuery();
  818. this.clear();
  819. this.interval = setInterval(this.getCountdown, 60000);
  820. }
  821. },
  822. fail: (err) => {
  823. console.log("matchRsDetailQuery err", err)
  824. },
  825. });
  826. },
  827. // 是否允许重新分组(报名)
  828. isAllowMcSignUp() {
  829. uni.request({
  830. url: apiIsAllowMcSignUp,
  831. header: {
  832. "Content-Type": "application/x-www-form-urlencoded",
  833. "token": this.token,
  834. },
  835. method: "POST",
  836. data: {
  837. ecId: this.ecId
  838. },
  839. success: (res) => {
  840. // console.log("isAllowMcSignUp", res)
  841. if (res.data.code == 0) {
  842. const data = res.data.data;
  843. this.allowMcSignUp = data.allowSignUp;
  844. }
  845. },
  846. fail: (err) => {
  847. console.log("isAllowMcSignUp err", err)
  848. },
  849. });
  850. },
  851. btnBack() {
  852. // const url = `action://to_home/`;
  853. // tools.appAction(url);
  854. // uni.navigateTo({
  855. // url: "/pages/bm/style4/rankList?" + this.queryString
  856. // });
  857. const url = "/pages/bm/style4/rankList?" + this.queryString;
  858. tools.appAction(url, "uni.navigateTo");
  859. },
  860. btnInfo() {
  861. // console.log(this.$refs.mypopup);
  862. this.$refs.mypopup.popupOpen();
  863. },
  864. btnHelp() {
  865. this.$refs.mypopupHelp.popupOpen();
  866. },
  867. btnReGroup() {
  868. this.queryObj.from = "rankOverview";
  869. this.queryString = tools.objectToQueryString(this.queryObj);
  870. // uni.navigateTo({
  871. // url: '/pages/bm/style4/signup?' + this.queryString
  872. // });
  873. const url = '/pages/bm/style4/signup?' + this.queryString;
  874. tools.appAction(url, "uni.navigateTo");
  875. },
  876. onOverviewClick(ovtype) {
  877. this.queryObj.ovtype = ovtype;
  878. this.queryString = tools.objectToQueryString(this.queryObj);
  879. // uni.navigateTo({
  880. // url: "/pages/bm/style4/rankList?" + this.queryString
  881. // });
  882. const url = "/pages/bm/style4/rankList?" + this.queryString;
  883. tools.appAction(url, "uni.navigateTo");
  884. },
  885. eSelectChange(data) {
  886. console.log("eSelectChange:", data);
  887. this.ocaId = data.value;
  888. this.matchRsDetailQuery();
  889. uni.setStorageSync(this.mapKey, this.ocaId);
  890. },
  891. onPathClick(data) {
  892. console.log("onPathClick:", data);
  893. if (this.ocaId != data.path.ocaId) {
  894. this.ocaId = data.path.ocaId;
  895. this.matchRsDetailQuery();
  896. uni.setStorageSync(this.mapKey, data.path.ocaId);
  897. }
  898. },
  899. btnStartGame() {
  900. // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  901. if (this.mcState == 1) {
  902. const url = `action://to_detail/?id=${this.ocaId}&matchType=${this.mcType}`;
  903. tools.appAction(url);
  904. } else if (this.mcState == 0) {
  905. uni.showToast({
  906. title: '比赛尚未开始',
  907. icon: 'none',
  908. duration: 3000
  909. });
  910. } else if (this.mcState == 2) {
  911. uni.showToast({
  912. title: '比赛已结束',
  913. icon: 'none',
  914. duration: 3000
  915. });
  916. }
  917. }
  918. }
  919. }
  920. </script>
  921. <style scoped>
  922. .content {
  923. width: 100vw;
  924. min-height: 100vh;
  925. overflow-x: scroll;
  926. }
  927. .top-default {
  928. position: relative;
  929. z-index: 10;
  930. width: 100%;
  931. height: 270px;
  932. padding-top: 36px;
  933. justify-content: space-between;
  934. background-image: url("/static/backgroud/top_bg_egg2.png");
  935. background-repeat: no-repeat;
  936. background-position-x: center;
  937. background-position-y: -8px;
  938. background-size: 100% 100%;
  939. /* background-size: cover; */
  940. }
  941. .topbar-color-default {
  942. color: #333333;
  943. }
  944. .topcontent {
  945. height: 90%;
  946. margin-bottom: 50px;
  947. }
  948. .logo {
  949. width: 80px;
  950. height: 80px;
  951. margin-top: 10px;
  952. /* background-image: url('/static/logo/sddx.png'); */
  953. background-repeat: no-repeat;
  954. background-position-x: center;
  955. background-position-y: center;
  956. background-size: contain;
  957. }
  958. .top-acttime {
  959. display: none;
  960. text-shadow: 3px 3px 0px #640008;
  961. font-family: YouSheBiaoTiHei;
  962. /* font-family: Arial, Helvetica, sans-serif; */
  963. font-weight: bold;
  964. color: #ffee0b;
  965. font-size: 26px;
  966. }
  967. .topbtm {
  968. width: 100%;
  969. /* height: 60rpx; */
  970. margin-bottom: 40px;
  971. justify-content: space-evenly;
  972. }
  973. .topbtm-name {
  974. /* width: 320rpx; */
  975. /* height: 28px; */
  976. padding: 5px 12px;
  977. background-color: #9fda39;
  978. border-radius: 5px;
  979. /* backdrop-filter: blur(30px); */
  980. text-align: center;
  981. font-weight: 500;
  982. color: #497400;
  983. font-size: 14px;
  984. }
  985. .mid {
  986. width: 90%;
  987. height: 150px;
  988. position: relative;
  989. z-index: 20;
  990. margin-top: -100px;
  991. background: #ffffff;
  992. border-radius: 9px;
  993. box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.13);
  994. font-family: Source Han Sans CN;
  995. }
  996. .mid-0 {
  997. width: 90%;
  998. margin: 12px;
  999. }
  1000. .mid-0-select {
  1001. width: 60%;
  1002. font-weight: 500;
  1003. color: #8e8e8e;
  1004. font-size: 14px;
  1005. }
  1006. .mid-0-help {
  1007. position: absolute;
  1008. right: 30px;
  1009. font-size: 12px;
  1010. font-weight: 500;
  1011. color: #992900;
  1012. }
  1013. .mid-1 {
  1014. width: 90%;
  1015. margin-bottom: 12px;
  1016. }
  1017. .mid-1-text {
  1018. /* min-width: 60px; */
  1019. font-weight: 500;
  1020. color: #9a300e;
  1021. font-size: 12px;
  1022. }
  1023. .mid-2 {
  1024. width: 92%;
  1025. /* margin: 0 10px; */
  1026. }
  1027. .mid-2-value {
  1028. font-weight: 900;
  1029. font-size: 22px;
  1030. line-height: 25px;
  1031. }
  1032. .mid-2-text {
  1033. color: #989898;
  1034. font-size: 12px;
  1035. }
  1036. .mid-line {
  1037. width: 0px;
  1038. height: 40px;
  1039. border: 1px solid;
  1040. border-color: #e6e6e6;
  1041. }
  1042. .overview-1 {
  1043. width: 111px;
  1044. height: 54px;
  1045. background: #ffb40b;
  1046. border-radius: 50%;
  1047. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1048. pointer-events: auto;
  1049. }
  1050. .overview-2 {
  1051. margin-top: -43px;
  1052. color: #ffffff;
  1053. font-size: 18px;
  1054. pointer-events: auto;
  1055. }
  1056. .overview-3 {
  1057. width: 111px;
  1058. height: 54px;
  1059. background: #f39509;
  1060. border-radius: 50%;
  1061. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1062. pointer-events: auto;
  1063. }
  1064. .overview-4 {
  1065. width: 111px;
  1066. height: 54px;
  1067. background: #81cd00;
  1068. border-radius: 50%;
  1069. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1070. pointer-events: auto;
  1071. }
  1072. .overview-5 {
  1073. width: 111px;
  1074. height: 54px;
  1075. background: #64cbb0;
  1076. border-radius: 50%;
  1077. box-shadow: 3px 3px 0px rgba(140, 140, 140, 1);
  1078. pointer-events: auto;
  1079. }
  1080. .ovline1 {
  1081. margin-top: 9px;
  1082. color: #ffffff;
  1083. font-size: 12px;
  1084. }
  1085. .ovline2 {
  1086. color: #ffffff;
  1087. font-size: 16px;
  1088. }
  1089. .main {
  1090. width: 100%;
  1091. margin-top: 20px;
  1092. margin-bottom: 20px;
  1093. /* height: 70vh; */
  1094. justify-content: space-around;
  1095. /* justify-content: space-between; */
  1096. }
  1097. .main-title {
  1098. margin-bottom: 10px;
  1099. font-weight: 550;
  1100. color: #333333;
  1101. font-size: 16px;
  1102. }
  1103. .bottom {
  1104. width: 100%;
  1105. flex-grow: 1;
  1106. justify-content: flex-end;
  1107. }
  1108. .btnStartGame {
  1109. width: 70%;
  1110. height: 80rpx;
  1111. /* margin-top: 50rpx; */
  1112. margin-bottom: 20rpx;
  1113. /* font-weight: bold; */
  1114. color: white;
  1115. font-size: 32rpx;
  1116. line-height: 80rpx;
  1117. border-radius: 27px;
  1118. background-color: #2e85ec;
  1119. }
  1120. /deep/ .e-select {
  1121. /* width: 60%; */
  1122. height: 60rpx;
  1123. background: #2e85ec;
  1124. color: #ffffff;
  1125. border-radius: 18px;
  1126. justify-content: space-around;
  1127. font-size: 16px;
  1128. font-weight: 500;
  1129. line-height: 60rpx;
  1130. text-align: center;
  1131. border: none !important;
  1132. }
  1133. /deep/ .e-select-input-text {
  1134. color: inherit !important;
  1135. }
  1136. /deep/ .e-select-selector-item {
  1137. color: #818181;
  1138. }
  1139. /deep/ .uni-icons {
  1140. color: inherit !important;
  1141. }
  1142. /deep/ .e-select-icon {
  1143. width: 26px !important;
  1144. }
  1145. </style>