rankList.vue 41 KB

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