rankList.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <!--
  2. [报名] 样式1 - 排名列表
  3. http://localhost:5173/card/#/pages/bm/style1/rankList
  4. https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
  5. -->
  6. <template>
  7. <view class="body">
  8. <view v-if="pageReady" class="content uni-column">
  9. <view class="uni-column" :class="cssTop">
  10. <my-topbar :mcName="mcName" class="topbar-color" :showMessage="popupMessageList.length > 0"
  11. @btnBackClick="btnBack" @btnInfoClick="btnInfo" @btnMessageClick="btnMessage"></my-topbar>
  12. <view class="topcontent uni-column">
  13. <view>
  14. <text class="toptext">{{coiName}}</text>
  15. <text class="toptext" v-if="teamNum > 0">{{getTeamName(teamType, teamNum)}}</text>
  16. </view>
  17. <view class="top-countdown uni-row">
  18. <image mode="aspectFit" class="cal" src="/static/default/cal.png"></image>
  19. <text>{{countdown}}</text>
  20. </view>
  21. </view>
  22. <view class="topbtm uni-column">
  23. <view class="topbtm-content uni-row">
  24. <text class="topbtm-sspm" v-if="mcState==1 && allowMcSignUp"></text>
  25. <text class="topbtm-sspm">实时排名</text>
  26. <view class="btnReGroup" v-if="mcState==1 && allowMcSignUp" @click="btnReGroup">重新分组</view>
  27. </view>
  28. </view>
  29. <!-- <text class="mcName">{{ecId}} - {{mcId}} - {{token}}</text> -->
  30. </view>
  31. <view class="main uni-column">
  32. <uni-segmented-control class="main-tab" :current="tabCurrent" :values="tabItems"
  33. @clickItem="onClickTabItem" styleType="button" :activeColor="tabActiveColor"></uni-segmented-control>
  34. <view class="tab-view uni-column">
  35. <!-- 总排名 -->
  36. <my-ranklist v-show="tabCurrent === 0" :rankRs="rankList.totalRankRs"></my-ranklist>
  37. <!-- 队伍排名 -->
  38. <my-ranklist v-show="tabCurrent === 1" v-if="teamType==0" :rankRs="rankList.teamRankRs" :teamType="this.teamType"></my-ranklist>
  39. <!-- 队内排名 -->
  40. <my-ranklist v-show="tabCurrent === 2" v-if="teamType==0" :rankRs="rankList.inTeamRs"></my-ranklist>
  41. <!-- 学生排名 -->
  42. <my-ranklist v-show="tabCurrent === 1" v-if="teamType==1" :rankRs="teamNum==1 ? rankList.inTeamRs : rankList.otherRs[1]"></my-ranklist>
  43. <!-- 家长排名 -->
  44. <my-ranklist v-show="tabCurrent === 2" v-if="teamType==1" :rankRs="teamNum==2 ? rankList.inTeamRs : rankList.otherRs[2]"></my-ranklist>
  45. </view>
  46. <button class="btnStart btnStart-disable" v-if="mcState==0">活动尚未开始</button>
  47. <button class="btnStart btnStart-enable" v-if="mcState==1" @click="btnStartGame">{{btnStartGameText}}</button>
  48. <button class="btnStart btnStart-disable" v-if="mcState==2">活动已结束</button>
  49. </view>
  50. <my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
  51. <my-popup ref="mypopupMessage" :config="popupMessageConfig" :dataList="popupMessageList" @noMoreRemindersClick="onNoMoreRemindersClick"></my-popup>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import tools from '/common/tools';
  57. import { teamName, defaultPopUpDataList, defaultPopUpDataList2 } from '/common/define';
  58. import {
  59. token,
  60. apiCardDetailQuery,
  61. apiCardRankDetailQuery,
  62. apiCardConfigQuery,
  63. apiUserCurrentRankNumQuery,
  64. apiIsAllowMcSignUp,
  65. apiUserJoinCardQuery,
  66. apiUnReadMessageQuery,
  67. apiReadMessage,
  68. checkResCode
  69. } from '/common/api';
  70. export default {
  71. data() {
  72. return {
  73. pageReady: false,
  74. pageName: "rankList",
  75. firstEnterKey: 'firstEnter-bm',
  76. rankKey: "rank-bm-style1",
  77. messageKey: "message-bm-style1",
  78. queryObj: {},
  79. queryString: "",
  80. token: "",
  81. ecId: 0, // 卡片id
  82. mcId: 0, // 赛事id
  83. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  84. mcName: "", // 赛事名称
  85. acttime: "", // 活动时间
  86. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  87. endSecond: null, // 活动或赛事结束时间戳,单位秒
  88. coiName: "", // 已报名单位名称,可为空
  89. ocaId: 0, // 关联id,带入到App活动详情页面
  90. teamNum: 0, // 已报名队伍编号,可为0
  91. isJoin: null, // 是否报名
  92. btnStartGameText: "",
  93. mcState: 0 , // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  94. allowMcSignUp: false, // 是否允许重新分组
  95. countdown: "", // 倒计时
  96. rankList: { // 排名列表
  97. totalRankRs: [],
  98. teamRankRs: [],
  99. inTeamRs: [],
  100. otherRs: []
  101. },
  102. interval: null,
  103. teamType: 0, // 队伍类型
  104. dispArrStr: "", // 要显示的集合范围 (total,team,in,other)
  105. tabItems: [],
  106. tabCurrent: 0,
  107. tabActiveColor: "#2e85ec",
  108. cssTop: "",
  109. popupRuleConfig: {}, // 规则弹窗配置
  110. popupMessageConfig: {}, // 通知弹窗配置
  111. popupDataList: [],
  112. popupMessageList: [],
  113. // mqIdListStr: "", // 已读消息id列表 逗号分隔
  114. }
  115. },
  116. computed: {},
  117. onLoad(query) { // 类型非必填,可自动推导
  118. // console.log(query);
  119. this.queryObj = query;
  120. this.queryString = tools.objectToQueryString(this.queryObj);
  121. // console.log(queryString);
  122. this.token = query["token"] ?? token;
  123. this.ecId = query["id"] ?? 0;
  124. this.firstEnterKey += "-" + this.ecId;
  125. console.log("firstEnterKey:", this.firstEnterKey);
  126. this.rankKey += "-" + this.ecId;
  127. console.log("rankKey:", this.rankKey);
  128. this.messageKey += "-" + this.ecId;
  129. console.log("messageKey:", this.messageKey);
  130. tools.removeCssCode();
  131. this.getCardConfigQuery();
  132. this.getUserCurrentRankNumQuery();
  133. this.isAllowMcSignUp();
  134. },
  135. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  136. onReady() {
  137. // this.dealFirstEnter();
  138. },
  139. onShow() {
  140. this.getUserJoinCardQuery();
  141. },
  142. onUnload() {
  143. this.clear();
  144. },
  145. methods: {
  146. dealNotice(rank) {
  147. // console.log('[dealFirstEnter]');
  148. let that = this;
  149. uni.getStorage({
  150. key: that.rankKey,
  151. success: (res) => {
  152. console.log('[getStorage]', that.rankKey, res.data);
  153. const oldRank = res.data;
  154. if (oldRank != rank) {
  155. // that.notice = true;
  156. that.setRankValue(rank);
  157. }
  158. },
  159. fail: (e) => {
  160. console.log('[getStorage] fail', that.rankKey, e);
  161. // that.notice = false;
  162. that.setRankValue(rank);
  163. },
  164. })
  165. },
  166. setRankValue(data) {
  167. let that = this;
  168. uni.setStorage({
  169. key: that.rankKey,
  170. data: data,
  171. success: () => {
  172. console.log('[setStorage] success', that.rankKey, data);
  173. },
  174. fail: (e) => {
  175. console.log('[setStorage] fail', that.rankKey, e);
  176. },
  177. })
  178. },
  179. dealFirstEnter() {
  180. // console.log('[dealFirstEnter]');
  181. let that = this;
  182. uni.getStorage({
  183. key: that.firstEnterKey,
  184. success: (res) => {
  185. console.log('[getStorage]', that.firstEnterKey, res.data);
  186. },
  187. fail: (e) => {
  188. console.log('[getStorage] fail', that.firstEnterKey, e);
  189. that.btnInfo();
  190. that.setFirstEnterValue(true);
  191. },
  192. })
  193. },
  194. setFirstEnterValue(data) {
  195. let that = this;
  196. uni.setStorage({
  197. key: that.firstEnterKey,
  198. data: data,
  199. success: () => {
  200. console.log('[setStorage] success', that.firstEnterKey, data);
  201. },
  202. fail: (e) => {
  203. console.log('[setStorage] fail', that.firstEnterKey, e);
  204. },
  205. })
  206. },
  207. clear() {
  208. if (this.interval != null) {
  209. clearInterval(this.interval);
  210. this.interval = null;
  211. }
  212. },
  213. loadConfig(config) {
  214. // console.log("config", config);
  215. // 加载CSS样式
  216. const css = config.css;
  217. if (css != undefined && css.length > 0) {
  218. tools.loadCssCode(css);
  219. if (css.indexOf(".top{") >= 0) {
  220. this.cssTop = "top";
  221. }
  222. }
  223. if (this.cssTop == "") {
  224. this.cssTop = "top-default";
  225. }
  226. console.log("[loadConfig] cssTop:", this.cssTop);
  227. const tabActiveColor = config.tabActiveColor;
  228. if (tabActiveColor != undefined && tabActiveColor.length > 0) {
  229. this.tabActiveColor = tabActiveColor;
  230. }
  231. // 加载队伍类型 0: 红黄蓝紫 1: 学生/家长
  232. if (config.teamType != undefined && config.teamType >= 0) {
  233. this.teamType = config.teamType;
  234. }
  235. if (this.teamType == 0) {
  236. this.dispArrStr = "total,team,in", // 要显示的集合范围 (total,team,in,other)
  237. this.tabItems = ['总排名', '队伍排名', '队内排名'];
  238. } else if (this.teamType == 1) {
  239. this.dispArrStr = "total,in,other", // 要显示的集合范围 (total,team,in,other)
  240. this.tabItems = ['总排名', '学生排名', '家长排名'];
  241. }
  242. // 加载规则弹窗配置
  243. const popupRuleConfig = config.popupRuleConfig;
  244. if (popupRuleConfig != undefined) {
  245. this.popupRuleConfig = popupRuleConfig;
  246. }
  247. // console.log("[loadConfig] popupRuleConfig:", this.popupRuleConfig);
  248. // 加载通知弹窗配置
  249. const popupMessageConfig = config.popupMessageConfig;
  250. if (popupMessageConfig != undefined) {
  251. this.popupMessageConfig = popupMessageConfig;
  252. }
  253. // console.log("[loadConfig] popupMessageConfig:", this.popupMessageConfig);
  254. // 加载弹窗数据
  255. const popupDataList = config.popupDataList;
  256. // console.log("[loadConfig] popupDataList:", popupDataList);
  257. if (popupDataList != undefined && popupDataList.length > 0) {
  258. for (var i = 0; i < popupDataList.length; i++) {
  259. // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
  260. if (popupDataList[i] == 'default') {
  261. for (var j = 0; j < defaultPopUpDataList.length; j++) {
  262. this.popupDataList.push(defaultPopUpDataList[j]);
  263. }
  264. } else if (popupDataList[i] == 'default2') {
  265. for (var j = 0; j < defaultPopUpDataList2.length; j++) {
  266. this.popupDataList.push(defaultPopUpDataList2[j]);
  267. }
  268. } else {
  269. this.popupDataList.push(popupDataList[i]);
  270. }
  271. }
  272. } else {
  273. this.popupDataList = defaultPopUpDataList;
  274. console.log("[loadConfig] popupDataList 加载默认列表");
  275. }
  276. // console.log("[loadConfig] popupDataList:", this.popupDataList);
  277. this.pageReady = true;
  278. },
  279. // 获取倒计时
  280. getCountdown() {
  281. // console.log(this.endSecond)
  282. if (this.endSecond > 0) {
  283. const now = Date.now() / 1000;
  284. const dif = this.endSecond - now;
  285. // const dif = 3600*24 - 60;
  286. if (dif > 0) {
  287. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  288. } else {
  289. this.countdown = "活动已结束";
  290. }
  291. // this.countdown = tools.convertSecondsToHMS(dif);
  292. } else {
  293. this.countdown = "距结束 --天--小时";
  294. }
  295. },
  296. fmtMcTime(timestamp) {
  297. return tools.fmtMcTime(timestamp);
  298. },
  299. // 获取活动时间
  300. getActtime() {
  301. this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
  302. },
  303. getTeamName(teamType, teamIndex) {
  304. return teamName[teamType][teamIndex];
  305. },
  306. getCardConfigQuery() {
  307. uni.request({
  308. url: apiCardConfigQuery,
  309. header: {
  310. "Content-Type": "application/x-www-form-urlencoded",
  311. "token": this.token,
  312. },
  313. method: "POST",
  314. data: {
  315. ecId: this.ecId,
  316. pageName: this.pageName
  317. },
  318. success: (res) => {
  319. // console.log("getCardConfigQuery", res)
  320. const data = res.data.data;
  321. // console.log("configJson", data.configJson);
  322. const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
  323. // console.log("configJson", data.configJson);
  324. /* const config = {
  325. "css": `
  326. .top{
  327. width: 100%;
  328. height: 26vh;
  329. padding-top: 30px;
  330. justify-content: space-between;
  331. background-image: url('static/backgroud/top_run.png'), url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
  332. background-repeat: no-repeat;
  333. background-position: 45px 25px, center, 0px 0px;
  334. background-size: auto 27vh, auto 22vh , cover;
  335. }
  336. `,
  337. "tabActiveColor": "#ff870d",
  338. "popupDataList": [
  339. {
  340. "type": 1,
  341. "data": {
  342. "title": "山青活动",
  343. "img": "/static/logo/sqsj.png",
  344. "content": "山青世界为广大青少年提供了亲近自然、劳动实践、拓展培训、军事教育、科普体验、自然探索的平台和机会,也为企事业单位青年团队提供会议培训、拓展训练等服务",
  345. }
  346. },
  347. "default"
  348. ],
  349. "teamType": 1
  350. }; */
  351. this.loadConfig(config);
  352. this.getUnReadMessageQuery();
  353. this.getCardDetailQuery();
  354. setTimeout(this.dealFirstEnter, 500);
  355. },
  356. fail: (err) => {
  357. console.log("getCardConfigQuery err", err)
  358. },
  359. });
  360. },
  361. // 卡片对应活动或赛事详情查询
  362. getCardDetailQuery() {
  363. uni.request({
  364. url: apiCardDetailQuery,
  365. header: {
  366. "Content-Type": "application/x-www-form-urlencoded",
  367. "token": this.token,
  368. },
  369. method: "POST",
  370. data: {
  371. ecId: this.ecId
  372. },
  373. success: (res) => {
  374. // console.log("getCardDetailQuery", res)
  375. const data = res.data.data;
  376. this.mcType = data.mcType;
  377. this.mcId = data.mcId;
  378. this.mcName = data.mcName;
  379. this.beginSecond = data.beginSecond;
  380. this.endSecond = data.endSecond;
  381. this.coiName = data.coiName;
  382. this.teamNum = data.teamNum;
  383. this.ocaId = data.ocaId;
  384. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  385. this.getCountdown();
  386. this.getActtime();
  387. this.getCardRankDetailQuery();
  388. this.clear();
  389. this.interval = setInterval(this.getCountdown, 60000);
  390. },
  391. fail: (err) => {
  392. console.log("getCardDetailQuery err", err)
  393. },
  394. });
  395. },
  396. // 排名查询
  397. getCardRankDetailQuery() {
  398. uni.request({
  399. url: apiCardRankDetailQuery,
  400. header: {
  401. "Content-Type": "application/x-www-form-urlencoded",
  402. "token": this.token,
  403. },
  404. method: "POST",
  405. data: {
  406. mcIdListStr: this.mcId,
  407. mcType: this.mcType,
  408. dispArrStr: this.dispArrStr
  409. },
  410. success: (res) => {
  411. // console.log("getCardRankDetailQuery", res)
  412. const rankdata = res.data.data;
  413. this.rankList.totalRankRs = rankdata.totalRankRs;
  414. this.rankList.teamRankRs = rankdata.teamRankRs;
  415. this.rankList.inTeamRs = rankdata.inTeamRs;
  416. this.rankList.otherRs = rankdata.otherRs;
  417. },
  418. fail: (err) => {
  419. console.log("getCardRankDetailQuery err", err)
  420. },
  421. });
  422. },
  423. // 卡片用户当前排名查询
  424. getUserCurrentRankNumQuery() {
  425. uni.request({
  426. url: apiUserCurrentRankNumQuery,
  427. header: {
  428. "Content-Type": "application/x-www-form-urlencoded",
  429. "token": this.token,
  430. },
  431. method: "POST",
  432. data: {
  433. ecId: this.ecId
  434. },
  435. success: (res) => {
  436. // console.log("getUserCurrentRankNumQuery", res)
  437. if (res.data.code == 0) {
  438. const data = res.data.data;
  439. const rankNum = data.rankNum;
  440. this.dealNotice(rankNum);
  441. }
  442. },
  443. fail: (err) => {
  444. console.log("getUserCurrentRankNumQuery err", err)
  445. },
  446. });
  447. },
  448. // 是否允许重新分组(报名)
  449. isAllowMcSignUp() {
  450. uni.request({
  451. url: apiIsAllowMcSignUp,
  452. header: {
  453. "Content-Type": "application/x-www-form-urlencoded",
  454. "token": this.token,
  455. },
  456. method: "POST",
  457. data: {
  458. ecId: this.ecId
  459. },
  460. success: (res) => {
  461. // console.log("isAllowMcSignUp", res)
  462. if (res.data.code == 0) {
  463. const data = res.data.data;
  464. this.allowMcSignUp = data.allowSignUp;
  465. }
  466. },
  467. fail: (err) => {
  468. console.log("isAllowMcSignUp err", err)
  469. },
  470. });
  471. },
  472. // 用户是否已经报名卡片对应赛事查询
  473. getUserJoinCardQuery() {
  474. uni.request({
  475. url: apiUserJoinCardQuery,
  476. header: {
  477. "Content-Type": "application/x-www-form-urlencoded",
  478. "token": this.token
  479. },
  480. method: "POST",
  481. data: {
  482. ecId: this.ecId
  483. },
  484. success: (res) => {
  485. // console.log("getUserJoinCardQuery", res)
  486. const code = res.data.code;
  487. const data = res.data.data;
  488. if (code == 0) {
  489. this.isJoin = data.isJoin;
  490. if (this.isJoin) { // 已报名
  491. this.btnStartGameText = "我要比赛";
  492. } else { // 未报名
  493. this.btnStartGameText = "我要报名";
  494. }
  495. }
  496. },
  497. fail: (err) => {
  498. console.log("getUserJoinCardQuery err", err)
  499. },
  500. });
  501. },
  502. // 未读消息列表查询
  503. getUnReadMessageQuery() {
  504. uni.request({
  505. url: apiUnReadMessageQuery,
  506. header: {
  507. "Content-Type": "application/x-www-form-urlencoded",
  508. "token": this.token,
  509. },
  510. method: "POST",
  511. data: {
  512. relationType: 2, // 类型 1 成就 2 卡片
  513. relationId: this.ecId
  514. },
  515. success: (res) => {
  516. // console.log("getUnReadMessageQuery", res);
  517. if (checkResCode(res)) {
  518. const unReadMessageRs = res.data.data;
  519. this.popupMessageList.length = 0;
  520. this.mqIdListStr = "";
  521. for (var i = 0; i < unReadMessageRs.length; i++) {
  522. let popupData = {
  523. type: 6, // 6: 通知
  524. data: {}
  525. };
  526. this.messageKey += "-" + unReadMessageRs[i].mqId;
  527. popupData.data.mqType = unReadMessageRs[i].mqType;
  528. popupData.data.title = unReadMessageRs[i].mqTitle;
  529. popupData.data.message = unReadMessageRs[i].mqMessage;
  530. this.popupMessageList.push(popupData);
  531. // this.mqIdListStr += this.unReadMessageRs[i].mqId;
  532. // if (i < this.unReadMessageRs.length - 1) {
  533. // this.mqIdListStr += ",";
  534. // }
  535. }
  536. if (this.popupMessageList.length > 0) {
  537. const messageValue = uni.getStorageSync(this.messageKey);
  538. console.log("messageValue:", messageValue);
  539. if (!messageValue) {
  540. this.$refs.mypopupMessage.popupOpen();
  541. // uni.setStorageSync(this.messageKey, true);
  542. }
  543. }
  544. }
  545. },
  546. fail: (err) => {
  547. console.log("getUnReadMessageQuery err", err);
  548. },
  549. });
  550. },
  551. onNoMoreRemindersClick() {
  552. this.$refs.mypopupMessage.popupClose();
  553. uni.setStorageSync(this.messageKey, true);
  554. },
  555. // 标记消息已读
  556. readMessage() {
  557. uni.request({
  558. url: apiReadMessage,
  559. header: {
  560. "Content-Type": "application/x-www-form-urlencoded",
  561. "token": this.token,
  562. },
  563. method: "POST",
  564. data: {
  565. "mqIdListStr": this.mqIdListStr
  566. },
  567. success: (res) => {
  568. // console.log("readMessage", res);
  569. },
  570. fail: (err) => {
  571. console.log("readMessage err", err);
  572. },
  573. });
  574. },
  575. btnBack() {
  576. // window.history.back();
  577. const url = `action://to_home/`;
  578. tools.appAction(url);
  579. },
  580. btnReGroup() {
  581. this.queryObj.from = "rankList";
  582. this.queryString = tools.objectToQueryString(this.queryObj);
  583. // uni.navigateTo({
  584. // url: '/pages/bm/style1/signup?' + this.queryString
  585. // });
  586. const url = '/pages/bm/style1/signup?' + this.queryString;
  587. tools.appAction(url, "uni.navigateTo");
  588. },
  589. btnStartGame() {
  590. if (this.isJoin) { // 已报名
  591. const url = `action://to_detail/?id=${this.ocaId}&matchType=${this.mcType}`;
  592. tools.appAction(url);
  593. } else { // 未报名
  594. const url = "/pages/bm/style1/signup?" + this.queryString;
  595. tools.appAction(url, "uni.navigateTo");
  596. }
  597. },
  598. btnInfo() {
  599. // console.log(this.$refs.mypopup);
  600. this.$refs.mypopup.popupOpen();
  601. },
  602. btnMessage() {
  603. // console.log(this.$refs.mypopup);
  604. this.$refs.mypopupMessage.popupOpen();
  605. },
  606. onClickTabItem(e) {
  607. if (this.tabCurrent != e.currentIndex) {
  608. this.tabCurrent = e.currentIndex;
  609. }
  610. }
  611. }
  612. }
  613. </script>
  614. <style scoped>
  615. .content {
  616. width: 100vw;
  617. height: 100vh;
  618. }
  619. .top-default {
  620. width: 100%;
  621. height: 24.6vh;
  622. padding-top: 36px;
  623. justify-content: space-between;
  624. background-image: url("/static/backgroud/top_run.png"), url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#f8a95a 0%,#d25f11 100%);
  625. /* background-image: url("/static/backgroud/top_run.png"), url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#7aedff 0%,#047200 100%); */
  626. /* background-image: url("/static/backgroud/top_run.png"), url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#178bff 0%,#004d9b 100%); */
  627. background-repeat: no-repeat;
  628. background-position: 45px 25px, center, 0px 0px;
  629. /* background-position-x: center; */
  630. /* background-position-y: center; */
  631. background-size: auto 27vh, auto 22vh , cover;
  632. }
  633. .topbar-color {
  634. color: white;
  635. }
  636. .topcontent {
  637. /* height: 1300rpx; */
  638. /* background-color: #2e85ec; */
  639. margin-top: 50rpx;
  640. justify-content: center;
  641. }
  642. .top-countdown {
  643. height: 90rpx;
  644. color: #ffdc51;
  645. font-size: 28rpx;
  646. }
  647. .cal {
  648. width: 46rpx;
  649. height: 46rpx;
  650. margin-right: 20rpx;
  651. }
  652. .toptext {
  653. margin: 0 10rpx;
  654. color: #ffffff;
  655. font-size: 35rpx;
  656. font-weight: 500;
  657. line-height: 60rpx;
  658. }
  659. .btnReGroup {
  660. width: 130rpx;
  661. height: 36rpx;
  662. margin-top: 15rpx;
  663. margin-bottom: 15rpx;
  664. background: #ffcb00;
  665. border-radius: 15px;
  666. color: #000000;
  667. font-size: 24rpx;
  668. text-align: center;
  669. line-height: 36rpx;
  670. }
  671. .topbtm {
  672. width: 100%;
  673. height: 60rpx;
  674. margin-bottom: 10rpx;
  675. justify-content: space-evenly;
  676. }
  677. .topbtm-content {
  678. width: 100%;
  679. justify-content: space-around;
  680. /* justify-content: space-between; */
  681. }
  682. .topbtm-sspm {
  683. width: 120rpx;
  684. color: #ffee00;
  685. font-size: 24rpx;
  686. text-align: center;
  687. }
  688. .main {
  689. width: 100%;
  690. /* height: 70vh; */
  691. flex-grow: 1;
  692. justify-content: space-around;
  693. /* justify-content: space-between; */
  694. }
  695. .main-tab {
  696. width: 90%;
  697. margin-top: 20rpx;
  698. }
  699. .tab-view {
  700. width: 100%;
  701. /* height: 69vh; */
  702. flex-grow: 1;
  703. }
  704. .btnStart {
  705. width: 70%;
  706. /* height: 6vh; */
  707. height: 80rpx;
  708. /* margin-bottom: 1vh; */
  709. margin-bottom: 20rpx;
  710. /* font-weight: bold; */
  711. color: white;
  712. font-size: 32rpx;
  713. line-height: 80rpx;
  714. border-radius: 27px;
  715. }
  716. .btnStart-enable {
  717. background-color: #ffb40b;
  718. }
  719. .btnStart-disable {
  720. background-color: #c3c3c3;
  721. }
  722. </style>