credit_report.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="total-page page-box page-env-20 scroll_content task-bg">
  3. <Nav title="征信报告" :genre="1" is_fixed></Nav>
  4. <view class="header-filter">
  5. <view class="row-justify-sb center m-20">
  6. <view class="subsection">
  7. <uv-subsection :list="list" :bgColor="'#FFF'" :barBg="'#0FB160'" :activeColor="'#fff'"
  8. :inactiveColor="'#0FB160'" :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
  9. custom-item-style="border-radius: 30rpx;" :current="subCurrent"
  10. @change="onSubChange"></uv-subsection>
  11. </view>
  12. <view class="row credit_earch center sys-background-fff r-30 p-l16">
  13. <uni-icons type="search" size="18" color="#999"></uni-icons>
  14. <input class="flex m-l10 m-r20 size-28 sys-background-fff" type="text" placeholder="搜索姓名/电话"
  15. placeholder-style="font-size:28rpx;color:#999" v-model="value" />
  16. </view>
  17. </view>
  18. <view style="height: 100rpx;">
  19. <z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'28rpx'}"
  20. :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
  21. :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
  22. </view>
  23. </view>
  24. <EnScroll ref="scroll" :navHeight="navHeight" is_tabHeight @onRefresh="onRefresh"
  25. @onScrollBottom="onScrollBottom">
  26. <CreditItem></CreditItem>
  27. </EnScroll>
  28. <view class="fixed-button p-t20 p-lr30">
  29. <button class="en-button button-background sys-weight-500 row-justify-c center" type="default"
  30. hover-class="is-hover" @click="onSubmit">
  31. <image class="wh-36 m-lr16" src="/static/img/task/task-phone.png" mode="aspectFill"></image>
  32. 邀请客户添加征信报告
  33. </button>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import CreditItem from "./components/credit-item.vue";
  39. export default {
  40. components: {
  41. CreditItem,
  42. },
  43. data() {
  44. return {
  45. value: '',
  46. current: 0,
  47. navHeight: 0,
  48. swiperCurrent: 0,
  49. tabsList: [{
  50. name: '全部',
  51. dot_color: 'red',
  52. disabled: false,
  53. 'id': 0,
  54. }, {
  55. name: '待验证',
  56. dot_color: 'yellow',
  57. disabled: false,
  58. 'id': 6,
  59. }, {
  60. 'id': 1,
  61. name: '已通过',
  62. dot_color: '',
  63. disabled: false
  64. }, {
  65. 'id': 2,
  66. name: '已拒绝',
  67. dot_color: '',
  68. disabled: false
  69. }],
  70. subCurrent: 0,
  71. list: ['全部', '当日', '本周'],
  72. }
  73. },
  74. onReady() {
  75. this.getFilterHeight()
  76. },
  77. onLoad() {},
  78. mounted() {},
  79. methods: {
  80. tabsChange(index) {
  81. if (index !== this.current) {
  82. this.current = index;
  83. this.startList()
  84. }
  85. },
  86. onSubChange(current) {
  87. this.subCurrent = current
  88. },
  89. // 下拉刷新
  90. onRefresh() {
  91. console.log('下拉刷新');
  92. setTimeout(() => {
  93. this.$refs.scroll.onEndPulling()
  94. }, 500)
  95. },
  96. // 滚动到底部
  97. onScrollBottom() {
  98. console.log('滚动到底部');
  99. },
  100. getFilterHeight() {
  101. const query = uni.createSelectorQuery().in(this);
  102. query.select('.header-filter').boundingClientRect(data => {
  103. if (data) {
  104. console.log(data.height);
  105. this.navHeight = data.height
  106. }
  107. }).exec();
  108. }
  109. },
  110. }
  111. </script>
  112. <style lang="scss" scoped>
  113. .subsection {
  114. width: 430rpx;
  115. }
  116. .credit_earch {
  117. width: 250rpx;
  118. height: 69rpx;
  119. }
  120. .en-button {
  121. border: none;
  122. color: #fff;
  123. font-size: 30rpx;
  124. border: 1rpx solid #0FB160 !important;
  125. line-height: 80rpx;
  126. border-radius: 100rpx;
  127. background-color: #0FB160;
  128. }
  129. .fixed-button {
  130. position: fixed;
  131. bottom: 0;
  132. z-index: 10;
  133. background: #fff;
  134. width: calc(100% - 60rpx);
  135. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  136. }
  137. button::after {
  138. border: none;
  139. }
  140. </style>