card-sus-list.vue 4.0 KB

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