card-sus-list.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="container card clearfix">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <template v-else>
  11. <view class="card-title">
  12. <view class="card-tabs" @click="handleCurrent(1)">
  13. <view class="card-tabs-text" :class="{ current : current === 1 }">借记卡</view>
  14. </view>
  15. <view class="card-tabs" @click="handleCurrent(2)">
  16. <view class="card-tabs-text" :class="{ current : current === 2 }">贷记卡</view>
  17. </view>
  18. </view>
  19. <view class="card-content">
  20. <view class="list" v-for="(item, index) in list" :key="index">
  21. <view class="list-pin">{{ item.initial }}</view>
  22. <view class="list-card">
  23. <view class="list-card-item" v-for="(card, index) in item.banks" :key="index">
  24. <view class="logo"><image :src="'https://static.caimei365.com/app/img/pay/icon_'+card.bankCode+'_@2x.png'"></image></view>
  25. <view class="name">
  26. <text>{{ card.bankName }}</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. StaticUrl: this.$Static,
  40. isIphoneX:this.$store.state.isIphoneX,
  41. skeletonShow:true,
  42. current:1,
  43. listQuery: {
  44. cardType: 1, // 页数
  45. },
  46. list: []
  47. }
  48. },
  49. onLoad() {
  50. this.getQuickBankInfos()
  51. },
  52. filters: {},
  53. methods: {
  54. async getQuickBankInfos() {
  55. //获取余额明细数据列表
  56. try {
  57. const res = await this.PayService.getQuickBankInfos(this.listQuery)
  58. console.log('res',res)
  59. this.list = res.data
  60. setTimeout(() => {
  61. this.skeletonShow = false
  62. }, 1000)
  63. } catch (error) {
  64. console.log(error)
  65. }
  66. },
  67. handleCurrent(index){
  68. // tabs 切换
  69. this.current = this.listQuery.cardType = index
  70. this.getQuickBankInfos()
  71. }
  72. },
  73. onReachBottom() {
  74. if (this.hasNextPage) {
  75. this.loadding = true
  76. this.pullUpOn = true
  77. this.GetOnReachBottomData()
  78. }
  79. },
  80. onPullDownRefresh() {
  81. //下拉刷新
  82. this.listQuery.pageNum = 1
  83. this.GetAccountInitData()
  84. uni.stopPullDownRefresh()
  85. },
  86. onShow() {
  87. // this.beansList = []
  88. }
  89. }
  90. </script>
  91. <style lang="scss">
  92. page,
  93. .container {
  94. background: #ffffff;
  95. height: 100%;
  96. }
  97. .card-title {
  98. width: 100%;
  99. height: 100rpx;
  100. .card-tabs{
  101. width: 50%;
  102. height: 100%;
  103. float: left;
  104. .card-tabs-text{
  105. width: 100rpx;
  106. line-height: 96rpx;
  107. margin: 0 auto;
  108. font-size: $font-size-32;
  109. color: #333;
  110. font-weight: bold;
  111. box-sizing: border-box;
  112. border-bottom: 2px solid #ffffff;
  113. &.current{
  114. color: #F3B574;
  115. border-color: #F3B574;
  116. }
  117. }
  118. }
  119. }
  120. .card-content {
  121. width: 100%;
  122. height: auto;
  123. box-sizing: border-box;
  124. .list {
  125. width: 100%;
  126. height: auto;
  127. box-sizing: border-box;
  128. position: relative;
  129. .list-pin{
  130. width: 100%;
  131. line-height: 48rpx;
  132. box-sizing: border-box;
  133. padding-left: 47rpx;
  134. background-color: #F7F7F7;
  135. font-size: 28rpx;
  136. color: #333;
  137. float: left;
  138. }
  139. .list-card{
  140. width: 100%;
  141. height: auto;
  142. box-sizing: border-box;
  143. position: relative;
  144. padding: 0 32rpx;
  145. float: left;
  146. .list-card-item{
  147. width: 100%;
  148. height: 100rpx;
  149. box-sizing: border-box;
  150. padding: 20rpx 0;
  151. border-bottom: 1px solid #E1E1E1;
  152. &:last-child{
  153. border-bottom: none;
  154. }
  155. .logo{
  156. width: 60rpx;
  157. height: 60rpx;
  158. margin-right: 34rpx;
  159. float: left;
  160. border-radius: 50%;
  161. image{
  162. width: 60rpx;
  163. height: 60rpx;
  164. border-radius: 50%;
  165. display: block;
  166. }
  167. }
  168. .name{
  169. line-height: 60rpx;
  170. font-size: 28rpx;
  171. color: #333;
  172. }
  173. }
  174. }
  175. }
  176. }
  177. .tui-popup-box {
  178. position: relative;
  179. box-sizing: border-box;
  180. min-height: 100rpx;
  181. padding: 6rpx 24rpx;
  182. .tui-popup-content {
  183. padding-top: 30rpx;
  184. }
  185. }
  186. .tui-popup-btn {
  187. width: 100%;
  188. height: auto;
  189. float: left;
  190. box-sizing: border-box;
  191. margin-top: 30rpx;
  192. .tui-button {
  193. width: 600rpx;
  194. height: 88rpx;
  195. background: $btn-confirm;
  196. line-height: 88rpx;
  197. text-align: center;
  198. color: #ffffff;
  199. font-size: $font-size-28;
  200. border-radius: 44rpx;
  201. margin: 0 auto;
  202. }
  203. }
  204. </style>