withdrawal.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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
  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. cash({
  69. address: obj.address,
  70. money: obj.money,
  71. money_type: "",
  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. uni.hideLoading();
  82. })
  83. .catch(function(e) {
  84. uni.hideLoading();
  85. console.log(e);
  86. });
  87. }
  88. },
  89. });
  90. },
  91. //上传图片
  92. scImg() {
  93. upload({
  94. file: ''
  95. }).then((e) => {
  96. console.log(e, 55)
  97. this.img = e[0].url;
  98. });
  99. },
  100. }
  101. };
  102. </script>
  103. <style lang="scss">
  104. .container {
  105. padding: 25rpx 25rpx;
  106. }
  107. .recharge {
  108. border-radius: 25rpx;
  109. background-color: #1F2A4A;
  110. padding: 37rpx 25rpx;
  111. .tplName {
  112. font-weight: bold;
  113. font-size: 32rpx;
  114. color: #FFFFFF;
  115. line-height: 24rpx;
  116. }
  117. .tplNum {
  118. margin: 40rpx 0rpx;
  119. padding: 15rpx 30rpx;
  120. border-radius: 10rpx;
  121. border: 1px solid #1356FF;
  122. font-size: 26rpx;
  123. color: #1356FF;
  124. display: inline-block;
  125. }
  126. .tplTip {
  127. font-size: 20rpx;
  128. color: #FFFFFF;
  129. }
  130. }
  131. .inputBox {
  132. background: #29314D;
  133. border-radius: 20rpx;
  134. margin: 30rpx 0rpx;
  135. padding: 0 25rpx;
  136. .input {
  137. height: 80rpx;
  138. line-height: 80rpx;
  139. color: #FFFFFF;
  140. }
  141. .text {
  142. font-family: PingFang SC;
  143. font-weight: 500;
  144. font-size: 26rpx;
  145. color: #FFFFFF;
  146. text {
  147. padding-left: 25rpx;
  148. }
  149. }
  150. }
  151. .free {
  152. font-family: PingFang SC;
  153. font-weight: 500;
  154. font-size: 30rpx;
  155. color: #1355F5;
  156. text-align: center;
  157. }
  158. .input-placeholder {
  159. font-family: PingFang SC;
  160. font-weight: 500;
  161. font-size: 26rpx;
  162. color: #797C8B;
  163. line-height: 24rpx;
  164. }
  165. .submission {
  166. padding: 80rpx 25rpx;
  167. padding-bottom: 25rpx;
  168. .golden {
  169. background: #0C5AFA;
  170. color: #ffffff;
  171. }
  172. }
  173. </style>