entertainment.vue 22 KB

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