rankOverview.vue 31 KB

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