rankList.vue 43 KB

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