recharge备份.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="all padding-c-30 padding-v-30">
  3. <view class="top">
  4. <view class="topO"> {{$t('userinfo.u4')}} </view>
  5. <view class="topT flex-start padding-t-30">
  6. <view class="tt">USDT-TRC20</view>
  7. </view>
  8. <view class="topS flex-start">
  9. <view class="S">{{$t('userinfo.u1')}}</view>
  10. <view class="SS clamp padding-c-10">{{ address }}</view>
  11. <image class="SSS" src="/static/icon/cz.png" mode="" @click="copy(address)">
  12. </image>
  13. </view>
  14. <!-- 根据地址生成二维码 -->
  15. <view class="qr flex-center">
  16. <uqrcode h5DownloadName='myqrcode' ref="qrcode" canvas-id="qrcode" :value="address" size="240" sizeUnit='rpx'>
  17. </uqrcode>
  18. </view>
  19. <view class="last flex">
  20. <view class="le" @click="savePic">
  21. <view class="lef">{{$t('userinfo.u2')}}</view>
  22. </view>
  23. <view class="le" style="margin-left: 30rpx;">
  24. <view class="lef" @click="copy(address)">{{$t('userinfo.u3')}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="buttom">
  29. <view class="but">
  30. {{$t('userinfo.u5')}}
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. qianBao
  38. } from "@/api/wallet.js"
  39. export default {
  40. data() {
  41. return {
  42. address: '',
  43. qr:''
  44. };
  45. },
  46. mounted() {},
  47. onReady() {},
  48. onLoad() {
  49. uni.setNavigationBarTitle({
  50. title: this.$t("tab.a3"),
  51. });
  52. this.qianBao()
  53. },
  54. methods: {
  55. // 二维码地址
  56. async qianBao() {
  57. const res = await qianBao()
  58. this.address = res.data.back.USDT.money.address;
  59. },
  60. // 复制地址
  61. copy(value) {
  62. uni.setClipboardData({
  63. data: value,
  64. success: function() {
  65. //调用方法成功
  66. console.log("success");
  67. },
  68. });
  69. },
  70. savePic(Url) {
  71. this.$refs.qrcode.save({});
  72. },
  73. },
  74. };
  75. </script>
  76. <style lang="scss">
  77. .all {
  78. line-height: 1;
  79. color: #ffffff;
  80. }
  81. .top {
  82. padding: 40rpx 30rpx;
  83. background: #191a1f;
  84. border-radius: 20rpx;
  85. .topO {
  86. font-size: $font-lg;
  87. font-weight: bold;
  88. }
  89. .topT {
  90. .tt {
  91. padding: 20rpx 24rpx;
  92. border-radius: 10rpx;
  93. border: 2px solid #ddba82;
  94. font-size: 26rpx;
  95. font-weight: bold;
  96. color: #feb041;
  97. }
  98. }
  99. .topS {
  100. padding-top: 30rpx;
  101. .S {
  102. font-size: $font-lg;
  103. font-weight: bold;
  104. flex-shrink: 0;
  105. }
  106. .SS {
  107. font-size: $font-sm;
  108. flex-grow: 1;
  109. }
  110. .SSS {
  111. flex-shrink: 0;
  112. width: 29rpx;
  113. height: 29rpx;
  114. }
  115. }
  116. }
  117. .qr {
  118. margin: 0 auto;
  119. margin-top: 34rpx;
  120. width: 275rpx;
  121. height: 275rpx;
  122. background-color: #fff;
  123. }
  124. .last {
  125. margin-top: 50rpx;
  126. padding: 0 30rpx;
  127. .le {
  128. padding: 20rpx 0;
  129. width: 250rpx;
  130. border: 2px solid #DDBA82;
  131. text-align: center;
  132. border-radius: 10rpx;
  133. .lef {
  134. font-size: 26rpx;
  135. font-weight: bold;
  136. color: #FEB041;
  137. }
  138. }
  139. }
  140. .buttom {
  141. background: #191a1f;
  142. border-radius: 20rpx;
  143. margin-top: 30rpx;
  144. padding: 30rpx;
  145. .but {
  146. font-size: 26rpx;
  147. font-weight: 500;
  148. line-height: 45rpx;
  149. }
  150. }
  151. </style>