rankList.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407
  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": "电话:<a href='tel:18765812082' style='color: #333333;'>18765812082</a>",
  571. "longitude": 117.075174,
  572. "latitude": 36.654108
  573. }
  574. ]
  575. }
  576. },
  577. {
  578. "type": 7,
  579. "data": {
  580. "title": "合作机构",
  581. "logo": {
  582. "src": "/static/logo/wensiyu.png",
  583. "width": "120px",
  584. "height": "120px",
  585. "memo": "文思语少年读书会"
  586. },
  587. "content": "文思语少年读书会,专注于为4-15岁儿童和家庭提供阅读素养发展解决方案和产品。读书会以整本书精读伴读为核心,塑造良好的读书习惯,训练阅读理解能力,培养创意作文能力。<br><br><span style='color:#FF870E;'>礼品:《山海经》精装套系书<br>书籍原价158元,仅需19.9元/套,不限领取次数,多余权限可赠送他人使用!</span>",
  588. "pointList": [
  589. {
  590. "name": "电话:<a href='tel:17663733631' style='color: #333333;'>17663733631</a>",
  591. "longitude": 117.075174,
  592. "latitude": 36.654108
  593. }
  594. ]
  595. }
  596. },
  597. {
  598. "type": 7,
  599. "data": {
  600. "title": "合作机构",
  601. "logo": {
  602. "src": "/static/logo/lezhigu.png",
  603. "width": "120px",
  604. "height": "120px",
  605. "memo": "乐知谷"
  606. },
  607. "content": "乐知谷是济南科学类口碑最好的机构,主做面向4-12岁儿童,内容涵盖工程科技、自然科学、生命科学、地球太空、PBL综合项目等五大板块,室内&户外相结合,真正将实验、动手、探究融于生活,培养独立思考、永存好奇、敢于创造的未来型孩子。<br><span style='color:#FF870E;'>礼品:乐知谷经典工程体验课《建造一座斜拉桥》一堂,感受力学结构的科技含量课程每人限参与1次,多余权限可赠送他人使用</span>",
  608. "pointList": [
  609. {
  610. "name": "电话:<a href='tel:19100652564' style='color: #333333;'>19100652564</a>",
  611. "longitude": 117.075174,
  612. "latitude": 36.654108
  613. }
  614. ]
  615. }
  616. },
  617. {
  618. "type": 7,
  619. "data": {
  620. "title": "合作机构",
  621. "logo": {
  622. "src": "/static/logo/kusentiyu.png",
  623. "width": "120px",
  624. "height": "120px",
  625. "memo": "酷森体育俱乐部"
  626. },
  627. "content": "酷森体育俱乐部包含少儿篮球、体能训练、跳绳,三大课程。拥有二十年以上资深学院派专家教练团队,制定系统的少儿运动训练体系,结合不同年龄及能力的孩子进行定制化教学,使其更符合不同孩子的综合能力提升。<br><br><span style='color:#FF870E;'>礼品:手机全年影视会员卡</span>",
  628. "pointList": [
  629. {
  630. "name": "电话:<a href='tel:15621875115' style='color: #333333;'>15621875115</a>",
  631. "longitude": 117.075174,
  632. "latitude": 36.654108
  633. }
  634. ]
  635. }
  636. }
  637. ],
  638. "popupExchgConfig": {
  639. "height": "460px"
  640. },
  641. "popupExchgList": [
  642. {
  643. "type": 5,
  644. "data": {
  645. "title": "兑换地点1",
  646. "img": "/static/common/gtgwcs.png",
  647. "point": {
  648. "longitude": 117.022194,
  649. "latitude": 36.661612,
  650. "name": "冠同购物超市"
  651. }
  652. }
  653. },
  654. {
  655. "type": 5,
  656. "data": {
  657. "title": "兑换地点2",
  658. "img": "/static/common/wslgwcs2.png",
  659. "point": {
  660. "longitude": 117.022194,
  661. "latitude": 36.661612,
  662. "name": "万盛隆购物超市"
  663. }
  664. }
  665. }
  666. ],
  667. "popupMessageConfig": {
  668. "height": "500px"
  669. },
  670. "param": {
  671. "labelRightAnswerNum": "文化输出",
  672. "labelTicketName": "蛋叔券",
  673. "labelAwardAddress": "兑换地址",
  674. "tab1InitActIndex": 0,
  675. "tab2InitActIndex": 0
  676. },
  677. "rankParam": {
  678. "tab2ItemsMark": [],
  679. "dispArrStr": "teamDistance,teamPoint,teamCp,teamPace,regionDistance,regionPoint,regionCp,regionPace",
  680. "tab2Items_team": ["里程", "打点数", "百味豆", "配速"],
  681. "tab2Items_person": ["里程", "打点数", "百味豆", "配速"],
  682. "rankTypeList_team": ["totalDistance", "totalCp", "totalSysPoint", "fastPace"],
  683. "rankTypeList_person": ["totalDistance", "totalCp", "totalSysPoint", "fastPace"],
  684. "rank1List": ["teamDistanceRs", "teamPointRs", "teamCpRs", "teamPaceRs"],
  685. "rank2List": ["regionDistanceRs", "regionPointRs", "regionCpRs", "regionPaceRs"]
  686. }
  687. }; */
  688. this.loadConfig(config);
  689. this.getUnReadMessageQuery();
  690. this.warnMessageQuery();
  691. this.matchRsDetailQuery();
  692. setTimeout(this.dealFirstEnter, 500);
  693. },
  694. fail: (err) => {
  695. console.log("getCardConfigQuery err", err)
  696. },
  697. });
  698. },
  699. // 卡片对应活动或赛事详情查询
  700. // getCardDetailQuery() {
  701. // uni.request({
  702. // url: apiCardDetailQuery,
  703. // header: {
  704. // "Content-Type": "application/x-www-form-urlencoded",
  705. // "token": this.token,
  706. // },
  707. // method: "POST",
  708. // data: {
  709. // ecId: this.ecId
  710. // },
  711. // success: (res) => {
  712. // // console.log("getCardDetailQuery", res)
  713. // const data = res.data.data;
  714. // this.mcType = data.mcType;
  715. // this.mcId = data.mcId;
  716. // this.mcName = data.mcName;
  717. // this.beginSecond = data.beginSecond;
  718. // this.endSecond = data.endSecond;
  719. // this.coiName = data.coiName;
  720. // this.teamNum = data.teamNum;
  721. // this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  722. // this.getCountdown();
  723. // this.getActtime();
  724. // this.getCardRankDetailQuery();
  725. // this.clear();
  726. // this.interval = setInterval(this.getCountdown, 60000);
  727. // },
  728. // fail: (err) => {
  729. // console.log("getCardDetailQuery err", err)
  730. // },
  731. // });
  732. // },
  733. // 卡片对应线上赛多个活动查询
  734. matchRsDetailQuery() {
  735. uni.request({
  736. url: apiMatchRsDetailQuery,
  737. header: {
  738. "Content-Type": "application/x-www-form-urlencoded",
  739. "token": this.token,
  740. },
  741. method: "POST",
  742. data: {
  743. ecId: this.ecId
  744. },
  745. success: (res) => {
  746. // console.log("matchRsDetailQuery", res);
  747. if (checkResCode(res)) {
  748. const data = res.data.data;
  749. this.mcType = data.mcType;
  750. this.mcId = data.mcId;
  751. this.mcName = data.mcName;
  752. this.beginSecond = data.beginSecond;
  753. this.endSecond = data.endSecond;
  754. this.nickName = data.nickName;
  755. // this.totalNum = data.totalNum;
  756. // this.totalDistanct = data.totalDistanct;
  757. // this.totalDistanctRankNum = data.totalDistanctRankNum;
  758. // this.totalCp = data.totalCp;
  759. // this.totalCpRankNum = data.totalCpRankNum;
  760. // this.totalSysPoint = data.totalSysPoint;
  761. // this.totalSysPointRankNum = data.totalSysPointRankNum;
  762. // this.fastPace = data.fastPace;
  763. // this.fastPaceRankNum = data.fastPaceRankNum;
  764. // this.ocaRs = data.ocaRs;
  765. this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
  766. this.getCountdown();
  767. this.getActtime();
  768. this.mapListQuery();
  769. this.compStatisticQuery();
  770. // this.getCardRankDetailQuery();
  771. this.clear();
  772. this.interval = setInterval(this.getCountdown, 60000);
  773. }
  774. },
  775. fail: (err) => {
  776. console.log("matchRsDetailQuery err", err)
  777. },
  778. });
  779. },
  780. // 卡片对应地图列表详情查询
  781. mapListQuery() {
  782. uni.request({
  783. url: apiMapListQuery,
  784. header: {
  785. "Content-Type": "application/x-www-form-urlencoded",
  786. "token": this.token,
  787. },
  788. method: "POST",
  789. data: {
  790. mcId: this.mcId
  791. },
  792. success: (res) => {
  793. // console.log("mapListQuery", res);
  794. if (res.data.code == 0) {
  795. const data = res.data.data;
  796. this.mapList = data;
  797. let mapItems = {
  798. // selectValue: this.selectedMapId,
  799. selectValue: this.ocaId,
  800. data: []
  801. };
  802. for (var i = 0; i < data.length; i++) {
  803. if (mapItems.selectValue == 0 && i == 0) {
  804. mapItems.selectValue = data[i].ocaId;
  805. // this.selectedMapId = data[i].ocaId;
  806. this.ocaId = data[i].ocaId;
  807. }
  808. let map = {};
  809. map.text = "个人(" + data[i].mapName + ")";
  810. map.value = data[i].ocaId;
  811. mapItems.data.push(map);
  812. }
  813. this.tab1Items.push(mapItems);
  814. this.getCardRankDetailQuery();
  815. }
  816. },
  817. fail: (err) => {
  818. console.log("mapListQuery err", err);
  819. },
  820. });
  821. },
  822. // 赛事总成绩统计查询
  823. compStatisticQuery() {
  824. uni.request({
  825. url: apiCompStatisticQuery,
  826. header: {
  827. "Content-Type": "application/x-www-form-urlencoded",
  828. "token": this.token,
  829. },
  830. method: "POST",
  831. data: {
  832. mcId: this.mcId
  833. },
  834. success: (res) => {
  835. // console.log("compStatisticQuery", res);
  836. if (res.data.code == 0) {
  837. const data = res.data.data;
  838. this.all_totalDistance = data.totalDistance;
  839. this.all_totalRightAnswerNum = data.totalRightAnswerNum;
  840. this.all_totalAnswerNum = data.totalAnswerNum;
  841. this.all_totalCp = data.totalCp;
  842. this.all_totalSysPoint = data.totalSysPoint;
  843. }
  844. },
  845. fail: (err) => {
  846. console.log("compStatisticQuery err", err);
  847. },
  848. });
  849. },
  850. // 排名查询
  851. getCardRankDetailQuery() {
  852. uni.request({
  853. url: apiCardRankDetailQuery,
  854. header: {
  855. "Content-Type": "application/x-www-form-urlencoded",
  856. "token": this.token,
  857. },
  858. method: "POST",
  859. data: {
  860. mcIdListStr: this.mcId,
  861. mcType: this.mcType,
  862. ocaId: this.ocaId,
  863. dispArrStr: this.dispArrStr
  864. },
  865. success: (res) => {
  866. // console.log("getCardRankDetailQuery", res);
  867. const rankdata = res.data.data;
  868. // this.rankList.totalDistanceRs = rankdata.totalDistanceRs;
  869. // this.rankList.totalCpRs = rankdata.totalCpRs;
  870. // this.rankList.totalSysPointRs = rankdata.totalSysPointRs;
  871. // this.rankList.fastPaceRs = rankdata.fastPaceRs;
  872. this.rankList = rankdata;
  873. },
  874. fail: (err) => {
  875. console.log("getCardRankDetailQuery err", err);
  876. },
  877. });
  878. },
  879. // 卡片用户当前排名查询
  880. // getUserCurrentRankNumQuery() {
  881. // uni.request({
  882. // url: apiUserCurrentRankNumQuery,
  883. // header: {
  884. // "Content-Type": "application/x-www-form-urlencoded",
  885. // "token": this.token,
  886. // },
  887. // method: "POST",
  888. // data: {
  889. // ecId: this.ecId
  890. // },
  891. // success: (res) => {
  892. // // console.log("getUserCurrentRankNumQuery", res)
  893. // if (res.data.code == 0) {
  894. // const data = res.data.data;
  895. // const rankNum = data.rankNum;
  896. // this.dealNotice(rankNum);
  897. // }
  898. // },
  899. // fail: (err) => {
  900. // console.log("getUserCurrentRankNumQuery err", err)
  901. // },
  902. // });
  903. // },
  904. // 是否允许重新分组(报名)
  905. isAllowMcSignUp() {
  906. uni.request({
  907. url: apiIsAllowMcSignUp,
  908. header: {
  909. "Content-Type": "application/x-www-form-urlencoded",
  910. "token": this.token,
  911. },
  912. method: "POST",
  913. data: {
  914. ecId: this.ecId
  915. },
  916. success: (res) => {
  917. // console.log("isAllowMcSignUp", res)
  918. if (res.data.code == 0) {
  919. const data = res.data.data;
  920. this.allowMcSignUp = data.allowSignUp;
  921. }
  922. },
  923. fail: (err) => {
  924. console.log("isAllowMcSignUp err", err)
  925. },
  926. });
  927. },
  928. // 用户是否已经报名卡片对应赛事查询
  929. getUserJoinCardQuery() {
  930. uni.request({
  931. url: apiUserJoinCardQuery,
  932. header: {
  933. "Content-Type": "application/x-www-form-urlencoded",
  934. "token": this.token
  935. },
  936. method: "POST",
  937. data: {
  938. ecId: this.ecId
  939. },
  940. success: (res) => {
  941. // console.log("getUserJoinCardQuery", res)
  942. const code = res.data.code;
  943. const data = res.data.data;
  944. if (code == 0) {
  945. this.isJoin = data.isJoin;
  946. if (this.isJoin) { // 已报名
  947. this.btnStartGameText = "我要比赛";
  948. } else { // 未报名
  949. this.btnStartGameText = "我要报名";
  950. }
  951. }
  952. },
  953. fail: (err) => {
  954. console.log("getUserJoinCardQuery err", err)
  955. },
  956. });
  957. },
  958. // 未读消息列表查询
  959. getUnReadMessageQuery() {
  960. uni.request({
  961. url: apiUnReadMessageQuery,
  962. header: {
  963. "Content-Type": "application/x-www-form-urlencoded",
  964. "token": this.token,
  965. },
  966. method: "POST",
  967. data: {
  968. relationType: 2, // 类型 1 成就 2 卡片
  969. relationId: this.ecId
  970. },
  971. success: (res) => {
  972. // console.log("getUnReadMessageQuery", res);
  973. if (checkResCode(res)) {
  974. const unReadMessageRs = res.data.data;
  975. this.popupMessageList.length = 0;
  976. this.mqIdListStr = "";
  977. for (var i = 0; i < unReadMessageRs.length; i++) {
  978. let popupData = {
  979. type: 6, // 6: 通知
  980. data: {}
  981. };
  982. this.messageKey += "-" + unReadMessageRs[i].mqId;
  983. popupData.data.mqType = unReadMessageRs[i].mqType;
  984. popupData.data.title = unReadMessageRs[i].mqTitle;
  985. popupData.data.message = unReadMessageRs[i].mqMessage;
  986. this.popupMessageList.push(popupData);
  987. // this.mqIdListStr += this.unReadMessageRs[i].mqId;
  988. // if (i < this.unReadMessageRs.length - 1) {
  989. // this.mqIdListStr += ",";
  990. // }
  991. }
  992. // this.popupMessageList.push(
  993. // {
  994. // type: 6, // 6: 通知
  995. // data: {
  996. // mqType: 3,
  997. // title: "特别提醒",
  998. // message: `本次比赛的目的为体验校园文化,提升身体素质,让大家感受和熟悉定向运动魅力及技巧。<br>
  999. // 在此特别提醒:<br>
  1000. // 无论是驰骋校园,还是漫步秋色,<b>“勿以轮带步,唯愿步量途”。让我们用脚步来丈量这片共同热爱的家园</b>,见证山大123周年的辉煌时刻!<br>
  1001. // <div style='text-align: right;'>山东大学体育委员会</div>`
  1002. // }
  1003. // }
  1004. // );
  1005. // console.log("popupMessageList", this.popupMessageList);
  1006. if (this.popupMessageList.length > 0) {
  1007. const messageValue = uni.getStorageSync(this.messageKey);
  1008. // console.log("messageValue:", messageValue);
  1009. if (!messageValue) {
  1010. this.$refs.mypopupMessage.popupOpen();
  1011. // uni.setStorageSync(this.messageKey, true);
  1012. }
  1013. }
  1014. }
  1015. },
  1016. fail: (err) => {
  1017. console.log("getUnReadMessageQuery err", err);
  1018. },
  1019. });
  1020. },
  1021. // 警告列表查询
  1022. warnMessageQuery() {
  1023. uni.request({
  1024. url: apiWarnMessageQuery,
  1025. header: {
  1026. "Content-Type": "application/x-www-form-urlencoded",
  1027. "token": this.token,
  1028. },
  1029. method: "POST",
  1030. data: {
  1031. ecId: this.ecId
  1032. },
  1033. success: (res) => {
  1034. // console.log("warnMessageQuery", res);
  1035. if (checkResCode(res)) {
  1036. const warnRs = res.data.data;
  1037. this.popupWarnList.length = 0;
  1038. for (var i = 0; i < warnRs.length; i++) {
  1039. let popupData = {
  1040. type: 9, // 9: 警告
  1041. data: {}
  1042. };
  1043. popupData.data.warnType = warnRs[i].warnType;
  1044. popupData.data.title = warnRs[i].warnTitle;
  1045. popupData.data.iconUrl = warnRs[i].iconUrl;
  1046. popupData.data.iconNum = warnRs[i].iconNum;
  1047. popupData.data.message = warnRs[i].warnMessage;
  1048. popupData.data.qrCodeUrl = warnRs[i].qrCodeUrl;
  1049. this.popupWarnList.push(popupData);
  1050. }
  1051. /* this.popupWarnList.push(
  1052. {
  1053. type: 9, // 9: 警告
  1054. data: {
  1055. warnType: 1,
  1056. title: "黄牌",
  1057. iconUrl: "/static/common/card_yellows.png",
  1058. iconNum: 1,
  1059. message: `亲爱的参赛者:
  1060.   收到此黄牌,说明您的比赛数据被系统判定为存在异常,此次比赛(活动)为徒步定向校园文化主题活动,请自觉遵守规则,如果您收到的黄牌数量过多<span style='color: red'>(超过2张)</span>,您的成绩将影响到您的院系/单位成绩,同时您的个人成绩也有可能根据规则被取消。如果您坚持您的比赛数据没有问题,请联系我们的客服人员,谢谢!
  1061.   让我们一起创造文明、和谐的校园生活,感谢您的支持!`,
  1062. qrCodeUrl: "https://orienteering.beswell.com/shanda/%E8%AD%A6%E5%91%8A%E4%BA%8C%E7%BB%B4%E7%A0%81%402x.png"
  1063. }
  1064. }
  1065. ); */
  1066. // console.log("popupMessageList", this.popupMessageList);
  1067. if (this.popupWarnList.length > 0) {
  1068. this.$refs.mypopupWarn.popupOpen();
  1069. }
  1070. }
  1071. },
  1072. fail: (err) => {
  1073. console.log("warnMessageQuery err", err)
  1074. },
  1075. });
  1076. },
  1077. onNoMoreRemindersClick() {
  1078. this.$refs.mypopupMessage.popupClose();
  1079. uni.setStorageSync(this.messageKey, true);
  1080. },
  1081. // 标记消息已读
  1082. readMessage() {
  1083. uni.request({
  1084. url: apiReadMessage,
  1085. header: {
  1086. "Content-Type": "application/x-www-form-urlencoded",
  1087. "token": this.token,
  1088. },
  1089. method: "POST",
  1090. data: {
  1091. "mqIdListStr": this.mqIdListStr
  1092. },
  1093. success: (res) => {
  1094. // console.log("readMessage", res);
  1095. },
  1096. fail: (err) => {
  1097. console.log("readMessage err", err);
  1098. },
  1099. });
  1100. },
  1101. btnBack() {
  1102. // window.history.back();
  1103. /* uni.navigateTo({
  1104. url: "/pages/bm/style4/rankOverview?" + this.queryString
  1105. }); */
  1106. const url = `action://to_home/`;
  1107. tools.appAction(url);
  1108. },
  1109. btnStartGame() {
  1110. // uni.navigateTo({
  1111. // url: "/pages/bm/style4/rankOverview?" + this.queryString
  1112. // });
  1113. if (this.isJoin) { // 已报名
  1114. const url = "/pages/bm/style4/rankOverview?" + this.queryString;
  1115. tools.appAction(url, "uni.navigateTo");
  1116. } else { // 未报名
  1117. const url = "/pages/bm/style4/signup?" + this.queryString;
  1118. tools.appAction(url, "uni.navigateTo");
  1119. }
  1120. },
  1121. btnInfo() {
  1122. // console.log(this.$refs.mypopup);
  1123. this.$refs.mypopup.popupOpen();
  1124. },
  1125. btnMessage() {
  1126. // console.log(this.$refs.mypopup);
  1127. this.$refs.mypopupMessage.popupOpen();
  1128. },
  1129. btnMyEgg() {
  1130. // uni.navigateTo({
  1131. // url: "/pages/achievement/index2?tabCurrent=2&" + this.queryString
  1132. // });
  1133. const url = "/pages/achievement/index2?tabCurrent=2&" + this.queryString;
  1134. tools.appAction(url, "uni.navigateTo");
  1135. },
  1136. btnExchg() {
  1137. this.$refs.mypopupExchg.popupOpen();
  1138. },
  1139. onTab1Click(val) {
  1140. console.log("onTab1Click: ", val);
  1141. this.tab1Current = val;
  1142. this.initTab();
  1143. },
  1144. onTab2Click(val) {
  1145. // console.log("onTab2Click: ", val);
  1146. this.tab2Current = val;
  1147. },
  1148. onSelectChange(val) {
  1149. // console.log("onSelectChange: ", val);
  1150. this.ocaId = val.value;
  1151. this.getCardRankDetailQuery();
  1152. uni.setStorageSync(this.mapKey, this.ocaId);
  1153. },
  1154. }
  1155. }
  1156. </script>
  1157. <style scoped>
  1158. .content {
  1159. width: 100vw;
  1160. height: 100vh;
  1161. }
  1162. .top-default {
  1163. width: 100%;
  1164. height: 170px;
  1165. padding-top: 36px;
  1166. justify-content: space-between;
  1167. background-image: url('static/backgroud/top_bg_sddx.png');
  1168. background-repeat: no-repeat;
  1169. background-position: center;
  1170. background-size: cover;
  1171. }
  1172. .topcontent {
  1173. width: 90%;
  1174. /* height: 90%; */
  1175. /* margin-bottom: 20px; */
  1176. }
  1177. .logo {
  1178. width: 80px;
  1179. height: 80px;
  1180. margin-top: 10px;
  1181. margin-bottom: 10px;
  1182. /* background-image: url('/static/logo/sddx.png'); */
  1183. background-repeat: no-repeat;
  1184. background-position-x: center;
  1185. background-position-y: center;
  1186. background-size: contain;
  1187. }
  1188. .tcview {
  1189. width: 90%;
  1190. /* height: 100px; */
  1191. }
  1192. .tcbox {
  1193. width: 121px;
  1194. height: 63px;
  1195. opacity: 1;
  1196. border-radius: 6px;
  1197. background: #9A300E;
  1198. border: 1px solid #D3A254;
  1199. }
  1200. .tcbox-label {
  1201. font-size: 12px;
  1202. font-weight: 500;
  1203. line-height: 23px;
  1204. color: #f3d809;
  1205. }
  1206. .tcbox-value {
  1207. font-size: 16px;
  1208. font-weight: 500;
  1209. line-height: 26px;
  1210. color: #f3d809;
  1211. }
  1212. .today {
  1213. margin-top: 8px;
  1214. color: #751f00;
  1215. font-size: 16px;
  1216. /* font-family: "黑体", sans-serif; */
  1217. font-weight: 3700;
  1218. position: relative;
  1219. z-index: 0;
  1220. }
  1221. .today::after {
  1222. content: attr(data-content);
  1223. -webkit-text-stroke: 3px #DCA452;
  1224. /* font-family: "黑体", sans-serif; */
  1225. position: absolute;
  1226. left: 0;
  1227. top: 0;
  1228. z-index: -1;
  1229. }
  1230. .tcbar {
  1231. display: none;
  1232. width: 92%;
  1233. padding: 6px 12px;
  1234. background: #9a300e;
  1235. border-radius: 6px;
  1236. }
  1237. .tcbar-text {
  1238. font-family: Source Han Sans CN;
  1239. font-weight: 500;
  1240. color: #f3d809;
  1241. font-size: 13px;
  1242. }
  1243. .mcName {
  1244. font-size: 40rpx;
  1245. font-weight: 550;
  1246. }
  1247. .topbtm {
  1248. width: 100%;
  1249. margin-bottom: 5px;
  1250. justify-content: space-around;
  1251. }
  1252. .topbtm-name {
  1253. padding: 3px 12px;
  1254. background-color: #9A300E;
  1255. border: 1px solid #D3A254;
  1256. border-radius: 6px;
  1257. text-align: center;
  1258. font-weight: 500;
  1259. color: #ffffff;
  1260. font-size: 14px;
  1261. }
  1262. .topbtm-egg {
  1263. width: 60px;
  1264. padding: 3px 12px;
  1265. background-color: #9A300E;
  1266. border: 1px solid #D3A254;
  1267. border-radius: 6px;
  1268. text-align: center;
  1269. color: #ffffff;
  1270. font-size: 14px;
  1271. }
  1272. .topbtm-null {
  1273. width: 60px;
  1274. padding: 3px 12px;
  1275. }
  1276. .cal {
  1277. width: 46rpx;
  1278. height: 46rpx;
  1279. margin-right: 20rpx;
  1280. }
  1281. .main {
  1282. width: 100%;
  1283. /* height: 70vh; */
  1284. flex-grow: 1;
  1285. justify-content: space-around;
  1286. /* justify-content: space-between; */
  1287. }
  1288. .main-bar {
  1289. display: none;
  1290. width: 100%;
  1291. height: 21px;
  1292. background-color: #d8e8c6;
  1293. font-size: 10px;
  1294. font-weight: 500;
  1295. color: #3d6706;
  1296. }
  1297. /* /deep/ .tab-active {
  1298. background-color: #a43a07 !important;
  1299. } */
  1300. .main-tab {
  1301. width: 90%;
  1302. margin-top: 20rpx;
  1303. }
  1304. .tab-view {
  1305. width: 100%;
  1306. /* height: 69vh; */
  1307. flex-grow: 1;
  1308. }
  1309. .btnBack {
  1310. width: 70%;
  1311. height: 80rpx;
  1312. margin-bottom: 20rpx;
  1313. /* font-weight: bold; */
  1314. color: white;
  1315. font-size: 32rpx;
  1316. line-height: 80rpx;
  1317. border-radius: 27px;
  1318. background-color: #2e85ec;
  1319. }
  1320. /* .swiper-item-button {
  1321. background-color: #ff870e !important;
  1322. }
  1323. .uni-swiper-dot-active {
  1324. background: #ff870e !important;
  1325. } */
  1326. </style>