collection.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view class="container">
  3. <view class="recharge">
  4. <view class="infoBox">
  5. <view class="tplName">链名称</view>
  6. <view class="tplNum">USDT-TRC20</view>
  7. <view class="tplAddr">收款地址<text>{{val}}</text></view>
  8. </view>
  9. <view class="code">
  10. <image :src="er_code" mode=""></image>
  11. <!-- #ifdef H5 || APP-PLUS -->
  12. <zb-code ref="qrcode" :show="codeShow" :cid="cid" :val="val" :size="size" :unit="unit"
  13. :background="background" :foreground="foreground" :pdground="pdground" :icon="codeIcon"
  14. :iconSize="iconsize" :onval="onval" :loadMake="loadMake" @result="qrR" />
  15. <!-- #endif -->
  16. </view>
  17. <view class="flex btnBox">
  18. <!-- #ifdef APP -->
  19. <view class="btn margin-r-30" @click="domImage">保存相册</view>
  20. <!-- #endif -->
  21. <view class="btn" @click="copy">复制地址</view>
  22. </view>
  23. </view>
  24. <view class="login_text">
  25. <view class="tip">
  26. <view>
  27. <text>
  28. 该地址仅支持 USDT-TRC20 收款请勿用于其他币种,否则资产将不可找回</br>
  29. 从易趣付之外地址转入的资金,需要在完成交易的120分钟后,才能将资产转账给易币付其他用户或提到钱包以外的地址 最小收款金额:
  30. 0.0001USDT小于最小金额的收款将不会上账且无法退回1次网络确认后可到账,1次网络确认后可转账。您的充值地址不会经常改变,可截图保存并重复充值。
  31. </text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script type="text/javascript">
  38. import {
  39. copyText
  40. } from '@/utils/rocessor.js';
  41. import {
  42. mapState,
  43. } from 'vuex';
  44. export default {
  45. data() {
  46. return {
  47. dataMoney: {},
  48. list: '',
  49. account: '',
  50. money: '',
  51. address: '',
  52. er_code: '23456',
  53. remark: '',
  54. img: '/static/image/img19.png',
  55. val: "", // 要生成的二维码值
  56. size: 200, // 二维码大小
  57. unit: 'upx', // 单位
  58. background: '#FFF', // 背景色
  59. foreground: '#000', // 前景色
  60. pdground: '#000', // 角标色
  61. icon: '', // 二维码图标
  62. iconsize: 40, // 二维码图标大小
  63. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  64. onval: true, // val值变化时自动重新生成二维码
  65. loadMake: true, // 组件加载完成后自动生成二维码
  66. src: '', // 二维码生成后的图片地址或base64
  67. codeShow: false,
  68. cid: '1',
  69. codeIcon: '', // 二维码图标
  70. };
  71. },
  72. onLoad() {
  73. this.val = this.userInfo.uid;
  74. console.log(this.userInfo,'this.userInfo');
  75. },
  76. computed: {
  77. ...mapState('user', ['userInfo']),
  78. },
  79. methods: {
  80. // 下载图片
  81. domImage(){
  82. uni.downloadFile({
  83. url:this.er_code,
  84. success(re){
  85. console.log(re.tempFilePath,'re');
  86. uni.showToast({
  87. title: '下载成功'
  88. });
  89. }
  90. })
  91. },
  92. // 复制地址
  93. copy(){
  94. copyText(this.dataMoney.address)
  95. },
  96. // 二维码生成
  97. qrR(res) {
  98. this.er_code = res;
  99. },
  100. //获取数据
  101. loadData() {
  102. const that = this;
  103. qianBao({}).then(
  104. (res) => {
  105. that.dataMoney = res.data.back.USDT.money
  106. that.val = that.dataMoney.address;
  107. console.log(that.dataMoney, 'dataMoney');
  108. }
  109. ).catch(
  110. (res) => {
  111. console.log(res,'err');
  112. }
  113. )
  114. },
  115. }
  116. };
  117. </script>
  118. <style lang="scss">
  119. /* page {
  120. min-height: 100%;
  121. background: linear-gradient(-28deg, rgba(44, 45, 53, 1), rgba(59, 62, 74, 1));
  122. } */
  123. .container {
  124. padding: 25rpx 25rpx;
  125. }
  126. .body_content {
  127. width: 100%;
  128. height: 100%;
  129. }
  130. .login_text {
  131. width: 100%;
  132. color: #fff !important;
  133. font-size: 28rpx !important;
  134. background-color: #1F2A4A;
  135. margin: 25rpx 0rpx;
  136. padding: 0rpx 25rpx;
  137. padding-bottom: 15rpx;
  138. border-radius: 25rpx;
  139. }
  140. .recharge {
  141. text-align: center;
  142. color: #85858e;
  143. font-size: 30rpx;
  144. border-radius: 25rpx;
  145. background-color: #1F2A4A;
  146. }
  147. .example-title {
  148. text-align: left !important;
  149. padding: 25rpx 25rpx;
  150. border-bottom: 2rpx solid #2F364E;
  151. color: #0C5AFA;
  152. .titleTip {
  153. width: 5rpx;
  154. height: 30rpx;
  155. background: linear-gradient(90deg, #0C5AFA, #1356FF);
  156. border-radius: 3rpx;
  157. margin-right: 15rpx;
  158. }
  159. }
  160. .infoBox {
  161. text-align: left;
  162. padding: 28rpx 51rpx;
  163. .tplName {
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. font-size: 32rpx;
  167. color: #FFFFFF;
  168. line-height: 24rpx;
  169. }
  170. .tplNum {
  171. margin: 30rpx 0rpx;
  172. padding: 15rpx 30rpx;
  173. border-radius: 10rpx;
  174. border: 1px solid #1356FF;
  175. font-family: PingFang SC;
  176. font-size: 26rpx;
  177. color: #1356FF;
  178. display: inline-block;
  179. }
  180. .tplAddr {
  181. color: #fff;
  182. font-size: 32rpx;
  183. text {
  184. padding-left: 15rpx;
  185. font-size: 26rpx;
  186. color: #FFFFFF;
  187. }
  188. }
  189. }
  190. .login_input {
  191. border-bottom: 1px solid #464755;
  192. padding: 35rpx;
  193. }
  194. .uni-input {
  195. width: 100%;
  196. text-align: left !important;
  197. }
  198. .code {
  199. width: 277rpx;
  200. height: 277rpx;
  201. margin: 25rpx auto;
  202. margin-bottom: 35rpx;
  203. background: #0C5AFA;
  204. }
  205. .code image {
  206. width: 100%;
  207. height: 100%;
  208. }
  209. .btnBox {
  210. justify-content: center;
  211. padding-bottom: 50rpx;
  212. padding-top: 30rpx;
  213. .btn {
  214. font-family: PingFang SC;
  215. font-weight: bold;
  216. font-size: 26rpx;
  217. color: #0C5AFA;
  218. border: 1rpx solid #0C5AFA;
  219. padding: 15rpx 45rpx;
  220. border-radius: 15rpx;
  221. }
  222. }
  223. .submission {
  224. padding: 30rpx 25rpx;
  225. .golden {
  226. background: #0C5AFA;
  227. color: #fff;
  228. }
  229. }
  230. .login_name {
  231. width: 480rpx;
  232. color: #ffffff;
  233. }
  234. .login_name image {
  235. width: 100rpx;
  236. height: 100rpx;
  237. }
  238. .tip {
  239. padding: 29rpx 31rpx;
  240. line-height: 55rpx;
  241. font-size: 24rpx;
  242. }
  243. .select_img {
  244. width: 28rpx;
  245. height: 32rpx;
  246. }
  247. .select_img image {
  248. width: 100%;
  249. height: 100%;
  250. }
  251. .scann {
  252. margin-bottom: 35rpx;
  253. margin-top: 15rpx;
  254. }
  255. .scanning {
  256. background-color: #6f6f78;
  257. color: #ffffff;
  258. padding: 10rpx 30rpx;
  259. border-radius: 15rpx;
  260. font-size: 28rpx;
  261. }
  262. .address_code {
  263. padding: 25rpx 0rpx;
  264. color: #ffffff;
  265. }
  266. .input-placeholder {
  267. color: #fff !important;
  268. }
  269. </style>