rankList.vue 23 KB

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