entertainment.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  1. <template>
  2. <view class="all">
  3. <view class="padding-t-30"></view>
  4. <view class="tab">
  5. <view class="flex-start">
  6. <view class="tab-item " @click="changeTab(item,ind)" :class="{action:actionIndex==ind}"
  7. v-for="(item,ind) in gameList">
  8. {{item.name}}
  9. </view>
  10. </view>
  11. <l-echart class="top" ref="chart"></l-echart>
  12. </view>
  13. <view class="center flex">
  14. <!-- 左 -->
  15. <view class="le">
  16. <view class="tit flex-start">
  17. <view class="ti1">{{$t('enter.u1')}}</view>
  18. <view class="ti2">({{$t('enter.u2')}} {{history.base.max_bet*1}}U)</view>
  19. </view>
  20. <view class="he">
  21. <view class="numbox flex-start">
  22. <view class="he1 flex" @click="upOnBtnData.value=it" v-for="it in arMoneyList">
  23. <view class="wen">{{it}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="yi flex-start">
  28. <!-- <image class="img" src="../../static/icon/le.png" mode=""></image> -->
  29. <view class="wz padding-l-10">{{history.base.token}}</view>
  30. <view class="qx padding-l-10" v-if="history.next.id">{{history.next.no}}</view>
  31. </view>
  32. <view class="shu">
  33. {{KlineList.c*1}}
  34. </view>
  35. </view>
  36. <!--右 -->
  37. <view class="ri">
  38. <view class="ti flex-center">
  39. <view class="t1">{{$t('enter.u3')}}</view>
  40. <view class="t2 padding-l-10">{{history.base.timebar}}</view>
  41. </view>
  42. <view class="dh">
  43. <input class="input" :placeholder="'USDT'+$t('enter.a9')" type="number" v-model="upOnBtnData.value">
  44. </view>
  45. <view class="btn">
  46. <view class="bt flex">
  47. <view class="btnItem btnle" @click="onPayBet(2)">
  48. <image class="imag" src="../../static/icon/xia.png" mode=""></image>
  49. <text class="xia">{{$t('enter.u4')}}</text>
  50. </view>
  51. <view class="btnItem btnri" @click="onPayBet(1)">
  52. <image class="imag" src="../../static/icon/shang.png" mode=""></image>
  53. <text class="xia">{{$t('enter.u6')}}</text>
  54. </view>
  55. </view>
  56. <view class="bt flex">
  57. <view class="btnItem btnle" @click="onPayBet(3)">
  58. <view class="xia">{{$t('enter.u5')}}</view>
  59. </view>
  60. <view class="btnItem btnri" @click="onPayBet(4)">
  61. <view class="xia">{{$t('enter.u7')}}</view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="db flex">
  66. <view class="jl">{{$t('enter.u8')}}</view>
  67. <view class="sj">
  68. <text v-if="time.H<10">0</text>
  69. {{time.H}}
  70. </view>
  71. <view class="sj">
  72. <text v-if="time.M<10">0</text>
  73. {{time.M}}
  74. </view>
  75. <view class="sj">
  76. <text v-if="time.S<10">0</text>
  77. {{time.S}}
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="kb"></view>
  83. <view class="last">
  84. <view class="flex">
  85. <text>{{$t('enter.u9')}}</text>
  86. <view class="flex" @click="nav(`/pages/game/history?id=${history.base.id}`)">
  87. <text>{{$t('enter.u10')}}</text>
  88. <image class="lb" src="../../static/icon/jt.png" mode="scaleToFill"></image>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="bg">
  93. <view class="biaotou flex">
  94. <view class="biwe">{{$t('enter.u11')}}</view>
  95. <view class="biwe">{{$t('enter.u12')}}</view>
  96. <view class="biwe">{{$t('enter.u13')}}</view>
  97. <view class="biwe">{{$t('enter.u14')}}</view>
  98. </view>
  99. <view class="list flex" v-for="(item,ind) in betList.list" :key="ind">
  100. <view class="biwe flex-start">
  101. <view class="tr">{{history.base.token}}</view>
  102. <view class="nametip">{{history.base.timebar}}</view>
  103. <image v-if="item.bet==1" class="zz" src="../../static/icon/shang.png" mode="scaleToFill"></image>
  104. <image v-if="item.bet==2" class="zz" src="../../static/icon/xia.png" mode="scaleToFill"></image>
  105. <view v-if="item.bet==3" class="nametip red">{{$t('enter.u5')}}</view>
  106. <view v-if="item.bet==4" class="nametip green">{{$t('enter.u7')}}</view>
  107. </view>
  108. <view class="biwe">{{item.num*1}}</view>
  109. <view class="biwe">{{item.get-item.num}}</view>
  110. <view class="biwe flex-center">
  111. <view v-if="item.status==0" class="list-buttom primary margin-r-10">
  112. {{$t('enter.a4')}}
  113. </view>
  114. <view class="list-buttom red" v-if="item.result==1">
  115. {{$t('enter.a5')}}
  116. </view>
  117. <view class="list-buttom success" v-if="item.result===0">
  118. {{$t('enter.a6')}}
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="chz flex" @click="nav('/pages/user/money/recharge')">
  124. <view>
  125. <view class="yue padding-b-10">{{$t('enter.u15')}}</view>
  126. <view class="yes">{{userWallet}}U</view>
  127. </view>
  128. <view class="flex-start">
  129. <view class="quc">{{$t('enter.u16')}}</view>
  130. <image class="choz" src="../../static/icon/jt.png" mode="scaleToFill"></image>
  131. </view>
  132. </view>
  133. <uni-popup type="bottom" ref="popup" :mask-click="false" @maskClick='colsePayPassword'>
  134. <inputPassword @commit='KeyInfo'></inputPassword>
  135. </uni-popup>
  136. <uni-popup type="center" ref="popupDetail">
  137. <view class="alert-detail">
  138. <view class="padding-c-30 padding-t-30 padding-b-30">
  139. <view class="flex">
  140. <view class="type">
  141. {{$t('gameList.a5')}}
  142. </view>
  143. <view class="num" v-if="alertDetail.ts">
  144. {{getTime(alertDetail.ts)}}
  145. </view>
  146. </view>
  147. <view class="flex">
  148. <view class="type">
  149. open
  150. </view>
  151. <view class="num">
  152. {{alertDetail.o*1}}
  153. </view>
  154. </view>
  155. <view class="flex">
  156. <view class="type">
  157. close
  158. </view>
  159. <view class="num">
  160. {{alertDetail.c*1}}
  161. </view>
  162. </view>
  163. <view class="flex">
  164. <view class="type">
  165. lowest
  166. </view>
  167. <view class="num">
  168. {{alertDetail.l*1}}
  169. </view>
  170. </view>
  171. <view class="flex">
  172. <view class="type">
  173. highest
  174. </view>
  175. <view class="num">
  176. {{alertDetail.h*1}}
  177. </view>
  178. </view>
  179. </view>
  180. <button class="button" type="default" @click="$refs.popupDetail.close()"><text
  181. class="button-text">{{$t("safe.d7")}}</text></button>
  182. </view>
  183. </uni-popup>
  184. <taber tab='entertainment' v-if="!upOnBtnData.show"></taber>
  185. </view>
  186. </view>
  187. </template>
  188. <script>
  189. import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
  190. import {
  191. getGame,
  192. gameKline,
  193. getGameList,
  194. gameWallet,
  195. gameBetList,
  196. gameBetIn
  197. } from "@/api/game.js";
  198. import {
  199. mapState,
  200. mapMutations
  201. } from 'vuex';
  202. import {
  203. saveUrl,
  204. interceptor
  205. } from '@/utils/loginUtils.js';
  206. import taber from "@/components/footer/footer.vue";
  207. import {
  208. getTime
  209. } from '@/utils/rocessor.js';
  210. import inputPassword from "@/components/input-password/input-password.vue";
  211. export default {
  212. components: {
  213. taber,
  214. inputPassword
  215. },
  216. computed: {
  217. ...mapState("user", ["hasLogin"]),
  218. },
  219. data() {
  220. return {
  221. arMoneyList: [
  222. 1, 5, 10, 20, 50, 100
  223. ],
  224. actionIndex: 0,
  225. // 当前游戏列表
  226. gameList: [],
  227. // 游戏信息
  228. history: {
  229. list: [], //游戏进行记录
  230. page: 1,
  231. limit: 10,
  232. // 基础数据
  233. base: {},
  234. next: "",
  235. now: {}
  236. },
  237. time: {
  238. H: 0,
  239. M: 0,
  240. S: 0,
  241. // 保存倒计时对象
  242. t: ''
  243. },
  244. // 游戏押注记录
  245. betList: {
  246. list: [], //游戏进行记录
  247. page: 1,
  248. limit: 10,
  249. },
  250. userWallet: 0,
  251. // 当前最新K线数据
  252. KlineList: {
  253. c: ''
  254. },
  255. upOnBtnData: {
  256. // 是否显示底部导航栏
  257. show: false,
  258. type: '',
  259. // 当前输入的密码
  260. passwordArr: '',
  261. value: '',
  262. },
  263. // 弹窗数据像晴
  264. alertDetail: {
  265. },
  266. // 保存获取下次游戏对象
  267. getNextTimeObj: ''
  268. };
  269. },
  270. onLoad() {},
  271. onShow() {
  272. if (!this.hasLogin) {
  273. uni.showModal({
  274. title: this.$t('enter.c4'),
  275. content: this.$t('enter.b5'),
  276. success: (e) => {
  277. // 判断是否点击确认按钮
  278. if (e.confirm) {
  279. // 保存当前页面地址
  280. saveUrl()
  281. // 跳转页面
  282. interceptor()
  283. }
  284. }
  285. })
  286. return
  287. }
  288. this.getUserWallet();
  289. this.gameInit();
  290. },
  291. // 关闭循环
  292. onHide() {
  293. // 倒计时清理
  294. this.initData();
  295. },
  296. methods: {
  297. getTime,
  298. // 弹窗详情
  299. alertDetailOpen(item) {
  300. console.log(item);
  301. this.alertDetail = item.room.result_info;
  302. this.$refs.popupDetail.open();
  303. },
  304. // 倒计时清理
  305. initData() {
  306. const that = this
  307. // 关闭倒计时
  308. clearInterval(that.getNextTimeObj);
  309. clearInterval(that.time.t);
  310. // 清空倒计时对象
  311. that.getNextTimeObj = '';
  312. this.time = {
  313. H: 0,
  314. M: 0,
  315. S: 0,
  316. t: ''
  317. };
  318. },
  319. // 点击触发支付事件
  320. onPayBet(type) {
  321. if (!this.upOnBtnData.value) {
  322. uni.showToast({
  323. title: this.$t('enter.a9'),
  324. icon: "error"
  325. })
  326. return
  327. }
  328. if (!this.history.next) {
  329. uni.showModal({
  330. title: this.$t('enter.c4'),
  331. content: this.$t('enter.a3'),
  332. showCancel: false,
  333. });
  334. return
  335. }
  336. this.upOnBtnData.type = type;
  337. this.openPayPassword();
  338. },
  339. // 打开支付弹窗
  340. openPayPassword() {
  341. this.upOnBtnData.show = true;
  342. this.$refs.popup.open();
  343. },
  344. // 关闭支付弹窗
  345. colsePayPassword() {
  346. this.upOnBtnData.show = false;
  347. this.$refs.popup.close();
  348. },
  349. // 密码输入完成后调用下注
  350. KeyInfo(val) {
  351. this.upOnBtnData.passwordArr = val;
  352. this.colsePayPassword();
  353. this.gameBetIn();
  354. },
  355. // 参与压住
  356. gameBetIn(type) {
  357. const that = this;
  358. const upData = {
  359. id: that.history.next.id,
  360. bet: that.upOnBtnData.type,
  361. num: that.upOnBtnData.value,
  362. trade_password: that.upOnBtnData.passwordArr
  363. };
  364. uni.showLoading({
  365. mask: true
  366. })
  367. that.upOnBtnData.value = '';
  368. gameBetIn(upData).then((res) => {
  369. uni.hideLoading()
  370. uni.showToast({
  371. title: res.msg
  372. });
  373. that.gameBetList();
  374. }).catch((res) => {
  375. uni.hideLoading();
  376. uni.showToast({
  377. title: res.msg
  378. });
  379. })
  380. },
  381. // 获取用户余额信息
  382. getUserWallet() {
  383. gameWallet().then((res) => {
  384. this.userWallet = +res.data.back.USDT.money.money
  385. })
  386. },
  387. // 开始倒计时
  388. async opTiem() {
  389. const that = this;
  390. try {
  391. // 判斷是否有游戲信息并且有正在進行中游戏
  392. if (that.history.base.id && that.history.next) {
  393. console.log(that.history.base.id, that.history.next,
  394. 'that.history.base.id && that.history.next');
  395. that.time.t = setInterval(() => {
  396. that.getOutTime();
  397. }, 1000)
  398. }
  399. } catch (e) {
  400. console.log(e, '定时');
  401. }
  402. },
  403. // 获取倒计时时间
  404. getOutTime() {
  405. const that = this;
  406. const da = (new Date()).getTime();
  407. const timenum = that.history.next.open_time * 1000 - da;
  408. // console.log(timenum, that.history.next.open_time, da, '计算');
  409. if (timenum > 0) {
  410. that.time.H = Math.floor(timenum / 1000 / 60 / 60);
  411. that.time.S = Math.floor(timenum / 1000 % 60)
  412. that.time.M = Math.floor(timenum / 1000 / 60 % 60);
  413. }
  414. if (that.time.H == 0 && that.time.M == 0 && that.time.S == 0) {
  415. console.log('归0');
  416. clearInterval(that.time.t);
  417. // 延时调用防止数据重复加载
  418. setTimeout(() => {
  419. that.getGame(that.history.base.id)
  420. that.getGameKline();
  421. }, 2000)
  422. }
  423. },
  424. // 游戏tab切换
  425. changeTab(item, ind) {
  426. const that = this;
  427. if (ind != this.actionIndex) {
  428. that.actionIndex = ind;
  429. // 清理倒计时
  430. that.initData();
  431. // 重新加载数据
  432. that.gameDataInit(item.id);
  433. }
  434. },
  435. // 初始化
  436. async gameInit() {
  437. // 获取游戏列表
  438. await this.getGameList();
  439. // 加载游戏数据
  440. this.gameDataInit(this.history.base.id || this.gameList[0].id)
  441. },
  442. // 加载游戏列表
  443. getGameList() {
  444. return getGameList().then((res) => {
  445. this.gameList = res.data.list;
  446. // console.log('1111111111',this.gameList);
  447. })
  448. },
  449. // 重新加载基础游戏信息
  450. async gameDataInit(id, reload = true) {
  451. // 获取基础信息
  452. await this.getGame(id);
  453. //获取K线
  454. this.getGameKline(reload);
  455. // 获取游戏压住记录
  456. this.gameBetList();
  457. },
  458. // 获取游戏压住记录
  459. gameBetList() {
  460. gameBetList({
  461. page: 1,
  462. limit: 10,
  463. id: this.history.base.id,
  464. }).then((res) => {
  465. this.betList.list = res.data.bet_log;
  466. })
  467. },
  468. // 获取游戏K线信息
  469. getGameKline(reload = true) {
  470. const that = this;
  471. gameKline({
  472. page: 1,
  473. limit: 60
  474. }, that.history.base.id).then((res) => {
  475. that.KlineList = res.data.list[0];
  476. let list = res.data.list.reverse();
  477. // x轴记录
  478. let xarr = [];
  479. // 打点数据
  480. let linearr = [];
  481. for (let i = 0; i < list.length; i++) {
  482. const ll = list[i];
  483. const time = new Date(+ll.ts);
  484. const addar = [+(+ll.o).toFixed(5), +(+ll.c).toFixed(5), +(+ll.l).toFixed(5), +(+ll.h)
  485. .toFixed(5)
  486. ];
  487. xarr.push(`${time.getHours()}:${time.getMinutes()}`)
  488. linearr.push(addar)
  489. }
  490. that.$nextTick(() => {
  491. // 判断是否要重载数据
  492. that.initKline({
  493. xarr,
  494. linearr
  495. }, reload)
  496. })
  497. })
  498. },
  499. // 获取当前项目信息
  500. getGame(id) {
  501. const that = this;
  502. return getGame({
  503. page: that.history.page,
  504. limit: that.history.limit
  505. }, id).then(({
  506. data
  507. }) => {
  508. that.history.list = data.list || [];
  509. that.history.base = data.game || {};
  510. that.history.next = data.next_game || '';
  511. that.history.now = data.now_game || '';
  512. // 是否不存在启动中的活动并判断防止重复调用创建倒计时
  513. if (!that.history.next && !that.getNextTimeObj) {
  514. that.getNextTimeObj = setInterval(() => {
  515. that.getGame(id)
  516. }, 1000)
  517. return
  518. }
  519. if (that.history.next && that.getNextTimeObj) {
  520. clearInterval(that.getNextTimeObj);
  521. // 清空倒计时对象
  522. that.getNextTimeObj = '';
  523. }
  524. // 判断是否有活动并且正在进行中
  525. if (that.history.next && !that.getNextTimeObj) {
  526. that.opTiem();
  527. }
  528. })
  529. },
  530. // 均值计算
  531. calculateMA(dayCount, data) {
  532. var result = [];
  533. for (var i = 0, len = data.linearr.length; i < len; i++) {
  534. if (i < dayCount) {
  535. result.push('-');
  536. continue;
  537. }
  538. var sum = 0;
  539. for (var j = 0; j < dayCount; j++) {
  540. sum += data.linearr[i - j][1];
  541. }
  542. result.push(+(sum / dayCount).toFixed(5));
  543. }
  544. return result;
  545. },
  546. // 重载K线
  547. async initKline(data, reload = true) {
  548. const that = this;
  549. try {
  550. const chart = await this.$refs.chart.init(echarts);
  551. if (reload) {
  552. const upColor = '#00da3c';
  553. const downColor = '#ec0000';
  554. chart.setOption(
  555. (this.option = {
  556. animation: false,
  557. legend: {
  558. top: 10,
  559. left: 10,
  560. data: ['MA5', 'MA10', 'MA20'],
  561. textStyle: {
  562. color: '#999999'
  563. }
  564. },
  565. tooltip: {
  566. trigger: 'axis',
  567. axisPointer: {
  568. type: 'cross'
  569. },
  570. borderWidth: 1,
  571. borderColor: '#ccc',
  572. padding: 10,
  573. textStyle: {
  574. color: '#000'
  575. },
  576. position: function(pos, params, el, elRect, size) {
  577. const obj = {
  578. top: 10
  579. };
  580. obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 40;
  581. return obj;
  582. }
  583. },
  584. dataZoom: [{
  585. type: 'inside',
  586. xAxisIndex: 0,
  587. start: 50,
  588. end: 100
  589. }],
  590. grid: [{
  591. left: 10,
  592. right: 55,
  593. bottom: 20,
  594. top: 45
  595. }],
  596. xAxis: [{
  597. type: 'category',
  598. data: data.xarr,
  599. axisLine: {
  600. onZero: false
  601. },
  602. splitLine: {
  603. show: false
  604. },
  605. min: 'dataMin',
  606. max: 'dataMax',
  607. axisPointer: {
  608. z: 100
  609. }
  610. }],
  611. yAxis: [{
  612. scale: true,
  613. splitNumber: 4,
  614. position: 'right',
  615. axisTick: {
  616. show: false
  617. },
  618. splitLine: {
  619. show: false,
  620. lineStyle: {
  621. color: '#e3e3e3'
  622. }
  623. },
  624. axisLabel: {
  625. inside: false,
  626. formatter: '{value}\n',
  627. color: '#999999'
  628. }
  629. }],
  630. series: [{
  631. name: that.history.base.token + '-USDT',
  632. type: 'candlestick',
  633. data: data.linearr,
  634. itemStyle: {
  635. color: upColor,
  636. color0: downColor,
  637. borderColor: undefined,
  638. borderColor0: undefined
  639. }
  640. },
  641. {
  642. name: "MA5",
  643. smooth: true,
  644. type: 'line',
  645. data: that.calculateMA(5, data),
  646. showSymbol: false,
  647. lineStyle: {
  648. width: 1
  649. }
  650. },
  651. {
  652. name: "MA10",
  653. smooth: true,
  654. type: 'line',
  655. data: that.calculateMA(10, data),
  656. showSymbol: false,
  657. lineStyle: {
  658. width: 1
  659. }
  660. },
  661. {
  662. name: "MA20",
  663. smooth: true,
  664. type: 'line',
  665. data: that.calculateMA(20, data),
  666. showSymbol: false,
  667. lineStyle: {
  668. width: 1
  669. }
  670. },
  671. ]
  672. }),
  673. true
  674. )
  675. } else {
  676. chart.setOption({
  677. xAxis: [{
  678. type: 'category',
  679. data: data.xarr,
  680. }],
  681. series: [{
  682. name: that.history.base.token + '-USDT',
  683. data: data.linearr,
  684. },
  685. {
  686. name: "MA5",
  687. data: that.calculateMA(5, data),
  688. },
  689. {
  690. name: "MA10",
  691. data: that.calculateMA(10, data),
  692. },
  693. {
  694. name: "MA20",
  695. data: that.calculateMA(20, data),
  696. },
  697. ]
  698. })
  699. }
  700. } catch (e) {
  701. console.log(e, 'cuowu');
  702. //TODO handle the exception
  703. }
  704. },
  705. // 页面跳转
  706. nav(url) {
  707. console.log('tz');
  708. if (!this.hasLogin) {
  709. uni.showModal({
  710. title: this.$t('enter.c4'),
  711. content: this.$t('enter.b5'),
  712. success: (e) => {
  713. // 判断是否点击确认按钮
  714. if (e.confirm) {
  715. // 保存当前页面地址
  716. saveUrl()
  717. // 跳转页面
  718. interceptor()
  719. }
  720. }
  721. })
  722. return
  723. }
  724. uni.navigateTo({
  725. url,
  726. fail(err) {
  727. console.log(err);
  728. }
  729. });
  730. },
  731. },
  732. };
  733. </script>
  734. <style lang="scss">
  735. .all {
  736. width: 750rpx;
  737. /* height: 2500rpx; */
  738. height: 100%;
  739. padding-top: var(--status-bar-height);
  740. padding-bottom: 30rpx;
  741. }
  742. .tab {
  743. padding: 30rpx 20rpx;
  744. margin: 0 30rpx;
  745. background-color: #191A1F;
  746. border-radius: 20px;
  747. .tab-item {
  748. color: #FFF;
  749. font-size: $font-lg;
  750. padding: 0 20rpx;
  751. padding-bottom: 10rpx;
  752. &.action {
  753. color: #F5A944;
  754. border-bottom: 1px solid #F5A944;
  755. }
  756. }
  757. .top {
  758. height: 530rpx;
  759. width: 100%;
  760. }
  761. }
  762. .center {
  763. padding: 30rpx;
  764. line-height: 1;
  765. align-items: flex-start;
  766. .le,
  767. .ri {
  768. width: 50%;
  769. }
  770. .le {
  771. .tit {
  772. font-weight: bold;
  773. .ti1 {
  774. font-size: 26rpx;
  775. color: #ffffff;
  776. }
  777. .ti2 {
  778. font-size: 22rpx;
  779. padding-left: 10rpx;
  780. color: #999999;
  781. }
  782. }
  783. .he {
  784. padding-top: 40rpx;
  785. .numbox {
  786. flex-wrap: wrap;
  787. .he1 {
  788. background: #fdaf41;
  789. border-radius: 10rpx;
  790. margin-bottom: 40rpx;
  791. margin-right: 20rpx;
  792. width: 84rpx;
  793. height: 84rpx;
  794. justify-content: center;
  795. .wen {
  796. font-size: 30rpx;
  797. font-weight: bold;
  798. color: #000000;
  799. }
  800. }
  801. }
  802. }
  803. .yi {
  804. color: #ffffff;
  805. font-size: $font-base;
  806. .img {
  807. width: 41rpx;
  808. height: 42rpx;
  809. }
  810. .wz {
  811. font-weight: bold;
  812. }
  813. }
  814. .shu {
  815. padding-top: 10rpx;
  816. font-size: 51rpx;
  817. font-weight: bold;
  818. color: #fdb242;
  819. }
  820. }
  821. .ri {
  822. .ti {
  823. font-size: 26rpx;
  824. font-weight: bold;
  825. .t1 {
  826. color: #ffffff;
  827. }
  828. .t2 {
  829. color: #fdaf41;
  830. }
  831. }
  832. .dh {
  833. width: 100%;
  834. padding: 20rpx 30rpx;
  835. margin-top: 30rpx;
  836. background: #efefef;
  837. border-radius: 10rpx;
  838. .te {
  839. font-size: 44rpx;
  840. font-weight: 800;
  841. color: #000000;
  842. }
  843. }
  844. .btn {
  845. padding-top: 30rpx;
  846. .bt {
  847. padding-bottom: 10rpx;
  848. .btnItem {
  849. width: 49%;
  850. height: 70rpx;
  851. line-height: 70rpx;
  852. text-align: center;
  853. .imag {
  854. width: 32rpx;
  855. height: 20rpx;
  856. }
  857. .xia {
  858. font-size: 28rpx;
  859. font-weight: 800;
  860. color: #ffffff;
  861. }
  862. }
  863. .btnle {
  864. border-radius: 50rpx 0 0 50rpx;
  865. background-color: #df5660;
  866. }
  867. .btnri {
  868. border-radius: 0 50rpx 50rpx 0;
  869. background-color: #5bb786;
  870. }
  871. }
  872. }
  873. .db {
  874. justify-content: flex-end;
  875. padding-top: 30rpx;
  876. .jl {
  877. font-size: 24rpx;
  878. font-weight: 400;
  879. color: #999999;
  880. }
  881. .sj {
  882. width: 40rpx;
  883. height: 40rpx;
  884. background: #bfbfbf;
  885. border-radius: 3rpx;
  886. text-align: center;
  887. line-height: 40rpx;
  888. margin-left: 10rpx;
  889. }
  890. }
  891. }
  892. }
  893. .kb {
  894. width: 750rpx;
  895. height: 20rpx;
  896. background-color: #191a1f;
  897. }
  898. .last {
  899. padding: 30rpx;
  900. line-height: 1;
  901. font-size: 24rpx;
  902. font-weight: 800;
  903. color: #fff;
  904. .lb {
  905. width: 14rpx;
  906. height: 20rpx;
  907. margin-left: 10rpx;
  908. }
  909. }
  910. .bg {
  911. padding: 0 30rpx;
  912. background-color: #000000;
  913. color: #fff;
  914. text-align: center;
  915. font-size: 28rpx;
  916. padding-bottom: 30rpx;
  917. .biaotou {
  918. font-weight: 800;
  919. padding-bottom: 10rpx;
  920. }
  921. .biwe {
  922. width: 25%;
  923. .zz {
  924. width: 22rpx;
  925. height: 14rpx;
  926. margin-left: 8rpx;
  927. }
  928. .nametip {
  929. font-size: 18rpx;
  930. color: #999999;
  931. padding-left: 8rpx;
  932. &.green {
  933. color: #5bb786;
  934. }
  935. &.red {
  936. color: #df5660;
  937. }
  938. }
  939. }
  940. .biwe:nth-child(1) {
  941. flex-shrink: 0;
  942. text-align: left;
  943. align-items: flex-end;
  944. }
  945. .biwe:nth-child(4) {
  946. flex-shrink: 0;
  947. width: 200rpx;
  948. }
  949. .list {
  950. font-weight: bold;
  951. padding: 20rpx 0;
  952. border-bottom: 1px solid rgba(43, 42, 38, 0.52);
  953. }
  954. .list-buttom {
  955. width: 100rpx;
  956. border-radius: 30rpx;
  957. font-size: 16rpx;
  958. padding: 10rpx 0;
  959. &.success {
  960. background: $color-green;
  961. }
  962. &.red{
  963. background: $color-yellow;
  964. }
  965. &.primary {
  966. background: #01ebf6;
  967. color: #000000;
  968. }
  969. }
  970. }
  971. .chz {
  972. background: #191a1f;
  973. border-radius: 20rpx;
  974. margin: 0 30rpx;
  975. color: #ffffff;
  976. font-weight: bold;
  977. padding: 20rpx 30rpx;
  978. .yue {
  979. font-size: 28rpx;
  980. }
  981. .yes {
  982. color: #fdaf41;
  983. }
  984. .quc {
  985. font-size: 26rpx;
  986. font-weight: 500;
  987. color: #ffffff;
  988. }
  989. .choz {
  990. width: 22rpx;
  991. height: 14rpx;
  992. }
  993. }
  994. .alert-detail {
  995. background-color: #FFF;
  996. border-radius: 10rpx;
  997. width: 500rpx;
  998. .flex {
  999. padding: 10rpx 0;
  1000. }
  1001. }
  1002. </style>