rankOverview.vue 25 KB

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