rankList.vue 22 KB

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