collection.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="content">
  3. <view class="collection-box">
  4. <view class="collection-item">
  5. <view class="left">
  6. <view class="img">
  7. <image src="../../static/user/mybank.png" mode=""></image>
  8. </view>
  9. <view class="bank">银行卡</view>
  10. </view>
  11. <view class="gg" @click="nav('/pages/collection/bank')">
  12. <view class="status" v-if="bankData.name != null">{{ bankData.name}}</view>
  13. <view class="status" v-else>未添加</view>
  14. <view class="img1"><text class="iconfont iconenter"></text></view>
  15. </view>
  16. </view>
  17. <view class="collection-item">
  18. <view class="left">
  19. <view class="img">
  20. <image src="../../static/user/zfb.png" mode=""></image>
  21. </view>
  22. <view class="bank">支付宝</view>
  23. </view>
  24. <view class="gg" @click="nav('/pages/collection/zfb')">
  25. <view class="status" v-if="aliData.name != null">{{aliData.name}}</view>
  26. <view class="status" v-else>未添加</view>
  27. <view class="img1"><text class="iconfont iconenter"></text></view>
  28. </view>
  29. </view>
  30. <view class="collection-item">
  31. <view class="left">
  32. <view class="img">
  33. <image src="../../static/icon/trc.png" mode=""></image>
  34. </view>
  35. <view class="bank">
  36. TRC20
  37. </view>
  38. </view>
  39. <view class="gg" @click="nav('/pages/collection/wx')">
  40. <view class="status" v-if="wx.payment != null">{{wx.payment}}</view>
  41. <view class="status" v-else>未添加</view>
  42. <view class="img1">
  43. <text class="iconfont iconenter"></text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import {
  52. mapState,
  53. mapMutations
  54. } from 'vuex';
  55. import {
  56. pay_list
  57. } from '../../api/wallet.js'
  58. export default {
  59. data() {
  60. return {
  61. aliData: {},
  62. bankData: {},
  63. wx: {},
  64. };
  65. },
  66. computed: {
  67. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
  68. },
  69. onShow() {
  70. this.loadDate();
  71. },
  72. methods: {
  73. nav(url) {
  74. uni.navigateTo({
  75. url
  76. });
  77. },
  78. loadDate() {
  79. pay_list().then(({
  80. data
  81. }) => {
  82. this.wx = data.wx
  83. this.aliData = data.zfb
  84. this.bankData = data.bank
  85. })
  86. }
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. page,
  92. .content {
  93. height: 100%;
  94. margin: 0;
  95. height: 0;
  96. }
  97. .collection-box {
  98. background: #ffffff;
  99. margin: 50rpx 20rpx;
  100. width: 710rpx;
  101. display: flex;
  102. flex-direction: column;
  103. .collection-item {
  104. margin: 35rpx 30rpx;
  105. display: flex;
  106. justify-content: space-between;
  107. .left {
  108. display: flex;
  109. .img {
  110. height: 40rpx;
  111. width: 40rpx;
  112. image {
  113. height: 100%;
  114. width: 100%;
  115. }
  116. }
  117. .bank {
  118. margin-left: 25rpx;
  119. font-size: 26rpx;
  120. font-family: PingFang SC;
  121. font-weight: 500;
  122. color: #333333;
  123. }
  124. }
  125. .gg {
  126. display: flex;
  127. .status {
  128. font-size: 26rpx;
  129. font-family: PingFang SC;
  130. font-weight: 500;
  131. color: #999999;
  132. margin-right: 20rpx;
  133. }
  134. .img1 {
  135. width: 15rpx;
  136. height: 25rpx;
  137. image {
  138. width: 100%;
  139. height: 100%;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. </style>