rankOverview.vue 26 KB

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