rankOverview.vue 36 KB

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