rankOverview.vue 31 KB

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