select-bank.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="margin-20">
  3. <u-radio-group v-model="radio" active-color="#ff9447" size="40">
  4. <view @click="radio=item.id" v-for="(item,index) in bankList" :key="index" class="bank" v-if="!$isEmpty(bankList)">
  5. <view class="left center">
  6. <image :src="'/static/bank/'+item.bankCode+'.png'" mode=""></image>
  7. <view class="content">
  8. <text>{{item.bankName}}</text>
  9. <text>{{item.accountNo}}</text>
  10. </view>
  11. </view>
  12. <view class="center">
  13. <u-radio :name="item.id"></u-radio>
  14. </view>
  15. </view>
  16. </u-radio-group>
  17. <view class="">
  18. <view class="" style="height: 120rpx;"></view>
  19. <view style="background-color: #FFFFFF ;height: 120rpx;" class="footer-fixed center">
  20. <view @click="confirm" class="cu-btn df btn-bg-color radius " style="width: 86%;height: 80rpx;">
  21. <text>确认</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. name: '',
  30. data() {
  31. return {
  32. bankList: [],
  33. radio: ''
  34. };
  35. },
  36. onLoad() {
  37. this.fetchCardList()
  38. },
  39. methods: {
  40. fetchCardList() {
  41. let params = {
  42. merchantNo: this.vuex_merchantNo
  43. }
  44. this.$api.yeepay.withdrawCardQuery(params).then(res => {
  45. let result = JSON.parse(res.data.result)
  46. this.bankList = result.bankCardAccountList
  47. this.radio = this.bankList[0].id
  48. })
  49. },
  50. confirm(){
  51. let bank= this.bankList.filter(item=>item.id==this.radio)[0]
  52. let params={
  53. bank
  54. }
  55. this.$util.backWithParams(params)
  56. }
  57. }
  58. };
  59. </script>
  60. <style lang="scss" scoped>
  61. .bank {
  62. margin-bottom: 20rpx;
  63. border-radius: 20rpx;
  64. background-color: #FFFFFF;
  65. padding: 44rpx;
  66. display: flex;
  67. justify-content: space-between;
  68. .left {
  69. display: flex;
  70. image {
  71. width: 90rpx;
  72. height: 90rpx;
  73. margin-right: 20rpx;
  74. }
  75. .content {
  76. display: flex;
  77. flex-direction: column;
  78. text:first-child {
  79. color: #252525;
  80. font-weight: 800;
  81. font-size: 34rpx;
  82. }
  83. text:last-child {
  84. margin-top: 15rpx;
  85. color: #888888;
  86. font-size: 26rpx;
  87. }
  88. }
  89. }
  90. }
  91. .card_add {}
  92. .submit-btn {
  93. background-color: #EE9230;
  94. color: #FFFFFF;
  95. border-radius: 10rpx;
  96. }
  97. </style>