entertainment.vue 23 KB

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