rankList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. <!--
  2. [模板] 样式1 - 排名列表
  3. http://localhost:5173/card/#/pages/tpl/style1/rankList
  4. https://oss-mbh5.colormaprun.com/card/#/pages/tpl/style1/rankList
  5. -->
  6. <template>
  7. <view class="body">
  8. <view v-if="pageReady" class="content uni-column">
  9. <view class="uni-column page-top">
  10. <my-topbar :mcName="mcName" class="topbar-color"
  11. :showMessage="cardConfigData.popupMessageList.length > 0" @btnBackClick="btnBack"
  12. @btnInfoClick="btnInfo" @btnMessageClick="btnMessage"></my-topbar>
  13. <view class="topbtm uni-row">
  14. <!-- <view class="topbtm-egg bgcolor-main" @click="btnMyEgg"></view> -->
  15. <view class="topbtm-egg" @click="btnMyEgg">{{configParam.labelTicketName}}</view>
  16. <text class="topbtm-name bgcolor-main">{{nickName}}</text>
  17. <!-- <view class="topbtm-egg bgcolor-main" @click="btnExchg">兑换地址</view> -->
  18. <view class="topbtm-egg" v-if="configParam.labelGoodsList && configParam.labelGoodsList.length > 0"
  19. @click="btnGoodsList">{{configParam.labelGoodsList}}</view>
  20. <view class="topbtm-egg" v-else @click="btnExchg">{{configParam.labelAwardAddress}}</view>
  21. </view>
  22. </view>
  23. <view class="main uni-column">
  24. <view class="main-bar uni-row uni-jcse">
  25. <text>题目输出:{{all_totalAnswerNum}}</text>
  26. <text>总里程:{{fmtDistanct(all_totalDistance)}}km</text>
  27. <text>总打点:{{all_totalCp}}</text>
  28. <text>总百味豆:{{all_totalSysPoint}}</text>
  29. </view>
  30. <!-- <view>>> {{rankList}}</view> -->
  31. <my-tab ref="tab" :tabItems="tabItems" :tabItemsMark="tabItemsMark" :type="0"
  32. :initActIndex=configParam.tabInitActIndex @onTabClick="onTabClick" :fontSize="12"></my-tab>
  33. <view class="tab-view uni-column">
  34. <template v-for="(item, index) in rankRsList" :key="index">
  35. <my-ranklist v-show="tabCurrent === index" :rankRs="rankList[item]"
  36. :rank-type="rankTypeList[index]"></my-ranklist>
  37. </template>
  38. </view>
  39. <button class="btnBack bgcolor-main" @click="btnStartGame">{{btnStartGameText}}</button>
  40. </view>
  41. <my-popup ref="mypopup" :config="cardConfigData.popupRuleConfig" :dataList="cardConfigData.popupRuleList"
  42. :acttime="acttime"></my-popup>
  43. <my-popup ref="mypopupExchg" :config="cardConfigData.popupExchgConfig"
  44. :dataList="cardConfigData.popupExchgList"></my-popup>
  45. <my-popup ref="mypopupMessage" :config="cardConfigData.popupMessageConfig"
  46. :dataList="cardConfigData.popupMessageList" @noMoreRemindersClick="onNoMoreRemindersClick"></my-popup>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import tools from '/common/tools';
  52. import cardfunc from '/common/cardfunc';
  53. // import { localCardConfig } from "./cardconfig/test.js";
  54. import {
  55. localCardConfig
  56. } from "./cardconfig/pattern1.js";
  57. import {
  58. localUserConfig
  59. } from "./cardconfig/test_user.js";
  60. import {
  61. teamName
  62. } from '/common/define';
  63. import {
  64. token,
  65. apiMatchRsDetailQuery,
  66. apiCardRankDetailQuery,
  67. apiCompStatisticQuery,
  68. apiIsAllowMcSignUp,
  69. apiUserJoinCardQuery,
  70. checkResCode
  71. } from '/common/api';
  72. export default {
  73. data() {
  74. return {
  75. cardConfigData: cardfunc.cardConfigData,
  76. pageReady: false,
  77. pageName: "rankList",
  78. firstEnterKey: 'firstEnter-tpl-style1',
  79. rankKey: "rank-tpl-style1",
  80. messageKey: "message-tpl-style1",
  81. queryObj: {},
  82. queryString: "",
  83. token: "",
  84. ovtype: "",
  85. cardconfig: {}, // 卡片配置
  86. userconfig: {}, // 用户配置
  87. ecId: 0, // 卡片id
  88. mcId: 0, // 赛事id
  89. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  90. mcName: "", // 赛事名称
  91. acttime: "", // 活动时间
  92. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  93. endSecond: null, // 活动或赛事结束时间戳,单位秒
  94. ocaId: 0, // 关联id,带入到App活动详情页面
  95. nickName: "", // 昵称
  96. totalNum: null, // 总场次
  97. totalDistanct: null, // 总距离,单位米
  98. totalDistanctRankNum: null, // 总距离排名
  99. totalCp: null, // 总打点数
  100. totalCpRankNum: null, // 总打点数排名
  101. totalSysPoint: null, // 总百味豆
  102. totalSysPointRankNum: null, // 总百味豆排名
  103. fastPace: null, // 个人最快配速
  104. fastPaceRankNum: null, // 个人最快配速排名
  105. // ocaRs: [], // 卡片对应活动集合
  106. isJoin: null, // 是否报名
  107. btnStartGameText: "",
  108. all_totalDistance: 0, // 赛事所有人累计里程,单位米
  109. all_totalRightAnswerNum: 0, // 赛事所有人正确答题数(校园文化输出)
  110. all_totalAnswerNum: 0, // 赛事所有人答题数(校园文化输出)
  111. all_totalCp: 0, // 赛事中所有人打点数
  112. all_totalSysPoint: 0, // 赛事中所有人百味豆
  113. mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  114. allowMcSignUp: false, // 是否允许重新分组
  115. countdown: "", // 倒计时
  116. rankList: {}, // 排名列表
  117. interval: null,
  118. teamType: 0, // 队伍类型
  119. dispArrStr: "totalDistance,totalCp,totalSysPoint,fastPace", // 要显示的集合范围
  120. tabItems: ["总里程", "打点数", "百味豆", "配速"],
  121. rankTypeList: ["totalDistance", "totalCp", "totalSysPoint", "fastPace"],
  122. tabCurrent: 0,
  123. tabItemsMark: [{
  124. textColor: "#ff6203",
  125. icon: "static/common/award.png"
  126. }],
  127. rankRsList: ["totalDistanceRs", "totalCpRs", "totalSysPointRs", "fastPaceRs"],
  128. configParam: {
  129. labelTicketName: "我的奖券",
  130. labelAwardAddress: "兑奖地址",
  131. // labelGoodsList: "兑换商品",
  132. tabInitActIndex: 0
  133. }
  134. }
  135. },
  136. computed: {},
  137. onLoad(query) { // 类型非必填,可自动推导
  138. // console.log(query);
  139. this.queryObj = query;
  140. this.queryString = tools.objectToQueryString(this.queryObj);
  141. // console.log(queryString);
  142. this.token = query["token"] ?? token;
  143. this.ecId = query["id"] ?? 0;
  144. this.ovtype = query["ovtype"] ?? "";
  145. this.firstEnterKey += "-" + this.ecId;
  146. console.log("firstEnterKey:", this.firstEnterKey);
  147. this.rankKey += "-" + this.ecId;
  148. console.log("rankKey:", this.rankKey);
  149. this.messageKey += "-" + this.ecId;
  150. console.log("messageKey:", this.messageKey);
  151. cardfunc.init(this, this.token, this.ecId);
  152. cardfunc.getCardConfig(this.cardConfigQueryCallback, localCardConfig);
  153. this.dealOvtype();
  154. },
  155. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  156. onReady() {
  157. // this.dealFirstEnter();
  158. // this.$refs.mypopupMessage.popupOpen();
  159. },
  160. onShow() {
  161. this.getUserJoinCardQuery();
  162. },
  163. onUnload() {
  164. this.clear();
  165. },
  166. methods: {
  167. dealOvtype() {
  168. if (this.ovtype == "totalDistance") {
  169. this.tabCurrent = 0;
  170. } else if (this.ovtype == "totalCp") {
  171. this.tabCurrent = 1;
  172. } else if (this.ovtype == "totalSysPoint") {
  173. this.tabCurrent = 2;
  174. } else if (this.ovtype == "fastPace") {
  175. this.tabCurrent = 3;
  176. }
  177. console.log(`dealOvtype: ${this.ovtype} tabCurrent: ${this.tabCurrent}`);
  178. },
  179. dealNotice(rank) {
  180. // console.log('[dealFirstEnter]');
  181. let that = this;
  182. uni.getStorage({
  183. key: that.rankKey,
  184. success: (res) => {
  185. // console.log('[getStorage]', that.rankKey, res.data);
  186. const oldRank = res.data;
  187. if (oldRank != rank) {
  188. // that.notice = true;
  189. that.setRankValue(rank);
  190. }
  191. },
  192. fail: (e) => {
  193. console.log('[getStorage] fail', that.rankKey, e);
  194. // that.notice = false;
  195. that.setRankValue(rank);
  196. },
  197. })
  198. },
  199. setRankValue(data) {
  200. let that = this;
  201. uni.setStorage({
  202. key: that.rankKey,
  203. data: data,
  204. success: () => {
  205. console.log('[setStorage] success', that.rankKey, data);
  206. },
  207. fail: (e) => {
  208. console.log('[setStorage] fail', that.rankKey, e);
  209. },
  210. })
  211. },
  212. dealFirstEnter() {
  213. // console.log('[dealFirstEnter]');
  214. let that = this;
  215. uni.getStorage({
  216. key: that.firstEnterKey,
  217. success: (res) => {
  218. console.log('[getStorage]', that.firstEnterKey, res.data);
  219. },
  220. fail: (e) => {
  221. console.log('[getStorage] fail', that.firstEnterKey, e);
  222. that.btnInfo();
  223. that.setFirstEnterValue(true);
  224. },
  225. })
  226. },
  227. setFirstEnterValue(data) {
  228. let that = this;
  229. uni.setStorage({
  230. key: that.firstEnterKey,
  231. data: data,
  232. success: () => {
  233. console.log('[setStorage] success', that.firstEnterKey, data);
  234. },
  235. fail: (e) => {
  236. console.log('[setStorage] fail', that.firstEnterKey, e);
  237. },
  238. })
  239. },
  240. clear() {
  241. if (this.interval != null) {
  242. clearInterval(this.interval);
  243. this.interval = null;
  244. }
  245. },
  246. cardConfigQueryCallback(cardconfig) {
  247. this.cardconfig = cardconfig;
  248. cardfunc.getUserConfig(this.userConfigQueryCallback, localUserConfig);
  249. },
  250. userConfigQueryCallback(userconfig) {
  251. this.userconfig = userconfig;
  252. this.loadConfig();
  253. cardfunc.unReadMessageQuery(this.unReadMessageQueryCallback);
  254. this.matchRsDetailQuery();
  255. setTimeout(this.dealFirstEnter, 500);
  256. },
  257. unReadMessageQueryCallback(unReadMessage, mqIdListStr) {
  258. // console.log("[unReadMessageQueryCallback] unReadMessage", unReadMessage);
  259. if (unReadMessage.length > 0) {
  260. this.messageKey += mqIdListStr;
  261. // console.log("[unReadMessageQueryCallback] messageKey:", this.messageKey);
  262. const messageValue = uni.getStorageSync(this.messageKey);
  263. // console.log("[unReadMessageQueryCallback] messageValue:", messageValue);
  264. if (!messageValue) {
  265. this.$refs.mypopupMessage.popupOpen();
  266. // uni.setStorageSync(this.messageKey, true);
  267. }
  268. }
  269. },
  270. loadConfig() {
  271. this.loadCardConfig(this.cardconfig);
  272. this.loadUserConfig(this.userconfig);
  273. this.pageReady = true;
  274. },
  275. loadCardConfig(cardconfig) {
  276. cardconfig = cardfunc.parseCardConfig(cardconfig);
  277. // console.log("[loadCardConfig] cardconfig:", cardconfig);
  278. // 加载卡片通用配置
  279. if (cardconfig.common != undefined) {
  280. cardfunc.loadCardCommonConfig(cardconfig.common);
  281. }
  282. // -------- 加载当前页面的配置 --------
  283. const config = cardfunc.parseCardConfig(cardconfig[this.pageName]);
  284. // console.log("[loadConfig] config_page:", config);
  285. if (config == undefined || config == null) {
  286. return;
  287. }
  288. // 加载CSS样式
  289. const css = config.css;
  290. if (css != undefined && css.length > 0) {
  291. tools.loadCssCode(css);
  292. }
  293. // 加载成绩参数
  294. const rankParam = config.rankParam;
  295. if (rankParam != undefined) {
  296. if (rankParam.tabItemsMark != undefined) {
  297. this.tabItemsMark = rankParam.tabItemsMark;
  298. }
  299. if (rankParam.dispArrStr != undefined && rankParam.dispArrStr.length > 0) {
  300. this.dispArrStr = rankParam.dispArrStr;
  301. // console.log("[loadConfig] dispArrStr:", rankParam.dispArrStr);
  302. }
  303. if (rankParam.tabItems != undefined && rankParam.tabItems.length > 0) {
  304. this.tabItems = rankParam.tabItems;
  305. // console.log("[loadConfig] tabItems:", rankParam.tabItems);
  306. }
  307. if (rankParam.rankTypeList != undefined && rankParam.rankTypeList.length > 0) {
  308. this.rankTypeList = rankParam.rankTypeList;
  309. }
  310. if (rankParam.rankRsList != undefined && rankParam.rankRsList.length > 0) {
  311. this.rankRsList = rankParam.rankRsList;
  312. }
  313. }
  314. // console.log("[loadConfig] rankParam:", rankParam);
  315. // 加载页面参数
  316. const param = config.param;
  317. if (param != undefined) {
  318. if (param.labelTicketName != undefined && param.labelTicketName.length > 0) {
  319. this.configParam.labelTicketName = param.labelTicketName;
  320. }
  321. if (param.labelAwardAddress != undefined && param.labelAwardAddress.length > 0) {
  322. this.configParam.labelAwardAddress = param.labelAwardAddress;
  323. }
  324. if (param.labelGoodsList != undefined && param.labelGoodsList.length > 0) {
  325. this.configParam.labelGoodsList = param.labelGoodsList;
  326. }
  327. if (param.tabInitActIndex != undefined && param.tabInitActIndex >= 0) {
  328. this.configParam.tabInitActIndex = param.tabInitActIndex;
  329. this.tabCurrent = param.tabInitActIndex;
  330. }
  331. }
  332. },
  333. loadUserConfig(userconfig) {
  334. if (!userconfig) {
  335. console.log("[loadUserConfig] userconfig 为空");
  336. return;
  337. }
  338. const config = cardfunc.parseCardConfig(userconfig);
  339. console.log("[loadUserConfig] userconfig:", config);
  340. // 加载用户的弹窗数据
  341. cardfunc.loadUserPopupRule(config);
  342. },
  343. // 获取倒计时
  344. getCountdown() {
  345. // console.log(this.endSecond)
  346. if (this.endSecond > 0) {
  347. const now = Date.now() / 1000;
  348. const dif = this.endSecond - now;
  349. // const dif = 3600*24 - 60;
  350. if (dif > 0) {
  351. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  352. } else {
  353. this.countdown = "活动已结束";
  354. }
  355. // this.countdown = tools.convertSecondsToHMS(dif);
  356. } else {
  357. this.countdown = "距结束 --天--小时";
  358. }
  359. },
  360. // 格式化 距离
  361. fmtDistanct(val) {
  362. return Math.round(val * 100 / 1000) / 100;
  363. /* if (val < 10000)
  364. return Math.round(val * 10 / 1000) / 10;
  365. else
  366. return Math.round(val / 1000); */
  367. },
  368. fmtMcTime(timestamp) {
  369. return tools.fmtMcTime(timestamp);
  370. },
  371. // 获取活动时间
  372. getActtime() {
  373. this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
  374. // console.log("acttime", this.acttime);
  375. },
  376. getTeamName(teamType, teamIndex) {
  377. return teamName[teamType][teamIndex];
  378. },
  379. // 卡片对应线上赛多个活动查询
  380. matchRsDetailQuery() {
  381. uni.request({
  382. url: apiMatchRsDetailQuery,
  383. header: {
  384. "Content-Type": "application/x-www-form-urlencoded",
  385. "token": this.token,
  386. },
  387. method: "POST",
  388. data: {
  389. ecId: this.ecId
  390. },
  391. success: (res) => {
  392. // console.log("matchRsDetailQuery", res);
  393. if (checkResCode(res)) {
  394. const data = res.data.data;
  395. this.mcType = data.mcType;
  396. this.mcId = data.mcId;
  397. this.mcName = data.mcName;
  398. this.beginSecond = data.beginSecond;
  399. this.endSecond = data.endSecond;
  400. this.nickName = data.nickName;
  401. this.totalNum = data.totalNum;
  402. this.totalDistanct = data.totalDistanct;
  403. this.totalDistanctRankNum = data.totalDistanctRankNum;
  404. this.totalCp = data.totalCp;
  405. this.totalCpRankNum = data.totalCpRankNum;
  406. this.totalSysPoint = data.totalSysPoint;
  407. this.totalSysPointRankNum = data.totalSysPointRankNum;
  408. this.fastPace = data.fastPace;
  409. this.fastPaceRankNum = data.fastPaceRankNum;
  410. // this.ocaRs = data.ocaRs;
  411. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  412. this.getCountdown();
  413. this.getActtime();
  414. this.compStatisticQuery();
  415. this.getCardRankDetailQuery();
  416. this.clear();
  417. this.interval = setInterval(this.getCountdown, 60000);
  418. }
  419. },
  420. fail: (err) => {
  421. console.log("matchRsDetailQuery err", err)
  422. },
  423. });
  424. },
  425. // 排名查询
  426. getCardRankDetailQuery() {
  427. uni.request({
  428. url: apiCardRankDetailQuery,
  429. header: {
  430. "Content-Type": "application/x-www-form-urlencoded",
  431. "token": this.token,
  432. },
  433. method: "POST",
  434. data: {
  435. mcIdListStr: this.mcId,
  436. mcType: this.mcType,
  437. dispArrStr: this.dispArrStr
  438. },
  439. success: (res) => {
  440. // console.log("getCardRankDetailQuery", res);
  441. const rankdata = res.data.data;
  442. this.rankList = rankdata;
  443. },
  444. fail: (err) => {
  445. console.log("getCardRankDetailQuery err", err);
  446. },
  447. });
  448. },
  449. // 赛事总成绩统计查询
  450. compStatisticQuery() {
  451. uni.request({
  452. url: apiCompStatisticQuery,
  453. header: {
  454. "Content-Type": "application/x-www-form-urlencoded",
  455. "token": this.token,
  456. },
  457. method: "POST",
  458. data: {
  459. mcId: this.mcId
  460. },
  461. success: (res) => {
  462. // console.log("compStatisticQuery", res);
  463. if (res.data.code == 0) {
  464. const data = res.data.data;
  465. this.all_totalDistance = data.totalDistance;
  466. this.all_totalRightAnswerNum = data.totalRightAnswerNum;
  467. this.all_totalAnswerNum = data.totalAnswerNum;
  468. this.all_totalCp = data.totalCp;
  469. this.all_totalSysPoint = data.totalSysPoint;
  470. }
  471. },
  472. fail: (err) => {
  473. console.log("compStatisticQuery err", err);
  474. },
  475. });
  476. },
  477. // 是否允许重新分组(报名)
  478. isAllowMcSignUp() {
  479. uni.request({
  480. url: apiIsAllowMcSignUp,
  481. header: {
  482. "Content-Type": "application/x-www-form-urlencoded",
  483. "token": this.token,
  484. },
  485. method: "POST",
  486. data: {
  487. ecId: this.ecId
  488. },
  489. success: (res) => {
  490. // console.log("isAllowMcSignUp", res)
  491. if (res.data.code == 0) {
  492. const data = res.data.data;
  493. this.allowMcSignUp = data.allowSignUp;
  494. }
  495. },
  496. fail: (err) => {
  497. console.log("isAllowMcSignUp err", err)
  498. },
  499. });
  500. },
  501. // 用户是否已经报名卡片对应赛事查询
  502. getUserJoinCardQuery() {
  503. uni.request({
  504. url: apiUserJoinCardQuery,
  505. header: {
  506. "Content-Type": "application/x-www-form-urlencoded",
  507. "token": this.token
  508. },
  509. method: "POST",
  510. data: {
  511. ecId: this.ecId
  512. },
  513. success: (res) => {
  514. // console.log("getUserJoinCardQuery", res)
  515. const code = res.data.code;
  516. const data = res.data.data;
  517. if (code == 0) {
  518. this.isJoin = data.isJoin;
  519. if (this.isJoin) { // 已报名
  520. // this.btnStartGameText = "我要比赛";
  521. this.btnStartGameText = "选择场地";
  522. } else { // 未报名
  523. this.btnStartGameText = "我要报名";
  524. }
  525. }
  526. },
  527. fail: (err) => {
  528. console.log("getUserJoinCardQuery err", err)
  529. },
  530. });
  531. },
  532. onNoMoreRemindersClick() {
  533. this.$refs.mypopupMessage.popupClose();
  534. uni.setStorageSync(this.messageKey, true);
  535. },
  536. btnBack() {
  537. const url = `action://to_home/`;
  538. tools.appAction(url);
  539. },
  540. btnStartGame() {
  541. if (this.isJoin) { // 已报名
  542. const url = "/pages/tpl/style1/rankOverview?" + this.queryString;
  543. tools.appAction(url, "uni.navigateTo");
  544. } else { // 未报名
  545. const url = "/pages/tpl/style1/signup?" + this.queryString;
  546. tools.appAction(url, "uni.navigateTo");
  547. }
  548. },
  549. btnInfo() {
  550. // console.log(this.$refs.mypopup);
  551. this.$refs.mypopup.popupOpen();
  552. },
  553. btnMessage() {
  554. // console.log(this.$refs.mypopup);
  555. this.$refs.mypopupMessage.popupOpen();
  556. },
  557. btnMyEgg() {
  558. const url = "/pages/achievement/index2?tabCurrent=2&" + this.queryString;
  559. tools.appAction(url, "uni.navigateTo");
  560. },
  561. btnExchg() {
  562. this.$refs.mypopupExchg.popupOpen();
  563. },
  564. btnGoodsList() {
  565. this.queryObj.from = "/pages/tpl/style1/rankList";
  566. this.queryString = tools.objectToQueryString(this.queryObj);
  567. const url = "/pages/exchange/style1/goodsList?" + this.queryString;
  568. tools.appAction(url, "uni.navigateTo");
  569. },
  570. onTabClick(val) {
  571. // console.log("onTabClick: ", val);
  572. this.tabCurrent = val;
  573. }
  574. }
  575. }
  576. </script>
  577. <style scoped>
  578. .content {
  579. width: 100vw;
  580. height: 100vh;
  581. }
  582. .page-top {
  583. width: 100%;
  584. height: 170px;
  585. padding-top: 36px;
  586. justify-content: space-between;
  587. background-image: url("/static/backgroud/top_bg2.png");
  588. background-repeat: no-repeat;
  589. background-position: center;
  590. background-size: cover;
  591. }
  592. .topbar-color {
  593. color: #5b9100;
  594. }
  595. .topbtm {
  596. width: 100%;
  597. margin-bottom: 5px;
  598. justify-content: space-around;
  599. }
  600. .topbtm-name {
  601. max-width: 300rpx;
  602. padding: 3px 12px;
  603. background-color: #9fda39;
  604. border-radius: 5px;
  605. text-align: center;
  606. font-weight: 500;
  607. color: #497400;
  608. font-size: 14px;
  609. white-space: nowrap;
  610. overflow: hidden;
  611. text-overflow: ellipsis;
  612. }
  613. .topbtm-egg {
  614. width: 60px;
  615. padding: 3px 12px;
  616. background-color: #9fda39;
  617. border-radius: 50px;
  618. text-align: center;
  619. color: #497400;
  620. font-size: 14px;
  621. }
  622. .topbtm-null {
  623. width: 60px;
  624. padding: 3px 12px;
  625. }
  626. .cal {
  627. width: 46rpx;
  628. height: 46rpx;
  629. margin-right: 20rpx;
  630. }
  631. .main {
  632. width: 100%;
  633. flex-grow: 1;
  634. justify-content: space-around;
  635. }
  636. .main-bar {
  637. width: 100%;
  638. height: 21px;
  639. background-color: #d8e8c6;
  640. font-size: 10px;
  641. font-weight: 500;
  642. color: #3d6706;
  643. }
  644. .main-tab {
  645. width: 90%;
  646. margin-top: 20rpx;
  647. }
  648. .tab-view {
  649. width: 100%;
  650. flex-grow: 1;
  651. }
  652. .btnBack {
  653. width: 70%;
  654. height: 80rpx;
  655. margin-bottom: 20rpx;
  656. color: white;
  657. font-size: 32rpx;
  658. line-height: 80rpx;
  659. border-radius: 27px;
  660. background-color: #81cd00;
  661. }
  662. </style>