rankOverview.vue 25 KB

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