collection.vue 3.1 KB

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