index.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041
  1. <template>
  2. <div class="payment">
  3. <!-- 选择支付方式 -->
  4. <template v-if="step === 1">
  5. <div class="moneyInfo">
  6. <div class="tips">You Neet to Pay</div>
  7. <div class="money" v-if="salePlans">
  8. <FontZoom width="320">
  9. <template v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode !== 'USD'">
  10. <img class="icon" :src="salePlans.currencyInfo.iconPath" /><span class="info"> {{ salePlans.price }} {{ salePlans.currencyInfo.tokenSymbol }} (${{salePlans.usdPrice}})</span>
  11. </template>
  12. <template v-else>
  13. <span class="info usd">${{salePlans.usdPrice}}</span>
  14. </template>
  15. </FontZoom>
  16. </div>
  17. </div>
  18. <div class="payList">
  19. <div class="detail" v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode !== 'USD'">
  20. <div class="title">Crypto Wallet</div>
  21. <div class="item denet" @click="deNetPay">
  22. <div>
  23. <img src="../../static/payment/icon_wallet.png" />
  24. <span>DeNet Pay</span>
  25. </div>
  26. <div class="wallet">
  27. Balance:{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
  28. </div>
  29. </div>
  30. <div class="item" @click="maskPay">
  31. <img src="../../static/payment/icon_meta_mask.png" />
  32. <span>MetaMask</span>
  33. </div>
  34. </div>
  35. <div class="detail" v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode === 'USD'">
  36. <div class="title">Credit/Debit Card</div>
  37. <div class="item denet" @click="deNetPay">
  38. <div>
  39. <img src="../../static/payment/icon_wallet.png" />
  40. <span>DeNet Pay</span>
  41. </div>
  42. <div class="wallet">
  43. Balance:{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
  44. </div>
  45. </div>
  46. <div class="item" @click="achPay">
  47. <img src="../../static/payment/icon_master_card.png" />
  48. <span>MasterCard</span>
  49. </div>
  50. <div class="item" @click="achPay">
  51. <img src="../../static/payment/icon_visa.png" />
  52. <span>VISA</span>
  53. </div>
  54. </div>
  55. <div class="detail">
  56. <div class="title">Redemption Code</div>
  57. <div class="item" @click="showRedeem">
  58. <img src="../../static/payment/icon_enter_code.png" />
  59. <span>Enter Code</span>
  60. </div>
  61. </div>
  62. </div>
  63. </template>
  64. <!-- 余额足够 -->
  65. <template v-else-if="step === 2">
  66. <div class="balanceTop">
  67. <img class="balance" src="../../static/img/icon_balance.svg" />
  68. <div class="text">Balance</div>
  69. <div class="money">
  70. <FontZoom width="320">
  71. <img class="icon" :src="currencyInfoData.iconPath" /> <span class="font">{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}</span>
  72. </FontZoom>
  73. </div>
  74. <!-- waitRefresh -->
  75. <template v-if="true">
  76. <div class="waitFont">It may take some time to credit the funds into your account.</div>
  77. <div
  78. @click="checkWaitInfo"
  79. class="waitBtn">
  80. <img :class="{ 'icon-refresh-rotate': refreshRotate }" src="../../static/img/icon_refresh.png" />
  81. </div>
  82. </template>
  83. </div>
  84. <div class="balanceBot">
  85. <div class="l">
  86. <div class="neet">You Neet to Pay</div>
  87. <div class="money">
  88. <FontZoom width="190">
  89. <span class="text">{{salePlans.price}} {{ salePlans.currencyInfo.tokenSymbol }}</span>
  90. </FontZoom>
  91. </div>
  92. </div>
  93. <div>
  94. <div
  95. class="btn"
  96. :class="{ disabled: (Number(currencyInfoData.balance) < Number(salePlans.price)) || payDisabled }"
  97. @click="pay">
  98. Pay Now
  99. </div>
  100. </div>
  101. </div>
  102. </template>
  103. <!-- 余额不足 -->
  104. <template v-else-if="step === 3">
  105. <template v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode !== 'USD'">
  106. <div class="balanceInfo">
  107. <div class="top">
  108. <div class="item title">
  109. <img src="../../static/img/icon_deposit.png" />
  110. <span>Deposit to Buy</span>
  111. </div>
  112. <div class="item column">
  113. <div class="l">Deposit</div>
  114. <div class="r">
  115. <img :src="currencyInfoData.iconPath" />
  116. <span>{{ salePlans.price - currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}</span>
  117. </div>
  118. </div>
  119. <div class="item column">
  120. <div class="l">Network</div>
  121. <div class="r">
  122. <img :src="currencyInfoData.chainInfo.iconPath" />
  123. <span>{{ currencyInfoData.chainInfo.chainName }}</span>
  124. </div>
  125. </div>
  126. <div class="address">
  127. <div class="title">Address</div>
  128. <QrCode :tokenChain="currencyInfoData.tokenChain"></QrCode>
  129. </div>
  130. <div class="notice">
  131. <div class="icon"><img src="../../static/img/icon_warning.svg" /></div>
  132. <div class="text">Make sure you also selected <Br/><strong>{{ currencyInfoData.chainInfo.chainName }}</strong> <br/>as the Network on the platform where you are withdrawing funds for this deposiit. Otherwise, you'll lose your assets.</div>
  133. </div>
  134. </div>
  135. <div class="line"></div>
  136. <div class="balance">
  137. <div class="icon">
  138. <img src="../../static/img/icon_balance_blue.svg" />
  139. </div>
  140. <div class="text">Balance: {{ currencyInfoData.balance }} {{ currencyInfoData.tokenSymbol }}</div>
  141. <div
  142. class="refresh"
  143. @click="checkCurrencyInfo">
  144. <img :class="{ 'icon-refresh-rotate': refreshRotate }" src="../../static/img/icon_refresh.svg" />
  145. </div>
  146. </div>
  147. </div>
  148. <div class="balanceBot">
  149. <div class="l">
  150. <div class="neet">You Neet to Pay</div>
  151. <div class="money">
  152. <FontZoom width="190">
  153. <span class="text">{{salePlans.price}} {{ salePlans.currencyInfo.tokenSymbol }}</span>
  154. </FontZoom>
  155. </div>
  156. </div>
  157. <div>
  158. <div
  159. class="btn"
  160. :class="{ disabled: (Number(currencyInfoData.balance) < Number(salePlans.price)) || payDisabled }"
  161. @click="payToken">
  162. Pay Now
  163. </div>
  164. </div>
  165. </div>
  166. </template>
  167. <template v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode === 'USD'">
  168. <div class="balanceInfo">
  169. <div class="top">
  170. <div class="item usd">
  171. <div class="l">Payment amount</div>
  172. <div class="r fontPayment">${{ usdAmountData.orderAmountValue }}</div>
  173. </div>
  174. <div class="item usd">
  175. <div class="l">Balance</div>
  176. <div class="r font">${{ usdAmountData.balance }}</div>
  177. </div>
  178. <div class="item usd" v-if="Number(usdAmountData.rechargeAmountValue) > 0">
  179. <div class="l">{{ usdAmountData.feeDesc }}</div>
  180. <div class="r font">${{ usdAmountData.feeAmountValue }}</div>
  181. </div>
  182. <div class="item usd" v-if="Number(usdAmountData.rechargeAmountValue) > 0">
  183. <div class="l">Deposit Amount</div>
  184. <div class="r fontDeposit">${{ usdAmountData.rechargeAmountValue }}</div>
  185. </div>
  186. <div class="deposit" @click="achPay(false)">Deposit</div>
  187. </div>
  188. <div class="line"></div>
  189. <div class="balance">
  190. <div class="icon">
  191. <img src="../../static/img/icon_balance_blue.svg" />
  192. </div>
  193. <div class="text">Balance: ${{currencyInfoData.balance}}</div>
  194. <div
  195. class="refresh"
  196. @click="checkUsdCurrencyInfo">
  197. <img :class="{ 'icon-refresh-rotate': refreshRotate }" src="../../static/img/icon_refresh.svg" />
  198. </div>
  199. </div>
  200. </div>
  201. <div class="balanceBot">
  202. <div class="l">
  203. <div class="neet">You Neet to Pay</div>
  204. <div class="money">
  205. <FontZoom width="190">
  206. <span class="text">{{ usdAmountData.rechargeAmountValue > 0 ? usdAmountData.rechargeAmountValue : usdAmountData.orderAmountValue }} {{ salePlans.currencyInfo.tokenSymbol }}</span>
  207. </FontZoom>
  208. </div>
  209. </div>
  210. <div>
  211. <div
  212. class="btn"
  213. :class="{ disabled: (usdAmountData.rechargeAmountValue > 0) || payDisabled }"
  214. @click="payUSD">
  215. Pay Now
  216. </div>
  217. </div>
  218. </div>
  219. </template>
  220. </template>
  221. <!-- 成功支付 -->
  222. <template v-else-if="step === 4">
  223. <div class="payInfo">
  224. <div class="picShow" v-if="buyData">
  225. <div class="tip">Wow, NFT in the Mystery box is</div>
  226. <img class="pic" :src="buyData.imagePath" />
  227. <div class="name">{{buyData.nftItemName}}</div>
  228. </div>
  229. </div>
  230. <div class="payBtn">
  231. <button class="btn" @click="goNext">Done</button>
  232. </div>
  233. </template>
  234. <!-- loading -->
  235. <div class="loading" v-if="loading">
  236. <van-loading color="#1D9BF0"></van-loading>
  237. </div>
  238. <div class="loadingBg" v-if="loading"></div>
  239. <!-- redeem -->
  240. <van-popup
  241. round
  242. v-model="redeemLayer"
  243. position="bottom">
  244. <div class="redeem">
  245. <div class="tips">Enter Redemption Code</div>
  246. <div class="footer">
  247. <div class="input">
  248. <input
  249. type="text"
  250. ref="input"
  251. v-model="redeemStr"
  252. @input="textInput"
  253. @blur="textBlur"
  254. @focus="textFocus"
  255. @keydown.enter="redeemPayment" />
  256. </div>
  257. <button
  258. class="enter"
  259. :class="{ disabled: !redeemNext }"
  260. @click="redeemPayment">
  261. Redeem
  262. </button>
  263. </div>
  264. </div>
  265. </van-popup>
  266. </div>
  267. </template>
  268. <script>
  269. import FontZoom from '../../components/FontZoom.vue';
  270. import QrCode from '../../components/qrcode.vue';
  271. import { postRequest } from '../../http/index';
  272. import { Dialog } from 'vant';
  273. import Api from '../../http/api';
  274. export default {
  275. name: 'payment',
  276. data() {
  277. return {
  278. step: 1, // 1: 支付方式列表 2: 余额支付 3: 充值支付 4: 支付完成
  279. loading: true,
  280. salePlans: null,
  281. redeemStr: '',
  282. redeemNext: false,
  283. redeemLayer: false,
  284. buyData: {},
  285. payDisabled: false,
  286. waitRefresh: false,
  287. refreshRotate: false,
  288. currencyInfoData: {},
  289. currencyTimer: 0,
  290. achTimer: 0,
  291. usdAmountData: {},
  292. }
  293. },
  294. head() {
  295. return {
  296. title: 'Buy NFT Mystery Box',
  297. }
  298. },
  299. components: {
  300. QrCode,
  301. FontZoom,
  302. },
  303. mounted() {
  304. this.saleInfo()
  305. },
  306. beforeDestroy() {
  307. clearTimeout(this.currencyTimer);
  308. },
  309. methods : {
  310. saleInfo () {
  311. postRequest(Api.getNftMysteryBoxSaleInfo, {
  312. params: {
  313. nftProjectId: this.$route.query.nftProjectId
  314. }
  315. }).then(res => {
  316. let { code, data } = res;
  317. if (code === 0) {
  318. this.salePlans = data.salePlans[0];
  319. this.getCurrencyInfoByCode();
  320. }
  321. }).finally(() => {
  322. this.loading = false;
  323. })
  324. },
  325. getCurrencyInfoByCode() {
  326. postRequest(Api.getCurrencyInfoByCode, {
  327. params: {
  328. currencyCode: this.salePlans.currencyCode
  329. }
  330. }).then(res => {
  331. let { code, data } = res;
  332. if (code === 0) {
  333. this.currencyInfoData = data;
  334. }
  335. })
  336. // 计算金额
  337. if (this.salePlans.currencyCode === 'USD') {
  338. // this.salePlans.price
  339. postRequest(Api.calcRechargePayAmount, {
  340. params: {
  341. currencyCode: this.salePlans.currencyCode,
  342. orderAmountValue: this.salePlans.price,
  343. payChannel: 'ach'
  344. }
  345. }).then(res => {
  346. let { code, data } = res;
  347. if (code === 0) {
  348. this.usdAmountData = data;
  349. }
  350. })
  351. }
  352. },
  353. getTokenRechargeRecord() {
  354. postRequest(Api.syncChainTokenRechargeRecord, {
  355. params: {
  356. currencyCode: this.salePlans.currencyCode
  357. }
  358. }).then(res => {
  359. let { code, data } = res;
  360. if (code === 0) {
  361. if (data.length > 0) {
  362. let currencyInfo = data[0];
  363. if (currencyInfo.currencyCode == this.currencyInfoData.currencyCode) {
  364. this.currencyInfoData.balance = currencyInfo.balance;
  365. }
  366. } else {
  367. this.currencyInfoData.balance = 0
  368. }
  369. }
  370. })
  371. },
  372. currencyInfoTimer() {
  373. clearTimeout(this.currencyTimer);
  374. this.currencyTimer = setTimeout(() => {
  375. this.currencyInfoTimer()
  376. this.getCurrencyInfoByCode()
  377. }, 10000);
  378. },
  379. checkUsdCurrencyInfo() {
  380. if (!this.refreshRotate) {
  381. this.refreshRotate = true;
  382. this.getCurrencyInfoByCode()
  383. setTimeout(() => {
  384. this.refreshRotate = false;
  385. }, 1000)
  386. }
  387. },
  388. checkCurrencyInfo() {
  389. if (!this.refreshRotate) {
  390. this.refreshRotate = true;
  391. this.getTokenRechargeRecord()
  392. setTimeout(() => {
  393. this.refreshRotate = false;
  394. }, 1000)
  395. }
  396. },
  397. checkWaitInfo() {
  398. if (!this.refreshRotate) {
  399. this.refreshRotate = true;
  400. if (this.salePlans.currencyCode === 'USD') {
  401. this.getCurrencyInfoByCode()
  402. } else {
  403. this.getTokenRechargeRecord()
  404. }
  405. setTimeout(() => {
  406. this.refreshRotate = false;
  407. }, 1000)
  408. }
  409. },
  410. showRedeem() {
  411. this.redeemStr = '';
  412. this.redeemLayer = true;
  413. this.$nextTick(() => {
  414. this.$refs.input.focus();
  415. })
  416. },
  417. textInput(e) {
  418. let len = 16
  419. let str = this.redeemStr.replace(/[^a-zA-Z0-9]/g, '')
  420. str = str.toUpperCase();
  421. str = str.slice(0, len);
  422. // set
  423. this.redeemStr = str;
  424. this.redeemNext = str !== '' && str.length === len;
  425. },
  426. textBlur(e) {
  427. let isiOS = !!window.navigator.userAgent.match(/\(i\[^;]+;( U;)? CPU.+Mac OS X/)
  428. if (isiOS) {
  429. setTimeout(() => {
  430. const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0
  431. window.scrollTo(0, Math.max(scrollHeight - 1, 0))
  432. }, 100)
  433. }
  434. },
  435. textFocus(e) {
  436. let isiOS = !!window.navigator.userAgent.match(/\(i\[^;]+;( U;)? CPU.+Mac OS X/)
  437. if (isiOS) {
  438. setTimeout(() => {
  439. const scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0
  440. window.scrollTo(0, Math.max(scrollHeight - 1, 0))
  441. }, 100)
  442. }
  443. },
  444. redeemPayment() {
  445. if (!this.redeemNext) return;
  446. let params = {
  447. redeemCode: this.redeemStr,
  448. nftProjectId: this.$route.query.nftProjectId,
  449. }
  450. this.redeemNext = false;
  451. postRequest(Api.redeemNft, {
  452. params
  453. }).then(res => {
  454. let { code, data } = res;
  455. if (code === 0) {
  456. this.redeemLayer = false;
  457. if (data.length > 0) {
  458. this.buyData = data[0];
  459. }
  460. // 购买成功
  461. this.step = 4;
  462. } else {
  463. this.payError(code)
  464. }
  465. }).finally(() => {
  466. this.redeemNext = true;
  467. })
  468. },
  469. goNext() {
  470. this.$router.push({
  471. path: `/nft/${this.$route.query.nftProjectId}/${this.$route.query.account}/show`,
  472. })
  473. },
  474. pay() {
  475. if (this.payDisabled || Number(this.currencyInfoData.balance) < Number(this.salePlans.price)) return;
  476. this.payDisabled = true;
  477. postRequest(Api.payNftMysteryBoxWithBalance, {
  478. params: {
  479. nftProjectId: this.$route.query.nftProjectId,
  480. salePlanId: this.salePlans.salePlanId,
  481. }
  482. }).then(res => {
  483. let { code, data } = res;
  484. if (code == 0) {
  485. if (data && data.buyItems.length > 0) {
  486. this.buyData = data.buyItems[0];
  487. }
  488. // 购买成功
  489. this.step = 4;
  490. } else {
  491. this.payError(code)
  492. }
  493. }).finally(() => {
  494. this.payDisabled = false;
  495. })
  496. },
  497. payUSD() {
  498. if (this.usdAmountData.rechargeAmountValue <= 0) {
  499. this.pay()
  500. }
  501. },
  502. payToken() {
  503. if (Number(this.currencyInfoData.balance) >= Number(this.salePlans.price)) {
  504. this.pay()
  505. }
  506. },
  507. payError(code) {
  508. let msg;
  509. switch (code.toString()) {
  510. case '5001':
  511. msg = 'nft project not exist'
  512. break;
  513. case '5002':
  514. msg = 'nft project not available'
  515. break
  516. case '5101':
  517. msg = 'nft sale plan not exist'
  518. break
  519. case '5102':
  520. msg = 'nft sold out'
  521. break
  522. case '5103':
  523. msg = 'Purchase limit reached'
  524. break
  525. case '5104':
  526. case '5105':
  527. case '5106':
  528. msg = 'Invalid redemption code'
  529. break;
  530. default:
  531. msg = 'Invalid redemption code, please try again'
  532. break;
  533. }
  534. // Dialog
  535. Dialog({
  536. message: msg,
  537. confirmButtonText: 'OK',
  538. confirmButtonColor: '#1D9BF0',
  539. });
  540. },
  541. deNetPay() {
  542. if (!this.salePlans) return;
  543. if (this.salePlans.price > this.currencyInfoData.balance) {
  544. // 余额不够
  545. this.step = 3;
  546. this.currencyInfoTimer();
  547. } else {
  548. // 余额足够
  549. this.step = 2;
  550. }
  551. },
  552. maskPay() {
  553. console.log(111)
  554. },
  555. achPay(modifyStep = true) {
  556. if (modifyStep) {
  557. this.step = 2;
  558. }
  559. this.currencyInfoTimer();
  560. Dialog({
  561. message: `Was the pament successful?`,
  562. showCancelButton: true,
  563. confirmButtonText: 'YES',
  564. confirmButtonColor: '#1D9BF0',
  565. cancelButtonText: 'NO',
  566. cancelButtonColor: '#1D9BF0',
  567. }).then(() => {
  568. this.checkWaitInfo()
  569. });
  570. this.$nextTick(() => {
  571. let win = window.open();
  572. win.opener = null;
  573. win.location.href = `${location.protocol}//${location.host}/payment_ach/${this.usdAmountData.rechargeAmountValue}`;
  574. this.achTimer = setInterval(() => {
  575. console.log('pay')
  576. if (win && win.closed) {
  577. console.log('done')
  578. clearInterval(this.achTimer);
  579. }
  580. }, 500);
  581. })
  582. },
  583. }
  584. }
  585. </script>
  586. <style lang="scss">
  587. html,
  588. body,
  589. #__nuxt,
  590. #__layout {
  591. width: 100%;
  592. height: 100%;
  593. padding: 0;
  594. margin: 0;
  595. overflow: hidden;
  596. }
  597. .payment {
  598. width: 100%;
  599. height: 100%;
  600. }
  601. .moneyInfo {
  602. display: flex;
  603. align-items: center;
  604. justify-content: center;
  605. flex-direction: column;
  606. height: 90px;
  607. border-bottom: solid 8px rgba($color: #f5f5f5, $alpha: .6);
  608. .tips {
  609. font-size: 12px;
  610. font-weight: 500;
  611. }
  612. .money {
  613. display: flex;
  614. align-items: center;
  615. justify-content: center;
  616. margin-top: 10px;
  617. .icon {
  618. overflow: hidden;
  619. width: 26px;
  620. height: 26px;
  621. border-radius: 50%;
  622. margin-right: 10px;
  623. vertical-align: middle;
  624. background-color: #f5f5f5;
  625. }
  626. .info {
  627. color: #000;
  628. font-size: 20px;
  629. font-weight: 700;
  630. &.usd {
  631. margin-top: -5px;
  632. }
  633. }
  634. }
  635. }
  636. .payList {
  637. overflow-y: auto;
  638. height: calc(100% - 90px);
  639. .detail {
  640. padding: 18px 16px;
  641. .title {
  642. color: #ADADAD;
  643. height: 26px;
  644. font-size: 12px;
  645. font-weight: 500;
  646. }
  647. .item {
  648. display: flex;
  649. align-items: center;
  650. justify-content: center;
  651. font-weight: 500;
  652. font-size: 16px;
  653. height: 50px;
  654. margin-bottom: 14px;
  655. border-radius: 100px;
  656. border: 1px solid #ECECEC;
  657. &:last-child {
  658. margin-bottom: 0;
  659. }
  660. img {
  661. width: 24px;
  662. height: 24px;
  663. margin-right: 4px;
  664. }
  665. &.denet {
  666. flex-direction: column;
  667. img {
  668. margin-top: -6px;
  669. }
  670. }
  671. .wallet {
  672. width: 100%;
  673. overflow: hidden;
  674. color: #ADADAD;
  675. font-size: 11px;
  676. text-align: center;
  677. margin-top: -2px;
  678. }
  679. }
  680. }
  681. }
  682. .loading {
  683. position: absolute;
  684. z-index: 3;
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. top: 0;
  689. left: 0;
  690. width: 100%;
  691. height: 100%;
  692. }
  693. .loadingBg {
  694. position: absolute;
  695. z-index: 2;
  696. top: 0;
  697. left: 0;
  698. width: 100%;
  699. height: 100%;
  700. background-color: rgba($color: #000, $alpha: .1);
  701. }
  702. .redeem {
  703. padding: 18px 16px 38px;
  704. .tips {
  705. height: 31px;
  706. font-size: 15px;
  707. font-weight: 500;
  708. }
  709. .footer {
  710. display: flex;
  711. justify-content: space-between;
  712. .input {
  713. display: flex;
  714. align-items: center;
  715. justify-content: center;
  716. width: calc(100% - 93px);
  717. height: 45px;
  718. border-radius: 5px;
  719. border: 1px solid #E0E0E0;
  720. input {
  721. width: 94%;
  722. border: 0;
  723. outline: 0;
  724. }
  725. }
  726. .enter {
  727. width: 83px;
  728. height: 45px;
  729. border: 0;
  730. color: #ffffff;
  731. font-size: 17px;
  732. font-weight: 500;
  733. border-radius: 5px;
  734. background: #1D9BF0;
  735. &.disabled {
  736. background: #DEDEDE;
  737. }
  738. }
  739. }
  740. }
  741. .payInfo {
  742. width: 100%;
  743. height: calc(100% - 88px);
  744. .picShow {
  745. padding: 54px 48px;
  746. .tip {
  747. height: 44px;
  748. font-size: 18px;
  749. font-weight: 600;
  750. text-align: center;
  751. }
  752. .pic {
  753. width: 280px;
  754. height: 280px;
  755. border-radius: 3px;
  756. margin-bottom: 20px;
  757. }
  758. .name {
  759. font-size: 18px;
  760. font-weight: 600;
  761. line-height: 21px;
  762. text-align: center;
  763. }
  764. }
  765. }
  766. .payBtn {
  767. padding: 0 16px 38px;
  768. .btn {
  769. width: 100%;
  770. height: 50px;
  771. color: #FFFFFF;
  772. font-size: 18px;
  773. font-weight: 700;
  774. border-radius: 50px;
  775. background: #1D9BF0;
  776. }
  777. }
  778. .balanceTop {
  779. display: flex;
  780. align-items: center;
  781. justify-content: center;
  782. flex-direction: column;
  783. height: calc(100% - 100px);
  784. background-color: #f5f5f5;
  785. .balance {
  786. width: 66px;
  787. height: 66px;
  788. margin-bottom: 6px;
  789. }
  790. .text {
  791. font-size: 15px;
  792. font-weight: 500;
  793. line-height: 18px;
  794. color: #9D9D9D;
  795. }
  796. .money {
  797. font-size: 22px;
  798. font-weight: 700;
  799. line-height: 26px;
  800. margin-top: 6px;
  801. .icon {
  802. width: 22px;
  803. height: 22px;
  804. margin-right: 6px;
  805. }
  806. .font {
  807. color: #000;
  808. }
  809. }
  810. }
  811. .balanceInfo {
  812. overflow-y: auto;
  813. height: calc(100% - 100px);
  814. background-color: #f5f5f5;
  815. .top {
  816. padding: 0 16px 17px 16px;
  817. background-color: #ffffff;
  818. .item {
  819. display: flex;
  820. align-items: center;
  821. height: 54px;
  822. border-bottom: solid 1px #F2F2F2;
  823. &.title {
  824. font-size: 16px;
  825. font-weight: 600;
  826. line-height: 19px;
  827. img {
  828. width: 26px;
  829. height: 26px;
  830. margin-right: 6px;
  831. }
  832. }
  833. &.column {
  834. color: rgba($color: #5E5E5E, $alpha: .7);
  835. font-size: 14px;
  836. font-weight: 400;
  837. .l {
  838. width: 70px;
  839. }
  840. .r {
  841. img {
  842. width: 21px;
  843. height: 21px;
  844. margin-right: 4px;
  845. }
  846. }
  847. }
  848. &.usd {
  849. font-size: 14px;
  850. font-weight: 500;
  851. justify-content: space-between;
  852. .fontPayment {
  853. font-size: 18px;
  854. font-weight: 600;
  855. }
  856. .font {
  857. color: #9A9A9A;
  858. font-size: 16px;
  859. font-weight: 500;
  860. }
  861. .fontDeposit {
  862. color: #1D9BF0;
  863. font-size: 18px;
  864. font-weight: 600;
  865. }
  866. }
  867. }
  868. .deposit {
  869. display: flex;
  870. align-items: center;
  871. justify-content: center;
  872. height: 54px;
  873. color: #ffffff;
  874. font-weight: 600;
  875. font-size: 18px;
  876. margin-top: 16px;
  877. border-radius: 54px;
  878. background: #1D9BF0;
  879. }
  880. .address {
  881. color: rgba($color: #5E5E5E, $alpha: .7);
  882. .title {
  883. height: 42px;
  884. font-size: 14px;
  885. font-weight: 400;
  886. line-height: 42px;
  887. }
  888. }
  889. .notice {
  890. display: flex;
  891. justify-content: space-between;
  892. padding: 10px;
  893. margin-top: 12px;
  894. border-radius: 8px;
  895. background: #F9F6EE;
  896. .icon {
  897. width: 20px;
  898. margin-right: 10px;
  899. img {
  900. width: 20px;
  901. height: 20px;
  902. }
  903. }
  904. .text {
  905. flex: 1;
  906. color: rgba($color: #5E5E5E, $alpha: .7);
  907. font-size: 14px;
  908. font-weight: 400;
  909. line-height: 19px;
  910. word-break: break-all;
  911. strong {
  912. color: #FF0000;
  913. font-weight: bold;
  914. }
  915. }
  916. }
  917. }
  918. .line {
  919. height: 8px;
  920. }
  921. .balance {
  922. display: flex;
  923. align-items: center;
  924. padding: 0 16px;
  925. height: 54px;
  926. background-color: #ffffff;
  927. .icon {
  928. width: 24px;
  929. margin-right: 6px;
  930. img {
  931. width: 24px;
  932. }
  933. }
  934. .text {
  935. flex: 1;
  936. font-size: 14px;
  937. font-weight: 500;
  938. line-height: 17px;
  939. }
  940. .refresh {
  941. width: 24px;
  942. height: 24px;
  943. img {
  944. width: 24px;
  945. transform-origin: center center;
  946. }
  947. }
  948. }
  949. }
  950. .balanceBot {
  951. display: flex;
  952. justify-content: space-between;
  953. width: 100%;
  954. padding: 17px 16px 38px;
  955. border-top: solid 1px #ECECEC;
  956. .l {
  957. display: flex;
  958. flex-direction: column;
  959. justify-content: center;
  960. }
  961. .neet {
  962. font-size: 12px;
  963. font-weight: 500;
  964. line-height: 14px;
  965. }
  966. .money {
  967. height: 22px;
  968. line-height: 22px;
  969. font-size: 18px;
  970. font-weight: 700;
  971. margin-top: 4px;
  972. .text {
  973. color: #000;
  974. margin-right: auto;
  975. }
  976. }
  977. .btn {
  978. display: flex;
  979. align-items: center;
  980. justify-content: center;
  981. width: 140px;
  982. height: 46px;
  983. color: #ffffff;
  984. font-size: 18px;
  985. font-weight: 700;
  986. line-height: 21px;
  987. border-radius: 46px;
  988. background: #1D9BF0;
  989. &.disabled {
  990. background: #D2D2D2;
  991. }
  992. }
  993. }
  994. .waitFont {
  995. margin-top: 16px;
  996. padding: 0 20px;
  997. font-size: 14px;
  998. font-weight: 500;
  999. line-height: 17px;
  1000. text-align: center;
  1001. }
  1002. .waitBtn {
  1003. display: flex;
  1004. align-items: center;
  1005. justify-content: center;
  1006. width: 50px;
  1007. height: 50px;
  1008. margin: 50px auto 0;
  1009. border-radius: 50%;
  1010. background-color: #ffffff;
  1011. img {
  1012. width: 24px;
  1013. height: 24px;
  1014. }
  1015. }
  1016. .icon-refresh-rotate {
  1017. transform: rotate(360deg);
  1018. transition-duration: 1s;
  1019. }
  1020. </style>