rankList.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411
  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. <my-topbar :mcName="mcName" :class="cssTopbarColor" :showMessage="popupMessageList.length > 0"
  11. @btnBackClick="btnBack" @btnInfoClick="btnInfo" @btnMessageClick="btnMessage"></my-topbar>
  12. <view class="topcontent uni-column uni-jcsa">
  13. <view class="tcview uni-row uni-jcsb">
  14. <view class="tcbox uni-column uni-jcc">
  15. <text class="tcbox-label">赛事总里程</text>
  16. <text class="tcbox-value">{{fmtDistanct(all_totalDistance)}} 千米</text>
  17. </view>
  18. <view class="tcbox uni-column uni-jcc">
  19. <text class="tcbox-label">{{configParam.labelRightAnswerNum}}</text>
  20. <text class="tcbox-value">{{all_totalAnswerNum}} 次</text>
  21. </view>
  22. </view>
  23. <text class="today" :data-content="today">{{today}}</text>
  24. </view>
  25. <!-- <view class="topcontent uni-column uni-jcsa">
  26. <view class="logo"></view>
  27. <view class="tcbar uni-row uni-jcsb">
  28. <text class="tcbar-text">赛事总里程:{{fmtDistanct(all_totalDistance)}} 千米</text>
  29. <text class="tcbar-text">{{configParam.labelRightAnswerNum}}:{{all_totalAnswerNum}} 次</text>
  30. </view>
  31. </view> -->
  32. <view class="topbtm uni-row">
  33. <view class="topbtm-egg" @click="btnMyEgg">{{configParam.labelTicketName}}</view>
  34. <text class="topbtm-name">{{nickName}}</text>
  35. <view class="topbtm-egg" @click="btnExchg">{{configParam.labelAwardAddress}}</view>
  36. </view>
  37. </view>
  38. <view class="main uni-column">
  39. <view class="main-bar uni-row uni-jcse">
  40. <text>总里程:{{fmtDistanct(all_totalDistance)}}km</text>
  41. <text>总打点数:{{all_totalCp}}个</text>
  42. <text>总百味豆数:{{all_totalSysPoint}}个</text>
  43. </view>
  44. <my-tab ref="tab1" :tabItems="tab1Items" :type="1" @onTabClick="onTab1Click"
  45. :initActIndex=configParam.tab1InitActIndex @onSelectChange="onSelectChange"></my-tab>
  46. <my-tab ref="tab2" :tabItems="tab2Items" :tabItemsMark="tab2ItemsMark" :type="0"
  47. :initActIndex=configParam.tab2InitActIndex @onTabClick="onTab2Click" :fontSize="12"></my-tab>
  48. <view class="tab-view uni-column">
  49. <!-- 团体成绩列表 -->
  50. <template v-if="tab1Current==0" v-for="(item, index) in rank1List" :key="index">
  51. <my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
  52. :rank-type="rankTypeList[index]"></my-ranklist>
  53. </template>
  54. <!-- 个人成绩列表 -->
  55. <template v-if="tab1Current==1" v-for="(item, index) in rank2List" :key="index">
  56. <my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
  57. :rank-type="rankTypeList[index]"></my-ranklist>
  58. </template>
  59. </view>
  60. <button class="btnBack" @click="btnStartGame">{{btnStartGameText}}</button>
  61. <!-- <button class="btnBack" @click="btnBack">返回</button> -->
  62. </view>
  63. <my-popup ref="mypopup" :config="popupRuleConfig" :dataList="popupDataList" :acttime="acttime"></my-popup>
  64. <my-popup ref="mypopupExchg" :config="popupExchgConfig" :dataList="popupExchgList"></my-popup>
  65. <my-popup ref="mypopupMessage" :config="popupMessageConfig" :dataList="popupMessageList" @noMoreRemindersClick="onNoMoreRemindersClick"></my-popup>
  66. <my-popup ref="mypopupWarn" :config="popupWarnConfig" :dataList="popupWarnList"></my-popup>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import tools from '/common/tools';
  72. import {
  73. teamName,
  74. defaultPopUpDataList
  75. } from '/common/define';
  76. import {
  77. token,
  78. apiMatchRsDetailQuery,
  79. apiCardRankDetailQuery,
  80. apiCardConfigQuery,
  81. apiUserCurrentRankNumQuery,
  82. apiIsAllowMcSignUp,
  83. apiUserJoinCardQuery,
  84. apiMapListQuery,
  85. apiCompStatisticQuery,
  86. apiWarnMessageQuery,
  87. apiUnReadMessageQuery,
  88. apiReadMessage,
  89. checkResCode
  90. } from '/common/api';
  91. export default {
  92. data() {
  93. return {
  94. pageName: "rankList",
  95. firstEnterKey: 'firstEnter-bm-style4',
  96. rankKey: "rank-bm-style4",
  97. mapKey: "rank-bm-style4-map",
  98. messageKey: "message-bm-style4",
  99. queryObj: {},
  100. queryString: "",
  101. token: "",
  102. ovtype: "",
  103. ecId: 0, // 卡片id
  104. mcId: 0, // 赛事id
  105. mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
  106. mcName: "", // 赛事名称
  107. acttime: "", // 活动时间
  108. beginSecond: null, // 活动或赛事开始时间戳,单位秒
  109. endSecond: null, // 活动或赛事结束时间戳,单位秒
  110. ocaId: 0, // 关联id,带入到App活动详情页面
  111. nickName: "", // 昵称
  112. isJoin: null, // 是否报名
  113. btnStartGameText: "",
  114. today: "",
  115. mapList: [], // 卡片对应地图列表详情
  116. all_totalDistance: 0, // 赛事所有人累计里程,单位米
  117. all_totalRightAnswerNum: 0, // 赛事所有人正确答题数(校园文化输出)
  118. all_totalAnswerNum: 0, // 赛事所有人答题数(校园文化输出)
  119. all_totalCp: 0, // 赛事中所有人打点数
  120. all_totalSysPoint: 0, // 赛事中所有人百味豆
  121. mcState: 0, // 赛事/活动状态 0: 未开始 1: 进行中 2: 已结束
  122. allowMcSignUp: false, // 是否允许重新分组
  123. countdown: "", // 倒计时
  124. rankList: { // 排名列表
  125. // totalDistanceRs: [],
  126. // totalCpRs: [],
  127. // totalSysPointRs: [],
  128. // fastPaceRs: []
  129. },
  130. interval: null,
  131. teamType: 0, // 队伍类型
  132. // dispArrStr: "totalDistance,totalCp,totalSysPoint,fastPace",
  133. dispArrStr: "teamCp,teamTodayCp,teamDistance,teamRightAnswerPer,teamTodayPace,regionCp,regionTodayCp,regionDistance,regionRightAnswerPer,regionTodayPace", // 要显示的集合范围
  134. tab1Current: 0,
  135. tab2Current: 0,
  136. tab1Items: ["团体"],
  137. // tab1Items: ["团体", {
  138. // selectValue: 1,
  139. // data: [
  140. // {text: "个人(中心校区)", value: 1},
  141. // {text: "个人(千佛山校区南区)", value: 2},
  142. // {text: "个人(兴隆校区)", value: 3}
  143. // ]}
  144. // ],
  145. tab2Items: [],
  146. tab2Items_team: ["总积分", "今日积分", "总里程", "校园文化", "今日配速"],
  147. tab2Items_person: ["总积分", "今日积分", "总里程", "校园文化", "今日配速"],
  148. tab2ItemsMark: [{
  149. textColor: "#ff6203",
  150. icon: "static/common/award.png"
  151. }],
  152. tabActiveColor: "#81cd00",
  153. rankTypeList: [],
  154. // 团队成绩类型列表
  155. rankTypeList_team: ["totalScore", "totalScore", "totalDistance", "rightAnswerPer", "fastPace"],
  156. // 个人成绩类型列表
  157. rankTypeList_person: ["totalScore", "totalScore", "totalDistance", "rightAnswerPer", "fastPace"],
  158. // 团体成绩列表
  159. rank1List: ["teamCpRs", "teamTodayCpRs", "teamDistanceRs", "teamRightAnswerPerRs", "teamTodayPaceRs"],
  160. // 个人成绩列表
  161. rank2List: ["regionCpRs", "regionTodayCpRs", "regionDistanceRs", "regionRightAnswerPerRs", "regionTodayPaceRs"],
  162. cssTop: "",
  163. cssTopbarColor: "",
  164. configParam: {
  165. labelRightAnswerNum: "文化输出",
  166. labelTicketName: "我的奖券",
  167. labelAwardAddress: "兑奖地址",
  168. tab1InitActIndex: 0,
  169. tab2InitActIndex: 0,
  170. },
  171. // selectedMapId: 0, // 用户选择的地图ID
  172. popupRuleConfig: {}, // 规则弹窗配置
  173. popupExchgConfig: {}, // 兑换地址弹窗配置
  174. popupMessageConfig: {}, // 通知弹窗配置
  175. // popupWarnConfig: {}, // 警告弹窗配置
  176. popupWarnConfig: {
  177. "height": "550px"
  178. },
  179. popupDataList: [],
  180. popupExchgList: [],
  181. popupMessageList: [],
  182. popupWarnList: [],
  183. // mqIdListStr: "", // 已读消息id列表 逗号分隔
  184. }
  185. },
  186. computed: {},
  187. onLoad(query) { // 类型非必填,可自动推导
  188. // console.log(query);
  189. this.queryObj = query;
  190. this.queryString = tools.objectToQueryString(this.queryObj);
  191. // console.log(queryString);
  192. this.token = query["token"] ?? token;
  193. this.ecId = query["id"] ?? 0;
  194. this.ovtype = query["ovtype"] ?? "";
  195. this.firstEnterKey += "-" + this.ecId;
  196. console.log("firstEnterKey:", this.firstEnterKey);
  197. this.rankKey += "-" + this.ecId;
  198. console.log("rankKey:", this.rankKey);
  199. this.mapKey += "-" + this.ecId;
  200. console.log("mapKey:", this.mapKey);
  201. this.messageKey += "-" + this.ecId;
  202. console.log("messageKey:", this.messageKey);
  203. this.today = tools.timestampToTime(null, 2);
  204. tools.removeCssCode();
  205. const mapValue = uni.getStorageSync(this.mapKey);
  206. if (mapValue) {
  207. console.log("mapValue:", mapValue);
  208. // this.selectedMapId = mapValue;
  209. this.ocaId = mapValue;
  210. }
  211. this.getCardConfigQuery();
  212. },
  213. // 页面初次渲染完成,此时组件已挂载完成,DOM 树($el)已可用
  214. onReady() {
  215. // this.dealFirstEnter();
  216. // this.tab2Items = this.tab2Items_team;
  217. },
  218. onShow() {
  219. this.getUserJoinCardQuery();
  220. },
  221. onUnload() {
  222. this.clear();
  223. },
  224. methods: {
  225. initTab() {
  226. if (this.tab1Current == 0) {
  227. this.rankTypeList = this.rankTypeList_team;
  228. this.tab2Items = this.tab2Items_team;
  229. } else {
  230. this.rankTypeList = this.rankTypeList_person;
  231. this.tab2Items = this.tab2Items_person;
  232. }
  233. },
  234. dealNotice(rank) {
  235. // console.log('[dealFirstEnter]');
  236. let that = this;
  237. uni.getStorage({
  238. key: that.rankKey,
  239. success: (res) => {
  240. console.log('[getStorage]', that.rankKey, res.data);
  241. const oldRank = res.data;
  242. if (oldRank != rank) {
  243. // that.notice = true;
  244. that.setRankValue(rank);
  245. }
  246. },
  247. fail: (e) => {
  248. console.log('[getStorage] fail', that.rankKey, e);
  249. // that.notice = false;
  250. that.setRankValue(rank);
  251. },
  252. })
  253. },
  254. setRankValue(data) {
  255. let that = this;
  256. uni.setStorage({
  257. key: that.rankKey,
  258. data: data,
  259. success: () => {
  260. console.log('[setStorage] success', that.rankKey, data);
  261. },
  262. fail: (e) => {
  263. console.log('[setStorage] fail', that.rankKey, e);
  264. },
  265. })
  266. },
  267. dealFirstEnter() {
  268. // console.log('[dealFirstEnter]');
  269. let that = this;
  270. uni.getStorage({
  271. key: that.firstEnterKey,
  272. success: (res) => {
  273. console.log('[getStorage]', that.firstEnterKey, res.data);
  274. },
  275. fail: (e) => {
  276. console.log('[getStorage] fail', that.firstEnterKey, e);
  277. that.btnInfo();
  278. that.setFirstEnterValue(true);
  279. },
  280. })
  281. },
  282. setFirstEnterValue(data) {
  283. let that = this;
  284. uni.setStorage({
  285. key: that.firstEnterKey,
  286. data: data,
  287. success: () => {
  288. console.log('[setStorage] success', that.firstEnterKey, data);
  289. },
  290. fail: (e) => {
  291. console.log('[setStorage] fail', that.firstEnterKey, e);
  292. },
  293. })
  294. },
  295. clear() {
  296. if (this.interval != null) {
  297. clearInterval(this.interval);
  298. this.interval = null;
  299. }
  300. },
  301. loadConfig(config) {
  302. // console.log("config", config);
  303. // 加载CSS样式
  304. const css = config.css;
  305. if (css != undefined && css.length > 0) {
  306. tools.loadCssCode(css);
  307. if (css.indexOf(".top{") >= 0) {
  308. this.cssTop = "top";
  309. }
  310. if (css.indexOf(".topbar-color{") >= 0) {
  311. this.cssTopbarColor = "topbar-color";
  312. }
  313. }
  314. if (this.cssTop == "") {
  315. this.cssTop = "top-default";
  316. }
  317. if (this.cssTopbarColor == "") {
  318. this.cssTopbarColor = "topbar-color-default";
  319. }
  320. console.log("[loadConfig] cssTop:", this.cssTop);
  321. console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);
  322. const tabActiveColor = config.tabActiveColor;
  323. if (tabActiveColor != undefined && tabActiveColor.length > 0) {
  324. this.tabActiveColor = tabActiveColor;
  325. }
  326. // 加载规则弹窗配置
  327. const popupRuleConfig = config.popupRuleConfig;
  328. if (popupRuleConfig != undefined) {
  329. this.popupRuleConfig = popupRuleConfig;
  330. }
  331. // console.log("[loadConfig] popupRuleConfig:", this.popupRuleConfig);
  332. // 加载兑换地址弹窗配置
  333. const popupExchgConfig = config.popupExchgConfig;
  334. if (popupExchgConfig != undefined) {
  335. this.popupExchgConfig = popupExchgConfig;
  336. }
  337. // console.log("[loadConfig] popupExchgConfig:", this.popupExchgConfig);
  338. // 加载通知弹窗配置
  339. const popupMessageConfig = config.popupMessageConfig;
  340. if (popupMessageConfig != undefined) {
  341. this.popupMessageConfig = popupMessageConfig;
  342. }
  343. // console.log("[loadConfig] popupMessageConfig:", this.popupMessageConfig);
  344. // 加载警告弹窗配置
  345. const popupWarnConfig = config.popupWarnConfig;
  346. if (popupWarnConfig != undefined) {
  347. this.popupWarnConfig = popupWarnConfig;
  348. }
  349. // console.log("[loadConfig] popupWarnConfig:", this.popupWarnConfig);
  350. // 加载弹窗数据
  351. const popupDataList = config.popupDataList;
  352. // console.log("[loadConfig] popupDataList:", popupDataList);
  353. if (popupDataList != undefined && popupDataList.length > 0) {
  354. for (var i = 0; i < popupDataList.length; i++) {
  355. // console.log("[loadConfig] popupDataList", i, popupDataList[i]);
  356. if (popupDataList[i] == 'default') {
  357. for (var j = 0; j < defaultPopUpDataList.length; j++) {
  358. this.popupDataList.push(defaultPopUpDataList[j]);
  359. }
  360. } else {
  361. this.popupDataList.push(popupDataList[i]);
  362. }
  363. }
  364. } else {
  365. this.popupDataList = defaultPopUpDataList;
  366. console.log("[loadConfig] popupDataList 加载默认列表");
  367. }
  368. // console.log("[loadConfig] popupDataList:", this.popupDataList);
  369. // 加载弹窗(兑换地点)数据
  370. const popupExchgList = config.popupExchgList;
  371. if (popupExchgList != undefined && popupExchgList.length > 0) {
  372. for (var i = 0; i < popupExchgList.length; i++) {
  373. // console.log("[loadConfig] popupExchgList", i, popupExchgList[i]);
  374. this.popupExchgList.push(popupExchgList[i]);
  375. }
  376. }
  377. // console.log("[loadConfig] popupExchgList:", this.popupExchgList);
  378. // 加载成绩参数
  379. const rankParam = config.rankParam;
  380. if (rankParam != undefined) {
  381. if (rankParam.tab2ItemsMark != undefined) {
  382. this.tab2ItemsMark = rankParam.tab2ItemsMark;
  383. }
  384. if (rankParam.dispArrStr != undefined && rankParam.dispArrStr.length > 0) {
  385. this.dispArrStr = rankParam.dispArrStr;
  386. // console.log("[loadConfig] dispArrStr:", rankParam.dispArrStr);
  387. }
  388. if (rankParam.tab2Items_team != undefined && rankParam.tab2Items_team.length > 0) {
  389. this.tab2Items_team = rankParam.tab2Items_team;
  390. // console.log("[loadConfig] tab2Items_team:", rankParam.tab2Items_team);
  391. }
  392. if (rankParam.tab2Items_person != undefined && rankParam.tab2Items_person.length > 0) {
  393. this.tab2Items_person = rankParam.tab2Items_person;
  394. }
  395. if (rankParam.rankTypeList_team != undefined && rankParam.rankTypeList_team.length > 0) {
  396. this.rankTypeList_team = rankParam.rankTypeList_team;
  397. }
  398. if (rankParam.rankTypeList_person != undefined && rankParam.rankTypeList_person.length > 0) {
  399. this.rankTypeList_person = rankParam.rankTypeList_person;
  400. }
  401. if (rankParam.rank1List != undefined && rankParam.rank1List.length > 0) {
  402. this.rank1List = rankParam.rank1List;
  403. }
  404. if (rankParam.rank2List != undefined && rankParam.rank2List.length > 0) {
  405. this.rank2List = rankParam.rank2List;
  406. }
  407. }
  408. // console.log("[loadConfig] rankParam:", rankParam);
  409. // 加载页面参数
  410. const param = config.param;
  411. if (param != undefined) {
  412. if (param.labelRightAnswerNum != undefined && param.labelRightAnswerNum.length > 0) {
  413. this.configParam.labelRightAnswerNum = param.labelRightAnswerNum;
  414. }
  415. if (param.labelTicketName != undefined && param.labelTicketName.length > 0) {
  416. this.configParam.labelTicketName = param.labelTicketName;
  417. }
  418. if (param.labelAwardAddress != undefined && param.labelAwardAddress.length > 0) {
  419. this.configParam.labelAwardAddress = param.labelAwardAddress;
  420. }
  421. if (param.tab1InitActIndex != undefined && param.tab1InitActIndex >= 0) {
  422. this.configParam.tab1InitActIndex = param.tab1InitActIndex;
  423. this.tab1Current = param.tab1InitActIndex;
  424. }
  425. if (param.tab2InitActIndex != undefined && param.tab2InitActIndex >= 0) {
  426. this.configParam.tab2InitActIndex = param.tab2InitActIndex;
  427. this.tab2Current = param.tab2InitActIndex;
  428. }
  429. }
  430. this.initTab();
  431. // console.log("[loadConfig] param:", this.configParam);
  432. },
  433. // 获取倒计时
  434. getCountdown() {
  435. // console.log(this.endSecond)
  436. if (this.endSecond > 0) {
  437. const now = Date.now() / 1000;
  438. const dif = this.endSecond - now;
  439. // const dif = 3600*24 - 60;
  440. if (dif > 0) {
  441. this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
  442. } else {
  443. this.countdown = "活动已结束";
  444. }
  445. // this.countdown = tools.convertSecondsToHMS(dif);
  446. } else {
  447. this.countdown = "距结束 --天--小时";
  448. }
  449. },
  450. // 格式化 距离
  451. fmtDistanct(val) {
  452. // return Math.round(val * 100 / 1000) / 100;
  453. if (val < 10000)
  454. return Math.round(val * 100 / 1000) / 100;
  455. else
  456. return Math.round(val / 1000);
  457. },
  458. fmtMcTime(timestamp) {
  459. return tools.fmtMcTime(timestamp);
  460. },
  461. // 获取活动时间
  462. getActtime() {
  463. this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
  464. },
  465. getTeamName(teamType, teamIndex) {
  466. return teamName[teamType][teamIndex];
  467. },
  468. getCardConfigQuery() {
  469. uni.request({
  470. url: apiCardConfigQuery,
  471. header: {
  472. "Content-Type": "application/x-www-form-urlencoded",
  473. "token": this.token,
  474. },
  475. method: "POST",
  476. data: {
  477. ecId: this.ecId,
  478. pageName: this.pageName
  479. },
  480. success: (res) => {
  481. // console.log("getCardConfigQuery", res);
  482. const data = res.data.data;
  483. // console.log("configJson", data.configJson);
  484. const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
  485. // console.log("configJson", data.configJson);
  486. /* const config = {
  487. "css": `
  488. .top{
  489. width: 100%;
  490. height: 170px;
  491. padding-top: 36px;
  492. justify-content: space-between;
  493. background-image: url('static/backgroud/top_bg_dengshanjie.png');
  494. background-repeat: no-repeat;
  495. background-position-x: center;
  496. background-position-y: -20px;
  497. background-size: cover;
  498. }
  499. .topcontent {
  500. display: none !important;
  501. }
  502. .topbar-color{
  503. color: #333333;
  504. }
  505. .topbtm-name {
  506. background-color: #c77f34 !important;
  507. border: none !important;
  508. color: #ffffff !important;
  509. }
  510. .topbtm-egg {
  511. background-color: #c77f34 !important;
  512. border: none !important;
  513. color: #ffffff !important;
  514. }
  515. .main-bar {
  516. display: flex !important;
  517. background-color: #ffeddb !important;
  518. color: #ff8d1a !important;
  519. }
  520. .btnBack{
  521. background-color: #ff870e !important;
  522. }
  523. .tab-active{
  524. background-color: #ff870e !important;
  525. }
  526. .swiper-item-button {
  527. background-color: #ff870e !important;
  528. }
  529. .uni-swiper-dot-active {
  530. background: #ff870e !important;
  531. }
  532. `,
  533. "tabActiveColor": "#ff870e",
  534. "popupRuleConfig": {
  535. "height": "530px"
  536. },
  537. "popupDataList": [
  538. {
  539. "type": 7,
  540. "data": {
  541. "title": "活动规则",
  542. "content": "<br>① 任何人、任何时间均可体验参赛。<br><br>② 6个场地任意选,比赛时间内,不限次数参赛。<br><br>③ 1次成功打点,获取1个百味豆。<br><br>④ 1次正确答题,获取1个百味豆。"
  543. }
  544. },
  545. {
  546. "type": 7,
  547. "data": {
  548. "title": "活动奖励",
  549. "content": "<br><li>活动: 20个百味豆兑换一个鸡蛋<br><span style='font-size: 12px; color:#999999;'>(限本次活动百味豆,兑换以“蛋叔券”为准)</style><li>百味豆越多,“蛋叔”给你的鸡蛋 越多,上不封顶!<li>随时可以兑换哦~<li>能不能吃上自己挣的鸡蛋,就看你的了!<li style='color:#FF870E;'><span style='color:#FF870E;'>同时,参赛即可获取合作机构的奖励!</span><br><br>",
  550. "imageList": [{
  551. "src": "/static/common/danshu.png",
  552. "width": "183px",
  553. "height": "81px"
  554. }]
  555. }
  556. },
  557. {
  558. "type": 7,
  559. "data": {
  560. "title": "合作机构",
  561. "logo": {
  562. "src": "/static/logo/xxhpgy.png",
  563. "width": "120px",
  564. "height": "120px",
  565. "memo": "星星和蒲公英双语阅读馆"
  566. },
  567. "content": "星星和蒲公英双语阅读馆,济南儿童阅读网红圣地!馆藏2W+册正版图书,涵盖中英文大奖绘本、桥梁书、自然科学与文学社科名著,以及艺术画册和摄影图集。开展面向4-12岁孩子的中文阅读读书会&中英双语阅读课。<br><br><span style='color:#FF870E;'>礼品一:到店阅读权限一年<br>礼品二:店内饮品五折券一张</span>",
  568. "pointList": [
  569. {
  570. "name": "星星和蒲公英双语阅读馆",
  571. "tel": "电话:<a href='tel:18765812082' style='color: #333333;'>18765812082</a>",
  572. "longitude": 117.075174,
  573. "latitude": 36.654108
  574. }
  575. ]
  576. }
  577. },
  578. {
  579. "type": 7,
  580. "data": {
  581. "title": "合作机构",
  582. "logo": {
  583. "src": "/static/logo/wensiyu.png",
  584. "width": "120px",
  585. "height": "120px",
  586. "memo": "文思语少年读书会"
  587. },
  588. "content": "文思语少年读书会,专注于为4-15岁儿童和家庭提供阅读素养发展解决方案和产品。读书会以整本书精读伴读为核心,塑造良好的读书习惯,训练阅读理解能力,培养创意作文能力。<br><br><span style='color:#FF870E;'>礼品:《山海经》精装套系书<br>书籍原价158元,仅需19.9元/套,不限领取次数,多余权限可赠送他人使用!</span>",
  589. "pointList": [
  590. {
  591. "name": "文思语少年读书会",
  592. "tel": "电话:<a href='tel:17663733631' style='color: #333333;'>17663733631</a>",
  593. "longitude": 117.075174,
  594. "latitude": 36.654108
  595. }
  596. ]
  597. }
  598. },
  599. {
  600. "type": 7,
  601. "data": {
  602. "title": "合作机构",
  603. "logo": {
  604. "src": "/static/logo/lezhigu.png",
  605. "width": "120px",
  606. "height": "120px",
  607. "memo": "乐知谷"
  608. },
  609. "content": "乐知谷是济南科学类口碑最好的机构,主做面向4-12岁儿童,内容涵盖工程科技、自然科学、生命科学、地球太空、PBL综合项目等五大板块,室内&户外相结合,真正将实验、动手、探究融于生活,培养独立思考、永存好奇、敢于创造的未来型孩子。<br><span style='color:#FF870E;'>礼品:乐知谷经典工程体验课《建造一座斜拉桥》一堂,感受力学结构的科技含量课程每人限参与1次,多余权限可赠送他人使用</span>",
  610. "pointList": [
  611. {
  612. "name": "乐知谷",
  613. "tel": "电话:<a href='tel:19100652564' style='color: #333333;'>19100652564</a>",
  614. "longitude": 117.075174,
  615. "latitude": 36.654108
  616. }
  617. ]
  618. }
  619. },
  620. {
  621. "type": 7,
  622. "data": {
  623. "title": "合作机构",
  624. "logo": {
  625. "src": "/static/logo/kusentiyu.png",
  626. "width": "120px",
  627. "height": "120px",
  628. "memo": "酷森体育俱乐部"
  629. },
  630. "content": "酷森体育俱乐部包含少儿篮球、体能训练、跳绳,三大课程。拥有二十年以上资深学院派专家教练团队,制定系统的少儿运动训练体系,结合不同年龄及能力的孩子进行定制化教学,使其更符合不同孩子的综合能力提升。<br><br><span style='color:#FF870E;'>礼品:手机全年影视会员卡</span>",
  631. "pointList": [
  632. {
  633. "name": "酷森体育俱乐部",
  634. "tel": "电话:<a href='tel:15621875115' style='color: #333333;'>15621875115</a>",
  635. "longitude": 117.075174,
  636. "latitude": 36.654108
  637. }
  638. ]
  639. }
  640. }
  641. ],
  642. "popupExchgConfig": {
  643. "height": "460px"
  644. },
  645. "popupExchgList": [
  646. {
  647. "type": 5,
  648. "data": {
  649. "title": "兑换地点1",
  650. "img": "/static/common/gtgwcs.png",
  651. "point": {
  652. "longitude": 117.022194,
  653. "latitude": 36.661612,
  654. "name": "冠同购物超市"
  655. }
  656. }
  657. },
  658. {
  659. "type": 5,
  660. "data": {
  661. "title": "兑换地点2",
  662. "img": "/static/common/wslgwcs2.png",
  663. "point": {
  664. "longitude": 117.022194,
  665. "latitude": 36.661612,
  666. "name": "万盛隆购物超市"
  667. }
  668. }
  669. }
  670. ],
  671. "popupMessageConfig": {
  672. "height": "500px"
  673. },
  674. "param": {
  675. "labelRightAnswerNum": "文化输出",
  676. "labelTicketName": "蛋叔券",
  677. "labelAwardAddress": "兑换地址",
  678. "tab1InitActIndex": 0,
  679. "tab2InitActIndex": 0
  680. },
  681. "rankParam": {
  682. "tab2ItemsMark": [],
  683. "dispArrStr": "teamDistance,teamPoint,teamCp,teamPace,regionDistance,regionPoint,regionCp,regionPace",
  684. "tab2Items_team": ["里程", "打点数", "百味豆", "配速"],
  685. "tab2Items_person": ["里程", "打点数", "百味豆", "配速"],
  686. "rankTypeList_team": ["totalDistance", "totalCp", "totalSysPoint", "fastPace"],
  687. "rankTypeList_person": ["totalDistance", "totalCp", "totalSysPoint", "fastPace"],
  688. "rank1List": ["teamDistanceRs", "teamPointRs", "teamCpRs", "teamPaceRs"],
  689. "rank2List": ["regionDistanceRs", "regionPointRs", "regionCpRs", "regionPaceRs"]
  690. }
  691. }; */
  692. this.loadConfig(config);
  693. this.getUnReadMessageQuery();
  694. this.warnMessageQuery();
  695. this.matchRsDetailQuery();
  696. setTimeout(this.dealFirstEnter, 500);
  697. },
  698. fail: (err) => {
  699. console.log("getCardConfigQuery err", err)
  700. },
  701. });
  702. },
  703. // 卡片对应活动或赛事详情查询
  704. // getCardDetailQuery() {
  705. // uni.request({
  706. // url: apiCardDetailQuery,
  707. // header: {
  708. // "Content-Type": "application/x-www-form-urlencoded",
  709. // "token": this.token,
  710. // },
  711. // method: "POST",
  712. // data: {
  713. // ecId: this.ecId
  714. // },
  715. // success: (res) => {
  716. // // console.log("getCardDetailQuery", res)
  717. // const data = res.data.data;
  718. // this.mcType = data.mcType;
  719. // this.mcId = data.mcId;
  720. // this.mcName = data.mcName;
  721. // this.beginSecond = data.beginSecond;
  722. // this.endSecond = data.endSecond;
  723. // this.coiName = data.coiName;
  724. // this.teamNum = data.teamNum;
  725. // this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  726. // this.getCountdown();
  727. // this.getActtime();
  728. // this.getCardRankDetailQuery();
  729. // this.clear();
  730. // this.interval = setInterval(this.getCountdown, 60000);
  731. // },
  732. // fail: (err) => {
  733. // console.log("getCardDetailQuery err", err)
  734. // },
  735. // });
  736. // },
  737. // 卡片对应线上赛多个活动查询
  738. matchRsDetailQuery() {
  739. uni.request({
  740. url: apiMatchRsDetailQuery,
  741. header: {
  742. "Content-Type": "application/x-www-form-urlencoded",
  743. "token": this.token,
  744. },
  745. method: "POST",
  746. data: {
  747. ecId: this.ecId
  748. },
  749. success: (res) => {
  750. // console.log("matchRsDetailQuery", res);
  751. if (checkResCode(res)) {
  752. const data = res.data.data;
  753. this.mcType = data.mcType;
  754. this.mcId = data.mcId;
  755. this.mcName = data.mcName;
  756. this.beginSecond = data.beginSecond;
  757. this.endSecond = data.endSecond;
  758. this.nickName = data.nickName;
  759. // this.totalNum = data.totalNum;
  760. // this.totalDistanct = data.totalDistanct;
  761. // this.totalDistanctRankNum = data.totalDistanctRankNum;
  762. // this.totalCp = data.totalCp;
  763. // this.totalCpRankNum = data.totalCpRankNum;
  764. // this.totalSysPoint = data.totalSysPoint;
  765. // this.totalSysPointRankNum = data.totalSysPointRankNum;
  766. // this.fastPace = data.fastPace;
  767. // this.fastPaceRankNum = data.fastPaceRankNum;
  768. // this.ocaRs = data.ocaRs;
  769. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  770. this.getCountdown();
  771. this.getActtime();
  772. this.mapListQuery();
  773. this.compStatisticQuery();
  774. // this.getCardRankDetailQuery();
  775. this.clear();
  776. this.interval = setInterval(this.getCountdown, 60000);
  777. }
  778. },
  779. fail: (err) => {
  780. console.log("matchRsDetailQuery err", err)
  781. },
  782. });
  783. },
  784. // 卡片对应地图列表详情查询
  785. mapListQuery() {
  786. uni.request({
  787. url: apiMapListQuery,
  788. header: {
  789. "Content-Type": "application/x-www-form-urlencoded",
  790. "token": this.token,
  791. },
  792. method: "POST",
  793. data: {
  794. mcId: this.mcId
  795. },
  796. success: (res) => {
  797. // console.log("mapListQuery", res);
  798. if (res.data.code == 0) {
  799. const data = res.data.data;
  800. this.mapList = data;
  801. let mapItems = {
  802. // selectValue: this.selectedMapId,
  803. selectValue: this.ocaId,
  804. data: []
  805. };
  806. for (var i = 0; i < data.length; i++) {
  807. if (mapItems.selectValue == 0 && i == 0) {
  808. mapItems.selectValue = data[i].ocaId;
  809. // this.selectedMapId = data[i].ocaId;
  810. this.ocaId = data[i].ocaId;
  811. }
  812. let map = {};
  813. map.text = "个人(" + data[i].mapName + ")";
  814. map.value = data[i].ocaId;
  815. mapItems.data.push(map);
  816. }
  817. this.tab1Items.push(mapItems);
  818. this.getCardRankDetailQuery();
  819. }
  820. },
  821. fail: (err) => {
  822. console.log("mapListQuery err", err);
  823. },
  824. });
  825. },
  826. // 赛事总成绩统计查询
  827. compStatisticQuery() {
  828. uni.request({
  829. url: apiCompStatisticQuery,
  830. header: {
  831. "Content-Type": "application/x-www-form-urlencoded",
  832. "token": this.token,
  833. },
  834. method: "POST",
  835. data: {
  836. mcId: this.mcId
  837. },
  838. success: (res) => {
  839. // console.log("compStatisticQuery", res);
  840. if (res.data.code == 0) {
  841. const data = res.data.data;
  842. this.all_totalDistance = data.totalDistance;
  843. this.all_totalRightAnswerNum = data.totalRightAnswerNum;
  844. this.all_totalAnswerNum = data.totalAnswerNum;
  845. this.all_totalCp = data.totalCp;
  846. this.all_totalSysPoint = data.totalSysPoint;
  847. }
  848. },
  849. fail: (err) => {
  850. console.log("compStatisticQuery err", err);
  851. },
  852. });
  853. },
  854. // 排名查询
  855. getCardRankDetailQuery() {
  856. uni.request({
  857. url: apiCardRankDetailQuery,
  858. header: {
  859. "Content-Type": "application/x-www-form-urlencoded",
  860. "token": this.token,
  861. },
  862. method: "POST",
  863. data: {
  864. mcIdListStr: this.mcId,
  865. mcType: this.mcType,
  866. ocaId: this.ocaId,
  867. dispArrStr: this.dispArrStr
  868. },
  869. success: (res) => {
  870. // console.log("getCardRankDetailQuery", res);
  871. const rankdata = res.data.data;
  872. // this.rankList.totalDistanceRs = rankdata.totalDistanceRs;
  873. // this.rankList.totalCpRs = rankdata.totalCpRs;
  874. // this.rankList.totalSysPointRs = rankdata.totalSysPointRs;
  875. // this.rankList.fastPaceRs = rankdata.fastPaceRs;
  876. this.rankList = rankdata;
  877. },
  878. fail: (err) => {
  879. console.log("getCardRankDetailQuery err", err);
  880. },
  881. });
  882. },
  883. // 卡片用户当前排名查询
  884. // getUserCurrentRankNumQuery() {
  885. // uni.request({
  886. // url: apiUserCurrentRankNumQuery,
  887. // header: {
  888. // "Content-Type": "application/x-www-form-urlencoded",
  889. // "token": this.token,
  890. // },
  891. // method: "POST",
  892. // data: {
  893. // ecId: this.ecId
  894. // },
  895. // success: (res) => {
  896. // // console.log("getUserCurrentRankNumQuery", res)
  897. // if (res.data.code == 0) {
  898. // const data = res.data.data;
  899. // const rankNum = data.rankNum;
  900. // this.dealNotice(rankNum);
  901. // }
  902. // },
  903. // fail: (err) => {
  904. // console.log("getUserCurrentRankNumQuery err", err)
  905. // },
  906. // });
  907. // },
  908. // 是否允许重新分组(报名)
  909. isAllowMcSignUp() {
  910. uni.request({
  911. url: apiIsAllowMcSignUp,
  912. header: {
  913. "Content-Type": "application/x-www-form-urlencoded",
  914. "token": this.token,
  915. },
  916. method: "POST",
  917. data: {
  918. ecId: this.ecId
  919. },
  920. success: (res) => {
  921. // console.log("isAllowMcSignUp", res)
  922. if (res.data.code == 0) {
  923. const data = res.data.data;
  924. this.allowMcSignUp = data.allowSignUp;
  925. }
  926. },
  927. fail: (err) => {
  928. console.log("isAllowMcSignUp err", err)
  929. },
  930. });
  931. },
  932. // 用户是否已经报名卡片对应赛事查询
  933. getUserJoinCardQuery() {
  934. uni.request({
  935. url: apiUserJoinCardQuery,
  936. header: {
  937. "Content-Type": "application/x-www-form-urlencoded",
  938. "token": this.token
  939. },
  940. method: "POST",
  941. data: {
  942. ecId: this.ecId
  943. },
  944. success: (res) => {
  945. // console.log("getUserJoinCardQuery", res)
  946. const code = res.data.code;
  947. const data = res.data.data;
  948. if (code == 0) {
  949. this.isJoin = data.isJoin;
  950. if (this.isJoin) { // 已报名
  951. this.btnStartGameText = "我要比赛";
  952. } else { // 未报名
  953. this.btnStartGameText = "我要报名";
  954. }
  955. }
  956. },
  957. fail: (err) => {
  958. console.log("getUserJoinCardQuery err", err)
  959. },
  960. });
  961. },
  962. // 未读消息列表查询
  963. getUnReadMessageQuery() {
  964. uni.request({
  965. url: apiUnReadMessageQuery,
  966. header: {
  967. "Content-Type": "application/x-www-form-urlencoded",
  968. "token": this.token,
  969. },
  970. method: "POST",
  971. data: {
  972. relationType: 2, // 类型 1 成就 2 卡片
  973. relationId: this.ecId
  974. },
  975. success: (res) => {
  976. // console.log("getUnReadMessageQuery", res);
  977. if (checkResCode(res)) {
  978. const unReadMessageRs = res.data.data;
  979. this.popupMessageList.length = 0;
  980. this.mqIdListStr = "";
  981. for (var i = 0; i < unReadMessageRs.length; i++) {
  982. let popupData = {
  983. type: 6, // 6: 通知
  984. data: {}
  985. };
  986. this.messageKey += "-" + unReadMessageRs[i].mqId;
  987. popupData.data.mqType = unReadMessageRs[i].mqType;
  988. popupData.data.title = unReadMessageRs[i].mqTitle;
  989. popupData.data.message = unReadMessageRs[i].mqMessage;
  990. this.popupMessageList.push(popupData);
  991. // this.mqIdListStr += this.unReadMessageRs[i].mqId;
  992. // if (i < this.unReadMessageRs.length - 1) {
  993. // this.mqIdListStr += ",";
  994. // }
  995. }
  996. // this.popupMessageList.push(
  997. // {
  998. // type: 6, // 6: 通知
  999. // data: {
  1000. // mqType: 3,
  1001. // title: "特别提醒",
  1002. // message: `本次比赛的目的为体验校园文化,提升身体素质,让大家感受和熟悉定向运动魅力及技巧。<br>
  1003. // 在此特别提醒:<br>
  1004. // 无论是驰骋校园,还是漫步秋色,<b>“勿以轮带步,唯愿步量途”。让我们用脚步来丈量这片共同热爱的家园</b>,见证山大123周年的辉煌时刻!<br>
  1005. // <div style='text-align: right;'>山东大学体育委员会</div>`
  1006. // }
  1007. // }
  1008. // );
  1009. // console.log("popupMessageList", this.popupMessageList);
  1010. if (this.popupMessageList.length > 0) {
  1011. const messageValue = uni.getStorageSync(this.messageKey);
  1012. // console.log("messageValue:", messageValue);
  1013. if (!messageValue) {
  1014. this.$refs.mypopupMessage.popupOpen();
  1015. // uni.setStorageSync(this.messageKey, true);
  1016. }
  1017. }
  1018. }
  1019. },
  1020. fail: (err) => {
  1021. console.log("getUnReadMessageQuery err", err);
  1022. },
  1023. });
  1024. },
  1025. // 警告列表查询
  1026. warnMessageQuery() {
  1027. uni.request({
  1028. url: apiWarnMessageQuery,
  1029. header: {
  1030. "Content-Type": "application/x-www-form-urlencoded",
  1031. "token": this.token,
  1032. },
  1033. method: "POST",
  1034. data: {
  1035. ecId: this.ecId
  1036. },
  1037. success: (res) => {
  1038. // console.log("warnMessageQuery", res);
  1039. if (checkResCode(res)) {
  1040. const warnRs = res.data.data;
  1041. this.popupWarnList.length = 0;
  1042. for (var i = 0; i < warnRs.length; i++) {
  1043. let popupData = {
  1044. type: 9, // 9: 警告
  1045. data: {}
  1046. };
  1047. popupData.data.warnType = warnRs[i].warnType;
  1048. popupData.data.title = warnRs[i].warnTitle;
  1049. popupData.data.iconUrl = warnRs[i].iconUrl;
  1050. popupData.data.iconNum = warnRs[i].iconNum;
  1051. popupData.data.message = warnRs[i].warnMessage;
  1052. popupData.data.qrCodeUrl = warnRs[i].qrCodeUrl;
  1053. this.popupWarnList.push(popupData);
  1054. }
  1055. /* this.popupWarnList.push(
  1056. {
  1057. type: 9, // 9: 警告
  1058. data: {
  1059. warnType: 1,
  1060. title: "黄牌",
  1061. iconUrl: "/static/common/card_yellows.png",
  1062. iconNum: 1,
  1063. message: `亲爱的参赛者:
  1064.   收到此黄牌,说明您的比赛数据被系统判定为存在异常,此次比赛(活动)为徒步定向校园文化主题活动,请自觉遵守规则,如果您收到的黄牌数量过多<span style='color: red'>(超过2张)</span>,您的成绩将影响到您的院系/单位成绩,同时您的个人成绩也有可能根据规则被取消。如果您坚持您的比赛数据没有问题,请联系我们的客服人员,谢谢!
  1065.   让我们一起创造文明、和谐的校园生活,感谢您的支持!`,
  1066. qrCodeUrl: "https://orienteering.beswell.com/shanda/%E8%AD%A6%E5%91%8A%E4%BA%8C%E7%BB%B4%E7%A0%81%402x.png"
  1067. }
  1068. }
  1069. ); */
  1070. // console.log("popupMessageList", this.popupMessageList);
  1071. if (this.popupWarnList.length > 0) {
  1072. this.$refs.mypopupWarn.popupOpen();
  1073. }
  1074. }
  1075. },
  1076. fail: (err) => {
  1077. console.log("warnMessageQuery err", err)
  1078. },
  1079. });
  1080. },
  1081. onNoMoreRemindersClick() {
  1082. this.$refs.mypopupMessage.popupClose();
  1083. uni.setStorageSync(this.messageKey, true);
  1084. },
  1085. // 标记消息已读
  1086. readMessage() {
  1087. uni.request({
  1088. url: apiReadMessage,
  1089. header: {
  1090. "Content-Type": "application/x-www-form-urlencoded",
  1091. "token": this.token,
  1092. },
  1093. method: "POST",
  1094. data: {
  1095. "mqIdListStr": this.mqIdListStr
  1096. },
  1097. success: (res) => {
  1098. // console.log("readMessage", res);
  1099. },
  1100. fail: (err) => {
  1101. console.log("readMessage err", err);
  1102. },
  1103. });
  1104. },
  1105. btnBack() {
  1106. // window.history.back();
  1107. /* uni.navigateTo({
  1108. url: "/pages/bm/style4/rankOverview?" + this.queryString
  1109. }); */
  1110. const url = `action://to_home/`;
  1111. tools.appAction(url);
  1112. },
  1113. btnStartGame() {
  1114. // uni.navigateTo({
  1115. // url: "/pages/bm/style4/rankOverview?" + this.queryString
  1116. // });
  1117. if (this.isJoin) { // 已报名
  1118. const url = "/pages/bm/style4/rankOverview?" + this.queryString;
  1119. tools.appAction(url, "uni.navigateTo");
  1120. } else { // 未报名
  1121. const url = "/pages/bm/style4/signup?" + this.queryString;
  1122. tools.appAction(url, "uni.navigateTo");
  1123. }
  1124. },
  1125. btnInfo() {
  1126. // console.log(this.$refs.mypopup);
  1127. this.$refs.mypopup.popupOpen();
  1128. },
  1129. btnMessage() {
  1130. // console.log(this.$refs.mypopup);
  1131. this.$refs.mypopupMessage.popupOpen();
  1132. },
  1133. btnMyEgg() {
  1134. // uni.navigateTo({
  1135. // url: "/pages/achievement/index2?tabCurrent=2&" + this.queryString
  1136. // });
  1137. const url = "/pages/achievement/index2?tabCurrent=2&" + this.queryString;
  1138. tools.appAction(url, "uni.navigateTo");
  1139. },
  1140. btnExchg() {
  1141. this.$refs.mypopupExchg.popupOpen();
  1142. },
  1143. onTab1Click(val) {
  1144. console.log("onTab1Click: ", val);
  1145. this.tab1Current = val;
  1146. this.initTab();
  1147. },
  1148. onTab2Click(val) {
  1149. // console.log("onTab2Click: ", val);
  1150. this.tab2Current = val;
  1151. },
  1152. onSelectChange(val) {
  1153. // console.log("onSelectChange: ", val);
  1154. this.ocaId = val.value;
  1155. this.getCardRankDetailQuery();
  1156. uni.setStorageSync(this.mapKey, this.ocaId);
  1157. },
  1158. }
  1159. }
  1160. </script>
  1161. <style scoped>
  1162. .content {
  1163. width: 100vw;
  1164. height: 100vh;
  1165. }
  1166. .top-default {
  1167. width: 100%;
  1168. height: 170px;
  1169. padding-top: 36px;
  1170. justify-content: space-between;
  1171. background-image: url('static/backgroud/top_bg_sddx.png');
  1172. background-repeat: no-repeat;
  1173. background-position: center;
  1174. background-size: cover;
  1175. }
  1176. .topcontent {
  1177. width: 90%;
  1178. /* height: 90%; */
  1179. /* margin-bottom: 20px; */
  1180. }
  1181. .logo {
  1182. width: 80px;
  1183. height: 80px;
  1184. margin-top: 10px;
  1185. margin-bottom: 10px;
  1186. /* background-image: url('/static/logo/sddx.png'); */
  1187. background-repeat: no-repeat;
  1188. background-position-x: center;
  1189. background-position-y: center;
  1190. background-size: contain;
  1191. }
  1192. .tcview {
  1193. width: 90%;
  1194. /* height: 100px; */
  1195. }
  1196. .tcbox {
  1197. width: 121px;
  1198. height: 63px;
  1199. opacity: 1;
  1200. border-radius: 6px;
  1201. background: #9A300E;
  1202. border: 1px solid #D3A254;
  1203. }
  1204. .tcbox-label {
  1205. font-size: 12px;
  1206. font-weight: 500;
  1207. line-height: 23px;
  1208. color: #f3d809;
  1209. }
  1210. .tcbox-value {
  1211. font-size: 16px;
  1212. font-weight: 500;
  1213. line-height: 26px;
  1214. color: #f3d809;
  1215. }
  1216. .today {
  1217. margin-top: 8px;
  1218. color: #751f00;
  1219. font-size: 16px;
  1220. /* font-family: "黑体", sans-serif; */
  1221. font-weight: 3700;
  1222. position: relative;
  1223. z-index: 0;
  1224. }
  1225. .today::after {
  1226. content: attr(data-content);
  1227. -webkit-text-stroke: 3px #DCA452;
  1228. /* font-family: "黑体", sans-serif; */
  1229. position: absolute;
  1230. left: 0;
  1231. top: 0;
  1232. z-index: -1;
  1233. }
  1234. .tcbar {
  1235. display: none;
  1236. width: 92%;
  1237. padding: 6px 12px;
  1238. background: #9a300e;
  1239. border-radius: 6px;
  1240. }
  1241. .tcbar-text {
  1242. font-family: Source Han Sans CN;
  1243. font-weight: 500;
  1244. color: #f3d809;
  1245. font-size: 13px;
  1246. }
  1247. .mcName {
  1248. font-size: 40rpx;
  1249. font-weight: 550;
  1250. }
  1251. .topbtm {
  1252. width: 100%;
  1253. margin-bottom: 5px;
  1254. justify-content: space-around;
  1255. }
  1256. .topbtm-name {
  1257. padding: 3px 12px;
  1258. background-color: #9A300E;
  1259. border: 1px solid #D3A254;
  1260. border-radius: 6px;
  1261. text-align: center;
  1262. font-weight: 500;
  1263. color: #ffffff;
  1264. font-size: 14px;
  1265. }
  1266. .topbtm-egg {
  1267. width: 60px;
  1268. padding: 3px 12px;
  1269. background-color: #9A300E;
  1270. border: 1px solid #D3A254;
  1271. border-radius: 6px;
  1272. text-align: center;
  1273. color: #ffffff;
  1274. font-size: 14px;
  1275. }
  1276. .topbtm-null {
  1277. width: 60px;
  1278. padding: 3px 12px;
  1279. }
  1280. .cal {
  1281. width: 46rpx;
  1282. height: 46rpx;
  1283. margin-right: 20rpx;
  1284. }
  1285. .main {
  1286. width: 100%;
  1287. /* height: 70vh; */
  1288. flex-grow: 1;
  1289. justify-content: space-around;
  1290. /* justify-content: space-between; */
  1291. }
  1292. .main-bar {
  1293. display: none;
  1294. width: 100%;
  1295. height: 21px;
  1296. background-color: #d8e8c6;
  1297. font-size: 10px;
  1298. font-weight: 500;
  1299. color: #3d6706;
  1300. }
  1301. /* /deep/ .tab-active {
  1302. background-color: #a43a07 !important;
  1303. } */
  1304. .main-tab {
  1305. width: 90%;
  1306. margin-top: 20rpx;
  1307. }
  1308. .tab-view {
  1309. width: 100%;
  1310. /* height: 69vh; */
  1311. flex-grow: 1;
  1312. }
  1313. .btnBack {
  1314. width: 70%;
  1315. height: 80rpx;
  1316. margin-bottom: 20rpx;
  1317. /* font-weight: bold; */
  1318. color: white;
  1319. font-size: 32rpx;
  1320. line-height: 80rpx;
  1321. border-radius: 27px;
  1322. background-color: #2e85ec;
  1323. }
  1324. /* .swiper-item-button {
  1325. background-color: #ff870e !important;
  1326. }
  1327. .uni-swiper-dot-active {
  1328. background: #ff870e !important;
  1329. } */
  1330. </style>