withdrawal.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view class="container">
  3. <view class="recharge">
  4. <view class="tplName">提币网络</view>
  5. <view class="tplNum">USDT-TRC20</view>
  6. <view class="tplName">提币地址</view>
  7. <view class="inputBox">
  8. <input class="input" type="text" v-model="address" placeholder="请输入提币地址" />
  9. </view>
  10. <view class="tplBox flex">
  11. <view class="tplName">提币数量</view>
  12. <view class="tplTip">可用{{dataMoney.money||0}}USDT</view>
  13. </view>
  14. <view class="inputBox flex">
  15. <input class="input" type="text" v-model="number" placeholder="请输入提币数量" />
  16. <view class="text" @click="number=dataMoney.money">USDT <text>全部</text></view>
  17. </view>
  18. <!-- <view class="free">手续费:0</view> -->
  19. </view>
  20. <view class="submission">
  21. <button class="golden" type="golden" hover-class="none" @click="submission">确认提币</button>
  22. </view>
  23. </view>
  24. </template>
  25. <script type="text/javascript">
  26. import {
  27. qianBao,extractCash
  28. } from '@/api/wallet.js';
  29. export default {
  30. data() {
  31. return {
  32. address: '',
  33. number: '',
  34. dataMoney: {},
  35. };
  36. },
  37. onLoad() {
  38. this.loadData();
  39. },
  40. methods: {
  41. //获取数据
  42. loadData() {
  43. const that = this;
  44. qianBao({})
  45. .then(res => {
  46. that.dataMoney = res.data.back.USDT.money
  47. that.dataMoney.money = +that.dataMoney.money
  48. that.val = that.dataMoney.address;
  49. console.log(that.dataMoney, 'dataMoney');
  50. })
  51. .catch(err => {
  52. console.log(err);
  53. });
  54. },
  55. //确认提交
  56. submission() {
  57. let obj = this;
  58. uni.showModal({
  59. title: '请输入支付密码',
  60. editable: true,
  61. success: res => {
  62. if (res.confirm) {
  63. uni.showLoading({
  64. title: '提交中。。。',
  65. mask: true
  66. });
  67. //确认提现调接口,成功跳转页面
  68. extractCash({
  69. address: obj.address,
  70. money: obj.number,
  71. money_type: "USDT",
  72. trade_psw: res.content
  73. })
  74. .then(function(e) {
  75. uni.showToast({
  76. title: '请耐心等待系统审核通过',
  77. duration: 1500,
  78. mask: false,
  79. icon: 'none'
  80. });
  81. obj.address = ''
  82. obj.number = ''
  83. uni.hideLoading();
  84. })
  85. .catch(function(e) {
  86. uni.hideLoading();
  87. console.log(e);
  88. });
  89. }
  90. },
  91. });
  92. },
  93. //上传图片
  94. scImg() {
  95. upload({
  96. file: ''
  97. }).then((e) => {
  98. console.log(e, 55)
  99. this.img = e[0].url;
  100. });
  101. },
  102. }
  103. };
  104. </script>
  105. <style lang="scss">
  106. .container {
  107. padding: 25rpx 25rpx;
  108. }
  109. .recharge {
  110. border-radius: 25rpx;
  111. background-color: #1F2A4A;
  112. padding: 37rpx 25rpx;
  113. .tplName {
  114. font-weight: bold;
  115. font-size: 32rpx;
  116. color: #FFFFFF;
  117. line-height: 24rpx;
  118. }
  119. .tplNum {
  120. margin: 40rpx 0rpx;
  121. padding: 15rpx 30rpx;
  122. border-radius: 10rpx;
  123. border: 1px solid #1356FF;
  124. font-size: 26rpx;
  125. color: #1356FF;
  126. display: inline-block;
  127. }
  128. .tplTip {
  129. font-size: 20rpx;
  130. color: #FFFFFF;
  131. }
  132. }
  133. .inputBox {
  134. background: #29314D;
  135. border-radius: 20rpx;
  136. margin: 30rpx 0rpx;
  137. padding: 0 25rpx;
  138. .input {
  139. height: 80rpx;
  140. line-height: 80rpx;
  141. color: #FFFFFF;
  142. }
  143. .text {
  144. font-family: PingFang SC;
  145. font-weight: 500;
  146. font-size: 26rpx;
  147. color: #FFFFFF;
  148. text {
  149. padding-left: 25rpx;
  150. }
  151. }
  152. }
  153. .free {
  154. font-family: PingFang SC;
  155. font-weight: 500;
  156. font-size: 30rpx;
  157. color: #1355F5;
  158. text-align: center;
  159. }
  160. .input-placeholder {
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. font-size: 26rpx;
  164. color: #797C8B;
  165. line-height: 24rpx;
  166. }
  167. .submission {
  168. padding: 80rpx 25rpx;
  169. padding-bottom: 25rpx;
  170. .golden {
  171. background: #0C5AFA;
  172. color: #ffffff;
  173. }
  174. }
  175. </style>