rankList.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <!--
  2. [报名] 样式3 - 排名列表
  3. http://localhost:5173/card/#/pages/bm/style4/rankList
  4. https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
  5. -->
  6. <template>
  7. <view class="body">
  8. <view class="content uni-column">
  9. <view class="uni-column" :class="cssTop">
  10. <view class="topbar uni-row" :class="cssTopbarColor">
  11. <uni-icons type="left" class="topbar-back" @click="btnBack"></uni-icons>
  12. <text class="mcName">{{mcName}}</text>
  13. <text class="topbar-rule" @click="btnInfo">规则</text>
  14. <!-- <image mode="aspectFit" class="topbar-info" @click="btnInfo" src="/static/default/info.png"></image> -->
  15. </view>
  16. <view class="topcontent uni-column uni-jcsa">
  17. <view class="logo"></view>
  18. <view class="tcbar uni-row uni-jcsb">
  19. <text class="tcbar-text">赛事总里程:{{fmtDistanct(totalDistance)}} 千米</text>
  20. <text class="tcbar-text">校园文化输出:{{totalRightAnswerNum}} 次</text>
  21. </view>
  22. </view>
  23. <!-- <view class="topbtm uni-row">
  24. <view class="topbtm-egg" @click="btnMyEgg">蛋叔券</view>
  25. <text class="topbtm-name">{{nickName}}</text>
  26. <view class="topbtm-egg" @click="btnExchg">兑换地址</view>
  27. </view> -->
  28. </view>
  29. <view class="main uni-column">
  30. <my-tab ref="tab1" :tabItems="tab1Items" :type="1" @onTabClick="onTab1Click" @onSelectChange="onSelectChange"></my-tab>
  31. <my-tab ref="tab2" :tabItems="tab2Items" :tabItemsMark="tab2ItemsMark" :type="0" @onTabClick="onTab2Click" :fontSize="12"></my-tab>
  32. <view class="tab-view uni-column">
  33. <!-- 团体成绩列表 -->
  34. <template v-if="tab1Current==0" v-for="(item, index) in rank1List" :key="index">
  35. <my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
  36. :rank-type="rankTypeList[index]"></my-ranklist>
  37. </template>
  38. <!-- 个人成绩列表 -->
  39. <template v-if="tab1Current==1" v-for="(item, index) in rank2List" :key="index">
  40. <my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
  41. :rank-type="rankTypeList[index]"></my-ranklist>
  42. </template>
  43. </view>
  44. <button class="btnBack" @click="btnStartGame">我要比赛</button>
  45. <!-- <button class="btnBack" @click="btnBack">返回</button> -->
  46. </view>
  47. <my-popup ref="mypopup" :dataList="popupDataList" :acttime="acttime"></my-popup>
  48. <my-popup ref="mypopupExchg" :dataList="popupExchgList"></my-popup>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import tools from '/common/tools';
  54. import {
  55. teamName,
  56. defaultPopUpDataList
  57. } from '/common/define';
  58. import {
  59. token,
  60. apiMatchRsDetailQuery,
  61. apiCardRankDetailQuery,
  62. apiCardConfigQuery,
  63. apiUserCurrentRankNumQuery,
  64. apiIsAllowMcSignUp,
  65. apiMapListQuery,
  66. apiCompStatisticQuery,
  67. checkResCode
  68. } from '/common/api';
  69. export default {
  70. data() {
  71. return {
  72. pageName: "rankList",
  73. firstEnterKey: 'firstEnter-bm-style4',
  74. rankKey: "rank-bm-style4",
  75. queryObj: {},
  76. queryString: "",
  77. token: "",
  78. ovtype: "",
  79. ecId: 0, // 卡片id
  80. mcId: 0, // 赛事id
  81. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  82. mcName: "", // 赛事名称
  83. acttime: "", // 活动时间
  84. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  85. endSecond: null, // 活动或赛事结束时间戳,单位秒
  86. ocaId: 0, // 关联id,带入到App活动详情页面
  87. nickName: "", // 昵称
  88. mapList: [], // 卡片对应地图列表详情
  89. totalDistance: 0, // 赛事所有人累计里程,单位米
  90. totalRightAnswerNum: 0, // 赛事所有人正确答题数(校园文化输出)
  91. mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  92. allowMcSignUp: false, // 是否允许重新分组
  93. countdown: "", // 倒计时
  94. rankList: { // 排名列表
  95. // totalDistanceRs: [],
  96. // totalCpRs: [],
  97. // totalSysPointRs: [],
  98. // fastPaceRs: []
  99. },
  100. interval: null,
  101. teamType: 0, // 队伍类型
  102. // dispArrStr: "totalDistance,totalCp,totalSysPoint,fastPace",
  103. dispArrStr: "teamCp,teamDistance,teamRightAnswerPer,teamPace,teamSpeed,regionCp,regionDistance,regionRightAnswerPer,regionPace,regionSpeed", // 要显示的集合范围
  104. tab1Current: 0,
  105. tab2Current: 0,
  106. tab1Items: ["团体"],
  107. // tab1Items: ["团体", {
  108. // selectValue: 1,
  109. // data: [
  110. // {text: "个人(中心校区)", value: 1},
  111. // {text: "个人(千佛山校区南区)", value: 2},
  112. // {text: "个人(兴隆校区)", value: 3}
  113. // ]}
  114. // ],
  115. // tab2Items: ["总距离", "打点数", "百味豆", "配速"],
  116. tab2Items: ["总里程", "累计打点", "校园文化", "最快配速", "单场用时"],
  117. tab2ItemsMark: [
  118. {textColor: "#ff6203", icon: "static/common/award.png"}
  119. ],
  120. tabActiveColor: "#81cd00",
  121. // 成绩类型列表
  122. rankTypeList: ["totalDistance", "totalCp", "rightAnswerPer", "fastPace", "speed"],
  123. // 团体成绩列表
  124. rank1List: ["teamDistanceRs", "teamCpRs", "teamRightAnswerPerRs", "teamPaceRs", "teamSpeedRs"],
  125. // 个人成绩列表
  126. rank2List: ["regionDistanceRs", "regionCpRs", "regionRightAnswerPerRs", "regionPaceRs", "regionSpeedRs"],
  127. cssTop: "",
  128. cssTopbarColor: "",
  129. popupDataList: [],
  130. popupExchgList: []
  131. }
  132. },
  133. computed: {},
  134. onLoad(query) { // 类型非必填,可自动推导
  135. // console.log(query);
  136. this.queryObj = query;
  137. this.queryString = tools.objectToQueryString(this.queryObj);
  138. // console.log(queryString);
  139. this.token = query["token"] ?? token;
  140. this.ecId = query["id"] ?? 0;
  141. this.ovtype = query["ovtype"] ?? "";
  142. this.firstEnterKey += "-" + this.ecId;
  143. console.log("firstEnterKey:", this.firstEnterKey);
  144. this.rankKey += "-" + this.ecId;
  145. console.log("rankKey:", this.rankKey);
  146. tools.removeCssCode();
  147. this.getCardConfigQuery();
  148. },
  149. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  150. onReady() {
  151. // this.dealFirstEnter();
  152. },
  153. onUnload() {
  154. this.clear();
  155. },
  156. methods: {
  157. dealNotice(rank) {
  158. // console.log('[dealFirstEnter]');
  159. let that = this;
  160. uni.getStorage({
  161. key: that.rankKey,
  162. success: (res) => {
  163. console.log('[getStorage]', that.rankKey, res.data);
  164. const oldRank = res.data;
  165. if (oldRank != rank) {
  166. // that.notice = true;
  167. that.setRankValue(rank);
  168. }
  169. },
  170. fail: (e) => {
  171. console.log('[getStorage] fail', that.rankKey, e);
  172. // that.notice = false;
  173. that.setRankValue(rank);
  174. },
  175. })
  176. },
  177. setRankValue(data) {
  178. let that = this;
  179. uni.setStorage({
  180. key: that.rankKey,
  181. data: data,
  182. success: () => {
  183. console.log('[setStorage] success', that.rankKey, data);
  184. },
  185. fail: (e) => {
  186. console.log('[setStorage] fail', that.rankKey, e);
  187. },
  188. })
  189. },
  190. dealFirstEnter() {
  191. // console.log('[dealFirstEnter]');
  192. let that = this;
  193. uni.getStorage({
  194. key: that.firstEnterKey,
  195. success: (res) => {
  196. console.log('[getStorage]', that.firstEnterKey, res.data);
  197. },
  198. fail: (e) => {
  199. console.log('[getStorage] fail', that.firstEnterKey, e);
  200. that.btnInfo();
  201. that.setFirstEnterValue(true);
  202. },
  203. })
  204. },
  205. setFirstEnterValue(data) {
  206. let that = this;
  207. uni.setStorage({
  208. key: that.firstEnterKey,
  209. data: data,
  210. success: () => {
  211. console.log('[setStorage] success', that.firstEnterKey, data);
  212. },
  213. fail: (e) => {
  214. console.log('[setStorage] fail', that.firstEnterKey, e);
  215. },
  216. })
  217. },
  218. clear() {
  219. if (this.interval != null) {
  220. clearInterval(this.interval);
  221. this.interval = null;
  222. }
  223. },
  224. loadConfig(config) {
  225. // console.log("config", config);
  226. // 加载CSS样式
  227. const css = config.css;
  228. if (css != undefined && css.length > 0) {
  229. tools.loadCssCode(css);
  230. if (css.indexOf(".top{") >= 0) {
  231. this.cssTop = "top";
  232. }
  233. if (css.indexOf(".topbar-color{") >= 0) {
  234. this.cssTopbarColor = "topbar-color";
  235. }
  236. }
  237. if (this.cssTop == "") {
  238. this.cssTop = "top-default";
  239. }
  240. if (this.cssTopbarColor == "") {
  241. this.cssTopbarColor = "topbar-color-default";
  242. }
  243. console.log("[loadConfig] cssTop:", this.cssTop);
  244. console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);
  245. const tabActiveColor = config.tabActiveColor;
  246. if (tabActiveColor != undefined && tabActiveColor.length > 0) {
  247. this.tabActiveColor = tabActiveColor;
  248. }
  249. // 加载弹窗数据
  250. const popupDataList = config.popupDataList;
  251. // console.log("[loadConfig] popupDataList:", popupDataList);
  252. if (popupDataList != undefined && popupDataList.length > 0) {
  253. for (var i = 0; i < popupDataList.length; i++) {
  254. // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
  255. if (popupDataList[i] == 'default') {
  256. for (var j = 0; j < defaultPopUpDataList.length; j++) {
  257. this.popupDataList.push(defaultPopUpDataList[j]);
  258. }
  259. } else {
  260. this.popupDataList.push(popupDataList[i]);
  261. }
  262. }
  263. } else {
  264. this.popupDataList = defaultPopUpDataList;
  265. console.log("[loadConfig] popupDataList 加载默认列表");
  266. }
  267. // console.log("[loadConfig] popupDataList:", this.popupDataList);
  268. // 加载弹窗(兑换地点)数据
  269. const popupExchgList = config.popupExchgList;
  270. if (popupExchgList != undefined && popupExchgList.length > 0) {
  271. for (var i = 0; i < popupExchgList.length; i++) {
  272. // console.log("[loadConfig] popupExchgList", i, popupExchgList[i]);
  273. this.popupExchgList.push(popupExchgList[i]);
  274. }
  275. }
  276. // console.log("[loadConfig] popupExchgList:", this.popupExchgList);
  277. },
  278. // 获取倒计时
  279. getCountdown() {
  280. // console.log(this.endSecond)
  281. if (this.endSecond > 0) {
  282. const now = Date.now() / 1000;
  283. const dif = this.endSecond - now;
  284. // const dif = 3600*24 - 60;
  285. if (dif > 0) {
  286. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  287. } else {
  288. this.countdown = "活动已结束";
  289. }
  290. // this.countdown = tools.convertSecondsToHMS(dif);
  291. } else {
  292. this.countdown = "距结束 --天--小时";
  293. }
  294. },
  295. // 格式化 距离
  296. fmtDistanct(val) {
  297. return Math.round(val * 100 / 1000) / 100;
  298. /* if (val < 10000)
  299. return Math.round(val * 10 / 1000) / 10;
  300. else
  301. return Math.round(val / 1000); */
  302. },
  303. fmtMcTime(timestamp) {
  304. var date = new Date(timestamp * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  305. // var Y = date.getFullYear() + '-';
  306. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  307. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  308. var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
  309. var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
  310. // var s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
  311. const timeStr = M + D + h + m;
  312. // console.log("timeStr", timeStr);
  313. return timeStr;
  314. },
  315. // 获取活动时间
  316. getActtime() {
  317. this.acttime = this.fmtMcTime(this.beginSecond) + " 至 " + this.fmtMcTime(this.endSecond);
  318. },
  319. getTeamName(teamType, teamIndex) {
  320. return teamName[teamType][teamIndex];
  321. },
  322. getCardConfigQuery() {
  323. uni.request({
  324. url: apiCardConfigQuery,
  325. header: {
  326. "Content-Type": "application/x-www-form-urlencoded",
  327. "token": this.token,
  328. },
  329. method: "POST",
  330. data: {
  331. ecId: this.ecId,
  332. pageName: this.pageName
  333. },
  334. success: (res) => {
  335. // console.log("getCardConfigQuery", res)
  336. const data = res.data.data;
  337. // console.log("configJson", data.configJson);
  338. // const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
  339. // console.log("configJson", data.configJson);
  340. const config = {
  341. "css": `
  342. .top{
  343. width: 100%;
  344. height: 170px;
  345. padding-top: 36px;
  346. justify-content: space-between;
  347. background-image: url('static/backgroud/top_bg_sddx.png');
  348. background-repeat: no-repeat;
  349. background-position-x: center;
  350. background-position-y: bottom;
  351. background-size: cover;
  352. }
  353. .topbar-color{
  354. color: #ffffff;
  355. }
  356. .btnBack{
  357. background-color: #a43a07 !important;
  358. }
  359. .swiper-item-button {
  360. background-color: #a43a07 !important;
  361. }
  362. .uni-swiper-dot-active {
  363. background: #a43a07 !important;
  364. }
  365. `,
  366. "tabActiveColor": "#a43a07",
  367. "popupDataList": [{
  368. "type": 1,
  369. "data": {
  370. "title": "小飞龙定向赛",
  371. "img": "/static/common/egg.png",
  372. "content": "济南奥体中心“一场三馆”包括体育场、体育馆、网球馆和游泳馆,呈现出“东荷西柳”的总体布局。 体育场以济南的“市树”柳树为母题,将垂柳柔美飘逸的形态固化为建筑语言。"
  373. }
  374. },
  375. "default"
  376. ],
  377. "popupExchgList": [{
  378. "type": 5,
  379. "data": {
  380. "title": "兑换地点",
  381. "img": "/static/common/wslgwcs.png",
  382. "point": {
  383. "longitude": 117.022194,
  384. "latitude": 36.661612,
  385. "name": "万盛隆购物超市"
  386. }
  387. }
  388. }]
  389. };
  390. this.loadConfig(config);
  391. this.matchRsDetailQuery();
  392. setTimeout(this.dealFirstEnter, 500);
  393. },
  394. fail: (err) => {
  395. console.log("getCardConfigQuery err", err)
  396. },
  397. });
  398. },
  399. // 卡片对应活动或赛事详情查询
  400. // getCardDetailQuery() {
  401. // uni.request({
  402. // url: apiCardDetailQuery,
  403. // header: {
  404. // "Content-Type": "application/x-www-form-urlencoded",
  405. // "token": this.token,
  406. // },
  407. // method: "POST",
  408. // data: {
  409. // ecId: this.ecId
  410. // },
  411. // success: (res) => {
  412. // // console.log("getCardDetailQuery", res)
  413. // const data = res.data.data;
  414. // this.mcType = data.mcType;
  415. // this.mcId = data.mcId;
  416. // this.mcName = data.mcName;
  417. // this.beginSecond = data.beginSecond;
  418. // this.endSecond = data.endSecond;
  419. // this.coiName = data.coiName;
  420. // this.teamNum = data.teamNum;
  421. // this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  422. // this.getCountdown();
  423. // this.getActtime();
  424. // this.getCardRankDetailQuery();
  425. // this.clear();
  426. // this.interval = setInterval(this.getCountdown, 60000);
  427. // },
  428. // fail: (err) => {
  429. // console.log("getCardDetailQuery err", err)
  430. // },
  431. // });
  432. // },
  433. // 卡片对应线上赛多个活动查询
  434. matchRsDetailQuery() {
  435. uni.request({
  436. url: apiMatchRsDetailQuery,
  437. header: {
  438. "Content-Type": "application/x-www-form-urlencoded",
  439. "token": this.token,
  440. },
  441. method: "POST",
  442. data: {
  443. ecId: this.ecId
  444. },
  445. success: (res) => {
  446. // console.log("matchRsDetailQuery", res);
  447. if (checkResCode(res)) {
  448. const data = res.data.data;
  449. this.mcType = data.mcType;
  450. this.mcId = data.mcId;
  451. this.mcName = data.mcName;
  452. this.beginSecond = data.beginSecond;
  453. this.endSecond = data.endSecond;
  454. this.nickName = data.nickName;
  455. // this.totalNum = data.totalNum;
  456. // this.totalDistanct = data.totalDistanct;
  457. // this.totalDistanctRankNum = data.totalDistanctRankNum;
  458. // this.totalCp = data.totalCp;
  459. // this.totalCpRankNum = data.totalCpRankNum;
  460. // this.totalSysPoint = data.totalSysPoint;
  461. // this.totalSysPointRankNum = data.totalSysPointRankNum;
  462. // this.fastPace = data.fastPace;
  463. // this.fastPaceRankNum = data.fastPaceRankNum;
  464. // this.ocaRs = data.ocaRs;
  465. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  466. this.getCountdown();
  467. this.getActtime();
  468. this.mapListQuery();
  469. this.compStatisticQuery();
  470. this.getCardRankDetailQuery();
  471. this.clear();
  472. this.interval = setInterval(this.getCountdown, 60000);
  473. }
  474. },
  475. fail: (err) => {
  476. console.log("matchRsDetailQuery err", err)
  477. },
  478. });
  479. },
  480. // 卡片对应地图列表详情查询
  481. mapListQuery() {
  482. uni.request({
  483. url: apiMapListQuery,
  484. header: {
  485. "Content-Type": "application/x-www-form-urlencoded",
  486. "token": this.token,
  487. },
  488. method: "POST",
  489. data: {
  490. mcId: this.mcId
  491. },
  492. success: (res) => {
  493. console.log("mapListQuery", res);
  494. if (res.data.code == 0) {
  495. const data = res.data.data;
  496. this.mapList = data;
  497. let mapItems = {
  498. selectValue: 0,
  499. data: []
  500. };
  501. for (var i = 0; i < data.length; i++) {
  502. if (i == 0) {
  503. mapItems.selectValue = data[i].ocaId;
  504. }
  505. let map = {};
  506. map.text = "个人(" + data[i].mapName + ")";
  507. map.value = data[i].ocaId;
  508. mapItems.data.push(map);
  509. }
  510. this.tab1Items.push(mapItems);
  511. }
  512. },
  513. fail: (err) => {
  514. console.log("mapListQuery err", err);
  515. },
  516. });
  517. },
  518. // 赛事总成绩统计查询
  519. compStatisticQuery() {
  520. uni.request({
  521. url: apiCompStatisticQuery,
  522. header: {
  523. "Content-Type": "application/x-www-form-urlencoded",
  524. "token": this.token,
  525. },
  526. method: "POST",
  527. data: {
  528. mcId: this.mcId
  529. },
  530. success: (res) => {
  531. console.log("compStatisticQuery", res);
  532. if (res.data.code == 0) {
  533. const data = res.data.data;
  534. this.totalDistance = data.totalDistance;
  535. this.totalRightAnswerNum = data.totalRightAnswerNum;
  536. }
  537. },
  538. fail: (err) => {
  539. console.log("compStatisticQuery err", err);
  540. },
  541. });
  542. },
  543. // 排名查询
  544. getCardRankDetailQuery() {
  545. uni.request({
  546. url: apiCardRankDetailQuery,
  547. header: {
  548. "Content-Type": "application/x-www-form-urlencoded",
  549. "token": this.token,
  550. },
  551. method: "POST",
  552. data: {
  553. mcIdListStr: this.mcId,
  554. mcType: this.mcType,
  555. ocaId: this.ocaId,
  556. dispArrStr: this.dispArrStr
  557. },
  558. success: (res) => {
  559. console.log("getCardRankDetailQuery", res);
  560. const rankdata = res.data.data;
  561. // this.rankList.totalDistanceRs = rankdata.totalDistanceRs;
  562. // this.rankList.totalCpRs = rankdata.totalCpRs;
  563. // this.rankList.totalSysPointRs = rankdata.totalSysPointRs;
  564. // this.rankList.fastPaceRs = rankdata.fastPaceRs;
  565. this.rankList = rankdata;
  566. },
  567. fail: (err) => {
  568. console.log("getCardRankDetailQuery err", err)
  569. },
  570. });
  571. },
  572. // 卡片用户当前排名查询
  573. // getUserCurrentRankNumQuery() {
  574. // uni.request({
  575. // url: apiUserCurrentRankNumQuery,
  576. // header: {
  577. // "Content-Type": "application/x-www-form-urlencoded",
  578. // "token": this.token,
  579. // },
  580. // method: "POST",
  581. // data: {
  582. // ecId: this.ecId
  583. // },
  584. // success: (res) => {
  585. // // console.log("getUserCurrentRankNumQuery", res)
  586. // if (res.data.code == 0) {
  587. // const data = res.data.data;
  588. // const rankNum = data.rankNum;
  589. // this.dealNotice(rankNum);
  590. // }
  591. // },
  592. // fail: (err) => {
  593. // console.log("getUserCurrentRankNumQuery err", err)
  594. // },
  595. // });
  596. // },
  597. // 是否允许重新分组(报名)
  598. isAllowMcSignUp() {
  599. uni.request({
  600. url: apiIsAllowMcSignUp,
  601. header: {
  602. "Content-Type": "application/x-www-form-urlencoded",
  603. "token": this.token,
  604. },
  605. method: "POST",
  606. data: {
  607. ecId: this.ecId
  608. },
  609. success: (res) => {
  610. // console.log("isAllowMcSignUp", res)
  611. if (res.data.code == 0) {
  612. const data = res.data.data;
  613. this.allowMcSignUp = data.allowSignUp;
  614. }
  615. },
  616. fail: (err) => {
  617. console.log("isAllowMcSignUp err", err)
  618. },
  619. });
  620. },
  621. btnBack() {
  622. // window.history.back();
  623. /* uni.navigateTo({
  624. url: "/pages/bm/style4/rankOverview?" + this.queryString
  625. }); */
  626. const url = `action://to_home/`;
  627. // window.location.href = url;
  628. tools.appAction(url);
  629. },
  630. btnStartGame() {
  631. uni.navigateTo({
  632. url: "/pages/bm/style4/rankOverview?" + this.queryString
  633. });
  634. },
  635. btnInfo() {
  636. // console.log(this.$refs.mypopup);
  637. this.$refs.mypopup.popupOpen();
  638. },
  639. btnMyEgg() {
  640. uni.navigateTo({
  641. url: "/pages/achievement/index2?tabCurrent=2&" + this.queryString
  642. });
  643. },
  644. btnExchg() {
  645. this.$refs.mypopupExchg.popupOpen();
  646. },
  647. onTab1Click(val) {
  648. // console.log("onTab1Click: ", val);
  649. this.tab1Current = val;
  650. },
  651. onTab2Click(val) {
  652. // console.log("onTab2Click: ", val);
  653. this.tab2Current = val;
  654. },
  655. onSelectChange(val) {
  656. console.log("onSelectChange: ", val);
  657. this.ocaId = val.value;
  658. this.getCardRankDetailQuery();
  659. },
  660. }
  661. }
  662. </script>
  663. <style scoped>
  664. .content {
  665. width: 100vw;
  666. height: 100vh;
  667. }
  668. .top-default {
  669. width: 100%;
  670. height: 170px;
  671. padding-top: 36px;
  672. justify-content: space-between;
  673. background-image: url('static/backgroud/top_bg_sddx.png');
  674. background-repeat: no-repeat;
  675. background-position: center;
  676. background-size: cover;
  677. }
  678. .topbar {
  679. width: 90%;
  680. justify-content: space-between;
  681. }
  682. .topbar-color-default {
  683. color: #ffffff !important;
  684. }
  685. .topbar-back {
  686. width: 43rpx;
  687. height: 43rpx;
  688. color: inherit !important;
  689. font-size: 48rpx !important;
  690. /* opacity: 0; */
  691. }
  692. .topbar-info {
  693. width: 46rpx;
  694. height: 46rpx;
  695. }
  696. .topbar-rule {
  697. font-size: 32rpx;
  698. }
  699. .topcontent {
  700. width: 90%;
  701. /* height: 90%; */
  702. margin-bottom: 20px;
  703. }
  704. .logo {
  705. width: 80px;
  706. height: 80px;
  707. margin-top: 10px;
  708. margin-bottom: 10px;
  709. background-image: url('/static/logo/sddx.png');
  710. background-repeat: no-repeat;
  711. background-position-x: center;
  712. background-position-y: center;
  713. background-size: contain;
  714. }
  715. .tcbar {
  716. width: 92%;
  717. padding: 6px 12px;
  718. background: #9a300e;
  719. border-radius: 6px;
  720. }
  721. .tcbar-text {
  722. font-family: Source Han Sans CN;
  723. font-weight: 500;
  724. color: #f3d809;
  725. font-size: 13px;
  726. }
  727. .mcName {
  728. font-size: 40rpx;
  729. font-weight: 550;
  730. }
  731. .topbtm {
  732. width: 100%;
  733. margin-bottom: 5px;
  734. justify-content: space-around;
  735. }
  736. .topbtm-name {
  737. padding: 3px 12px;
  738. background-color: #9fda39;
  739. border-radius: 5px;
  740. text-align: center;
  741. font-weight: 500;
  742. color: #497400;
  743. font-size: 14px;
  744. }
  745. .topbtm-egg {
  746. width: 60px;
  747. padding: 3px 12px;
  748. background-color: #c6690a;
  749. border-radius: 50px;
  750. text-align: center;
  751. color: #ffffff;
  752. font-size: 14px;
  753. }
  754. .topbtm-null {
  755. width: 60px;
  756. padding: 3px 12px;
  757. }
  758. .cal {
  759. width: 46rpx;
  760. height: 46rpx;
  761. margin-right: 20rpx;
  762. }
  763. .main {
  764. width: 100%;
  765. /* height: 70vh; */
  766. flex-grow: 1;
  767. justify-content: space-around;
  768. /* justify-content: space-between; */
  769. }
  770. /deep/ .tab-active {
  771. background-color: #a43a07 !important;
  772. }
  773. .main-tab {
  774. width: 90%;
  775. margin-top: 20rpx;
  776. }
  777. .tab-view {
  778. width: 100%;
  779. /* height: 69vh; */
  780. flex-grow: 1;
  781. }
  782. .btnBack {
  783. width: 70%;
  784. /* height: 6vh; */
  785. height: 80rpx;
  786. /* margin-bottom: 1vh; */
  787. margin-bottom: 20rpx;
  788. /* font-weight: bold; */
  789. color: white;
  790. font-size: 32rpx;
  791. line-height: 80rpx;
  792. border-radius: 27px;
  793. background-color: #ff870d;
  794. }
  795. /* .swiper-item-button {
  796. background-color: #ff870e !important;
  797. }
  798. .uni-swiper-dot-active {
  799. background: #ff870e !important;
  800. } */
  801. </style>