alipay_set.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="page">
  3. <view class="content">
  4. <view class="list" v-if="list.length">
  5. <view class="item" v-for="(item,index) in list">
  6. <view class="left-img">
  7. <view class="circle">
  8. <image src="../../../static/theme/default/my/alipay.png" class="left-img-img"></image>
  9. </view>
  10. </view>
  11. <view class="right-text">
  12. <text class="right-text-name">{{item.bank_name}}</text>
  13. <text class="right-text-info">{{item.account}}</text>
  14. </view>
  15. <view class="right-icon">
  16. <uni-icons :size="20" class="uni-icon-wrapper" color="white" type="arrowright" />
  17. </view>
  18. </view>
  19. </view>
  20. <button class="withdraw" type="button" @tap="goPath('../set/add_account')">添加支付宝账号</button>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import uniIcons from '../../../components/uni-ui/uni-icon/uni-icon'
  26. import _get from '../../../common/_get';
  27. import _hook from '../../../common/_hook';
  28. export default {
  29. data() {
  30. return {
  31. list:[]
  32. }
  33. },
  34. components:{
  35. uniIcons
  36. },
  37. onShow(){
  38. _hook.routeSonHook();
  39. this.getUserbankList();
  40. uni.$on("update_bank_list_data",this.updateBankList)
  41. },
  42. methods: {
  43. goPath(path){
  44. if(path){
  45. uni.navigateTo({
  46. url: path
  47. });
  48. }
  49. },
  50. updateBankList(bank){
  51. console.log(bank)
  52. return bank && this.list.concat([{'bank_name':bank.bank_name,'account':bank.account,'id':bank.id}])
  53. },
  54. getUserbankList(){
  55. let _this = this;
  56. _get.getUserbankList({},function (data) {
  57. _this.list = data;
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style>
  64. page{
  65. background-color: #f2f2f2;
  66. }
  67. .right-icon{
  68. position: absolute;
  69. right: 20upx;
  70. }
  71. .left-img{
  72. margin-left: 35upx;
  73. display: flex;
  74. justify-content: center;
  75. align-items: center;
  76. }
  77. .item .right-text{
  78. display: flex;
  79. flex-direction: column;
  80. color: white;
  81. font-size: 16px;
  82. font-weight: 400;
  83. margin-left: 20upx;
  84. }
  85. .left-img-img{
  86. width: 85upx;
  87. height: 85upx;
  88. }
  89. .left-img .circle{
  90. height: 100upx;
  91. width: 100upx;
  92. border-radius: 10px;
  93. background-color: white;
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. }
  98. .list{
  99. padding: 0 30upx;
  100. }
  101. .list .item{
  102. height: 200upx;
  103. border-radius: 15upx;
  104. display: flex;
  105. background-color: #498cc0;
  106. flex-direction: row;
  107. position: relative;
  108. align-items: center;
  109. margin: 20rpx 0;
  110. }
  111. .content .withdraw{
  112. width: 92%;
  113. background-color: #5693ee;
  114. color: white;
  115. height: 70upx;
  116. line-height: 70upx !important;
  117. border-radius: 40upx;
  118. font-size: 36upx;
  119. cursor: pointer;
  120. margin-top: 20upx;
  121. }
  122. @font-face {font-family: "eosfont";
  123. src: url('https://at.alicdn.com/t/font_943490_fdgw8vjcnhp.ttf') format('truetype');
  124. }
  125. .eosfont {
  126. font-family:"eosfont" !important;
  127. font-size:16px;
  128. font-style:normal;
  129. -webkit-font-smoothing: antialiased;
  130. -moz-osx-font-smoothing: grayscale;
  131. }
  132. </style>