rankList.vue 21 KB

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