rankList.vue 43 KB

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