entertainment.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  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. const that = this;
  352. that.upOnBtnData.passwordArr = val;
  353. that.colsePayPassword();
  354. const typeList = ["上",'下','奇','偶'];
  355. uni.showModal({
  356. title: '提示',
  357. content: `是否压住${that.upOnBtnData.value}USDT到${typeList[that.upOnBtnData.type-1]}`,
  358. success: res => {
  359. if(res.confirm){
  360. that.gameBetIn();
  361. }
  362. },
  363. });
  364. },
  365. // 参与压住
  366. gameBetIn(type) {
  367. const that = this;
  368. const upData = {
  369. id: that.history.next.id,
  370. bet: that.upOnBtnData.type,
  371. num: that.upOnBtnData.value,
  372. trade_password: that.upOnBtnData.passwordArr
  373. };
  374. uni.showLoading({
  375. mask: true
  376. })
  377. that.upOnBtnData.value = '';
  378. gameBetIn(upData).then((res) => {
  379. uni.hideLoading()
  380. uni.showToast({
  381. title: res.msg
  382. });
  383. that.gameBetList();
  384. }).catch((res) => {
  385. uni.hideLoading();
  386. uni.showToast({
  387. title: res.msg
  388. });
  389. })
  390. },
  391. // 获取用户余额信息
  392. getUserWallet() {
  393. gameWallet().then((res) => {
  394. this.userWallet = +res.data.back.USDT.money.money
  395. })
  396. },
  397. // 开始倒计时
  398. async opTiem() {
  399. const that = this;
  400. try {
  401. // 判斷是否有游戲信息并且有正在進行中游戏
  402. if (that.history.base.id && that.history.next) {
  403. console.log(that.history.base.id, that.history.next,
  404. 'that.history.base.id && that.history.next');
  405. that.time.t = setInterval(() => {
  406. that.getOutTime();
  407. }, 1000)
  408. }
  409. } catch (e) {
  410. console.log(e, '定时');
  411. }
  412. },
  413. // 获取倒计时时间
  414. getOutTime() {
  415. const that = this;
  416. const da = (new Date()).getTime();
  417. const timenum = that.history.next.open_time * 1000 - da;
  418. // console.log(timenum, that.history.next.open_time, da, '计算');
  419. if (timenum > 0) {
  420. that.time.H = Math.floor(timenum / 1000 / 60 / 60);
  421. that.time.S = Math.floor(timenum / 1000 % 60)
  422. that.time.M = Math.floor(timenum / 1000 / 60 % 60);
  423. }
  424. if (that.time.H == 0 && that.time.M == 0 && that.time.S == 0) {
  425. console.log('归0');
  426. clearInterval(that.time.t);
  427. // 延时调用防止数据重复加载
  428. setTimeout(() => {
  429. that.getGame(that.history.base.id)
  430. that.getGameKline();
  431. }, 2000)
  432. }
  433. },
  434. // 游戏tab切换
  435. changeTab(item, ind) {
  436. const that = this;
  437. if (ind != this.actionIndex) {
  438. that.actionIndex = ind;
  439. // 清理倒计时
  440. that.initData();
  441. // 重新加载数据
  442. that.gameDataInit(item.id);
  443. }
  444. },
  445. // 初始化
  446. async gameInit() {
  447. // 获取游戏列表
  448. await this.getGameList();
  449. // 加载游戏数据
  450. this.gameDataInit(this.history.base.id || this.gameList[0].id)
  451. },
  452. // 加载游戏列表
  453. getGameList() {
  454. return getGameList().then((res) => {
  455. this.gameList = res.data.list;
  456. // console.log('1111111111',this.gameList);
  457. })
  458. },
  459. // 重新加载基础游戏信息
  460. async gameDataInit(id, reload = true) {
  461. // 获取基础信息
  462. await this.getGame(id);
  463. //获取K线
  464. this.getGameKline(reload);
  465. // 获取游戏压住记录
  466. this.gameBetList();
  467. },
  468. // 获取游戏压住记录
  469. gameBetList() {
  470. gameBetList({
  471. page: 1,
  472. limit: 10,
  473. id: this.history.base.id,
  474. }).then((res) => {
  475. this.betList.list = res.data.bet_log;
  476. })
  477. },
  478. // 获取游戏K线信息
  479. getGameKline(reload = true) {
  480. const that = this;
  481. const lineNum = this.history.base.decimal;
  482. gameKline({
  483. page: 1,
  484. limit: 60
  485. }, that.history.base.id).then((res) => {
  486. that.KlineList = res.data.list[0];
  487. let list = res.data.list.reverse();
  488. // x轴记录
  489. let xarr = [];
  490. // 打点数据
  491. let linearr = [];
  492. for (let i = 0; i < list.length; i++) {
  493. const ll = list[i];
  494. const time = new Date(+ll.ts);
  495. const addar = [+(+ll.o).toFixed(lineNum), +(+ll.c).toFixed(lineNum), +(+ll.l).toFixed(lineNum), +(+ll.h)
  496. .toFixed(lineNum)
  497. ];
  498. xarr.push(`${time.getHours()}:${time.getMinutes()}`)
  499. linearr.push(addar)
  500. }
  501. that.$nextTick(() => {
  502. // 判断是否要重载数据
  503. that.initKline({
  504. xarr,
  505. linearr
  506. }, reload)
  507. })
  508. })
  509. },
  510. // 获取当前项目信息
  511. getGame(id) {
  512. const that = this;
  513. return getGame({
  514. page: that.history.page,
  515. limit: that.history.limit
  516. }, id).then(({
  517. data
  518. }) => {
  519. that.history.list = data.list || [];
  520. that.history.base = data.game || {};
  521. that.history.next = data.next_game || '';
  522. that.history.now = data.now_game || '';
  523. // 是否不存在启动中的活动并判断防止重复调用创建倒计时
  524. if (!that.history.next && !that.getNextTimeObj) {
  525. that.getNextTimeObj = setInterval(() => {
  526. that.getGame(id)
  527. }, 1000)
  528. return
  529. }
  530. if (that.history.next && that.getNextTimeObj) {
  531. clearInterval(that.getNextTimeObj);
  532. // 清空倒计时对象
  533. that.getNextTimeObj = '';
  534. }
  535. // 判断是否有活动并且正在进行中
  536. if (that.history.next && !that.getNextTimeObj) {
  537. that.opTiem();
  538. }
  539. })
  540. },
  541. // 均值计算
  542. calculateMA(dayCount, data) {
  543. var result = [];
  544. for (var i = 0, len = data.linearr.length; i < len; i++) {
  545. if (i < dayCount) {
  546. result.push('-');
  547. continue;
  548. }
  549. var sum = 0;
  550. for (var j = 0; j < dayCount; j++) {
  551. sum += data.linearr[i - j][1];
  552. }
  553. result.push(+(sum / dayCount).toFixed(5));
  554. }
  555. return result;
  556. },
  557. // 重载K线
  558. async initKline(data, reload = true) {
  559. const that = this;
  560. try {
  561. const chart = await this.$refs.chart.init(echarts);
  562. if (reload) {
  563. const upColor = '#00da3c';
  564. const downColor = '#ec0000';
  565. chart.setOption(
  566. (this.option = {
  567. animation: false,
  568. legend: {
  569. top: 10,
  570. left: 10,
  571. data: ['MA5', 'MA10', 'MA20'],
  572. textStyle: {
  573. color: '#999999'
  574. }
  575. },
  576. tooltip: {
  577. trigger: 'axis',
  578. axisPointer: {
  579. type: 'cross'
  580. },
  581. borderWidth: 1,
  582. borderColor: '#ccc',
  583. padding: 10,
  584. textStyle: {
  585. color: '#000'
  586. },
  587. position: function(pos, params, el, elRect, size) {
  588. const obj = {
  589. top: 10
  590. };
  591. obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 40;
  592. return obj;
  593. }
  594. },
  595. dataZoom: [{
  596. type: 'inside',
  597. xAxisIndex: 0,
  598. start: 50,
  599. end: 100
  600. }],
  601. grid: [{
  602. left: 10,
  603. right: 55,
  604. bottom: 20,
  605. top: 45
  606. }],
  607. xAxis: [{
  608. type: 'category',
  609. data: data.xarr,
  610. axisLine: {
  611. onZero: false
  612. },
  613. splitLine: {
  614. show: false
  615. },
  616. min: 'dataMin',
  617. max: 'dataMax',
  618. axisPointer: {
  619. z: 100
  620. }
  621. }],
  622. yAxis: [{
  623. scale: true,
  624. splitNumber: 4,
  625. position: 'right',
  626. axisTick: {
  627. show: false
  628. },
  629. splitLine: {
  630. show: false,
  631. lineStyle: {
  632. color: '#e3e3e3'
  633. }
  634. },
  635. axisLabel: {
  636. inside: false,
  637. formatter: '{value}\n',
  638. color: '#999999'
  639. }
  640. }],
  641. series: [{
  642. name: that.history.base.token + '-USDT',
  643. type: 'candlestick',
  644. data: data.linearr,
  645. itemStyle: {
  646. color: upColor,
  647. color0: downColor,
  648. borderColor: undefined,
  649. borderColor0: undefined
  650. }
  651. },
  652. {
  653. name: "MA5",
  654. smooth: true,
  655. type: 'line',
  656. data: that.calculateMA(5, data),
  657. showSymbol: false,
  658. lineStyle: {
  659. width: 1
  660. }
  661. },
  662. {
  663. name: "MA10",
  664. smooth: true,
  665. type: 'line',
  666. data: that.calculateMA(10, data),
  667. showSymbol: false,
  668. lineStyle: {
  669. width: 1
  670. }
  671. },
  672. {
  673. name: "MA20",
  674. smooth: true,
  675. type: 'line',
  676. data: that.calculateMA(20, data),
  677. showSymbol: false,
  678. lineStyle: {
  679. width: 1
  680. }
  681. },
  682. ]
  683. }),
  684. true
  685. )
  686. } else {
  687. chart.setOption({
  688. xAxis: [{
  689. type: 'category',
  690. data: data.xarr,
  691. }],
  692. series: [{
  693. name: that.history.base.token + '-USDT',
  694. data: data.linearr,
  695. },
  696. {
  697. name: "MA5",
  698. data: that.calculateMA(5, data),
  699. },
  700. {
  701. name: "MA10",
  702. data: that.calculateMA(10, data),
  703. },
  704. {
  705. name: "MA20",
  706. data: that.calculateMA(20, data),
  707. },
  708. ]
  709. })
  710. }
  711. } catch (e) {
  712. console.log(e, 'cuowu');
  713. //TODO handle the exception
  714. }
  715. },
  716. // 页面跳转
  717. nav(url) {
  718. console.log('tz');
  719. if (!this.hasLogin) {
  720. uni.showModal({
  721. title: this.$t('enter.c4'),
  722. content: this.$t('enter.b5'),
  723. success: (e) => {
  724. // 判断是否点击确认按钮
  725. if (e.confirm) {
  726. // 保存当前页面地址
  727. saveUrl()
  728. // 跳转页面
  729. interceptor()
  730. }
  731. }
  732. })
  733. return
  734. }
  735. uni.navigateTo({
  736. url,
  737. fail(err) {
  738. console.log(err);
  739. }
  740. });
  741. },
  742. },
  743. };
  744. </script>
  745. <style lang="scss">
  746. .all {
  747. width: 750rpx;
  748. /* height: 2500rpx; */
  749. height: 100%;
  750. padding-top: var(--status-bar-height);
  751. padding-bottom: 30rpx;
  752. }
  753. .tab {
  754. padding: 30rpx 20rpx;
  755. margin: 0 30rpx;
  756. background-color: #191A1F;
  757. border-radius: 20px;
  758. .tab-item {
  759. color: #FFF;
  760. font-size: $font-lg;
  761. padding: 0 20rpx;
  762. padding-bottom: 10rpx;
  763. &.action {
  764. color: #F5A944;
  765. border-bottom: 1px solid #F5A944;
  766. }
  767. }
  768. .top {
  769. height: 530rpx;
  770. width: 100%;
  771. }
  772. }
  773. .center {
  774. padding: 30rpx;
  775. line-height: 1;
  776. align-items: flex-start;
  777. .le,
  778. .ri {
  779. width: 50%;
  780. }
  781. .le {
  782. .tit {
  783. font-weight: bold;
  784. .ti1 {
  785. font-size: 26rpx;
  786. color: #ffffff;
  787. }
  788. .ti2 {
  789. font-size: 22rpx;
  790. padding-left: 10rpx;
  791. color: #999999;
  792. }
  793. }
  794. .he {
  795. padding-top: 40rpx;
  796. .numbox {
  797. flex-wrap: wrap;
  798. .he1 {
  799. background: #fdaf41;
  800. border-radius: 10rpx;
  801. margin-bottom: 40rpx;
  802. margin-right: 20rpx;
  803. width: 84rpx;
  804. height: 84rpx;
  805. justify-content: center;
  806. .wen {
  807. font-size: 30rpx;
  808. font-weight: bold;
  809. color: #000000;
  810. }
  811. }
  812. }
  813. }
  814. .yi {
  815. color: #ffffff;
  816. font-size: $font-base;
  817. .img {
  818. width: 41rpx;
  819. height: 42rpx;
  820. }
  821. .wz {
  822. font-weight: bold;
  823. }
  824. }
  825. .shu {
  826. padding-top: 10rpx;
  827. font-size: 51rpx;
  828. font-weight: bold;
  829. color: #fdb242;
  830. }
  831. }
  832. .ri {
  833. .ti {
  834. font-size: 26rpx;
  835. font-weight: bold;
  836. .t1 {
  837. color: #ffffff;
  838. }
  839. .t2 {
  840. color: #fdaf41;
  841. }
  842. }
  843. .dh {
  844. width: 100%;
  845. padding: 20rpx 30rpx;
  846. margin-top: 30rpx;
  847. background: #efefef;
  848. border-radius: 10rpx;
  849. .te {
  850. font-size: 44rpx;
  851. font-weight: 800;
  852. color: #000000;
  853. }
  854. }
  855. .btn {
  856. padding-top: 30rpx;
  857. .bt {
  858. padding-bottom: 10rpx;
  859. .btnItem {
  860. width: 49%;
  861. height: 70rpx;
  862. line-height: 70rpx;
  863. text-align: center;
  864. .imag {
  865. width: 32rpx;
  866. height: 20rpx;
  867. }
  868. .xia {
  869. font-size: 28rpx;
  870. font-weight: 800;
  871. color: #ffffff;
  872. }
  873. }
  874. .btnle {
  875. border-radius: 50rpx 0 0 50rpx;
  876. background-color: #df5660;
  877. }
  878. .btnri {
  879. border-radius: 0 50rpx 50rpx 0;
  880. background-color: #5bb786;
  881. }
  882. }
  883. }
  884. .db {
  885. justify-content: flex-end;
  886. padding-top: 30rpx;
  887. .jl {
  888. font-size: 24rpx;
  889. font-weight: 400;
  890. color: #999999;
  891. }
  892. .sj {
  893. width: 40rpx;
  894. height: 40rpx;
  895. background: #bfbfbf;
  896. border-radius: 3rpx;
  897. text-align: center;
  898. line-height: 40rpx;
  899. margin-left: 10rpx;
  900. }
  901. }
  902. }
  903. }
  904. .kb {
  905. width: 750rpx;
  906. height: 20rpx;
  907. background-color: #191a1f;
  908. }
  909. .last {
  910. padding: 30rpx;
  911. line-height: 1;
  912. font-size: 24rpx;
  913. font-weight: 800;
  914. color: #fff;
  915. .lb {
  916. width: 14rpx;
  917. height: 20rpx;
  918. margin-left: 10rpx;
  919. }
  920. }
  921. .bg {
  922. padding: 0 30rpx;
  923. background-color: #000000;
  924. color: #fff;
  925. text-align: center;
  926. font-size: 28rpx;
  927. padding-bottom: 30rpx;
  928. .biaotou {
  929. font-weight: 800;
  930. padding-bottom: 10rpx;
  931. }
  932. .biwe {
  933. width: 25%;
  934. .zz {
  935. width: 22rpx;
  936. height: 14rpx;
  937. margin-left: 8rpx;
  938. }
  939. .nametip {
  940. font-size: 18rpx;
  941. color: #999999;
  942. padding-left: 8rpx;
  943. &.green {
  944. color: #5bb786;
  945. }
  946. &.red {
  947. color: #df5660;
  948. }
  949. }
  950. }
  951. .biwe:nth-child(1) {
  952. flex-shrink: 0;
  953. text-align: left;
  954. align-items: flex-end;
  955. }
  956. .biwe:nth-child(4) {
  957. flex-shrink: 0;
  958. width: 200rpx;
  959. }
  960. .list {
  961. font-weight: bold;
  962. padding: 20rpx 0;
  963. border-bottom: 1px solid rgba(43, 42, 38, 0.52);
  964. }
  965. .list-buttom {
  966. width: 100rpx;
  967. border-radius: 30rpx;
  968. font-size: 16rpx;
  969. padding: 10rpx 0;
  970. &.success {
  971. background: $color-green;
  972. }
  973. &.red{
  974. background: $color-yellow;
  975. }
  976. &.primary {
  977. background: #01ebf6;
  978. color: #000000;
  979. }
  980. }
  981. }
  982. .chz {
  983. background: #191a1f;
  984. border-radius: 20rpx;
  985. margin: 0 30rpx;
  986. color: #ffffff;
  987. font-weight: bold;
  988. padding: 20rpx 30rpx;
  989. .yue {
  990. font-size: 28rpx;
  991. }
  992. .yes {
  993. color: #fdaf41;
  994. }
  995. .quc {
  996. font-size: 26rpx;
  997. font-weight: 500;
  998. color: #ffffff;
  999. }
  1000. .choz {
  1001. width: 22rpx;
  1002. height: 14rpx;
  1003. }
  1004. }
  1005. .alert-detail {
  1006. background-color: #FFF;
  1007. border-radius: 10rpx;
  1008. width: 500rpx;
  1009. .flex {
  1010. padding: 10rpx 0;
  1011. }
  1012. }
  1013. </style>