rankList.vue 21 KB

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