rankOverview.vue 36 KB

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