rankOverview.vue 24 KB

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