transfers.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="center">
  3. <view class="top">
  4. <view class="top-num">{{ jf }}</view>
  5. <view class="top-font">可转账购物积分</view>
  6. </view>
  7. <view class="main">
  8. <view class="main-font">收款人账户</view>
  9. <input class="main-input" type="text" value="" v-model="uid" placeholder="请输入收款人账户" placeholder-class="main-input" />
  10. </view>
  11. <view class="main">
  12. <view class="main-font">转账数量</view>
  13. <input class="main-input" type="text" value="" v-model="num" placeholder="请输入转账数量" placeholder-class="main-input" />
  14. </view>
  15. <view class="btn">
  16. 提交申请
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import { moneyLog, recharge, wallet } from '@/api/finance.js';
  22. export default {
  23. data() {
  24. return {
  25. jf: 0, //可转账购物积分
  26. uid: '', //收款人账户
  27. num: '' //转账数量
  28. };
  29. },
  30. onLoad() {
  31. wallet({}).then(({ data }) => {
  32. const obj = this
  33. const arr = Object.keys(data.back);
  34. console.log(arr);
  35. arr.forEach(e => {
  36. if(e == 'USDC'){
  37. obj.jf = (data.back[e].money.money*1)
  38. }
  39. });
  40. });
  41. }
  42. };
  43. </script>
  44. <style lang="scss">
  45. page,
  46. .center {
  47. background: #f2f3f5;
  48. height: 100%;
  49. }
  50. .top {
  51. margin-top: 20rpx;
  52. background: #ffffff;
  53. padding: 30rpx 0;
  54. text-align: center;
  55. .top-num {
  56. font-size: 42rpx;
  57. font-family: PingFang SC;
  58. font-weight: bold;
  59. color: #333333;
  60. }
  61. .top-font {
  62. font-size: 28rpx;
  63. font-family: PingFang SC;
  64. font-weight: 500;
  65. color: #666666;
  66. }
  67. }
  68. .main {
  69. padding: 36rpx 24rpx;
  70. background-color: #ffffff;
  71. margin-top: 20rpx;
  72. .main-font {
  73. font-size: 30rpx;
  74. font-family: PingFang SC;
  75. font-weight: 400;
  76. color: #333333;
  77. }
  78. .main-input {
  79. margin-top: 10rpx;
  80. font-size: 28rpx;
  81. font-family: PingFang SC;
  82. font-weight: 400;
  83. color: #999999;
  84. line-height: 110px;
  85. }
  86. }
  87. .btn {
  88. text-align: center;
  89. margin: 120rpx auto;
  90. width: 670rpx;
  91. height: 88rpx;
  92. background: linear-gradient(0deg, #2E58FF, #32C6FF);
  93. border-radius: 10px;
  94. text-align: center;
  95. line-height: 88rpx;
  96. font-size: 32rpx;
  97. font-family: SourceHanSansCN;
  98. font-weight: 500;
  99. color: #FEFEFE;
  100. }
  101. </style>