工行这里学车报名流程h5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.1 KiB

  1. <template>
  2. <view class="main">
  3. <u-sticky>
  4. <view class="searchBox">
  5. <u-search placeholder="请输入教练姓名" v-model="params.coachName" :show-action="false" @search="searchFn"> </u-search>
  6. </view>
  7. </u-sticky>
  8. <view class="ul">
  9. <view class="li" v-for="(item,index) in list" :key="index" @click="chooseClick(item)">
  10. <view class="leftT">{{item.coachName}}</view>
  11. <view class="rigthT">{{item.mobilePhone}}</view>
  12. </view>
  13. </view>
  14. <u-loadmore :status="status" v-if="list.length>30" :icon-type="'flower'" />
  15. </view>
  16. </template>
  17. <script>
  18. import learnDrive from '@/api/learnDrive.js'
  19. export default {
  20. data() {
  21. return {
  22. keyword: '',
  23. trainingSchoolId: '',
  24. list: [],
  25. params: {
  26. pageIndex: 1,
  27. pageSize: 30,
  28. trainingSchoolId: ''
  29. },
  30. status: 'loadmore',
  31. }
  32. },
  33. onLoad(options) {
  34. this.params.trainingSchoolId = options.trainingSchoolId
  35. this.querySchoolCoachFn()
  36. },
  37. onReachBottom() {
  38. if(status=='nomore') return
  39. this.querySchoolCoachFn()
  40. },
  41. methods: {
  42. chooseClick(item) {
  43. // getApp().globalData.realAuthsuccee = item
  44. this.$store.commit('upDateCoachItem', item)
  45. uni.navigateBack()
  46. },
  47. searchFn() {
  48. this.list = []
  49. this.params.pageIndex = 1
  50. this.status = 'loadmore'
  51. this.querySchoolCoachFn()
  52. },
  53. // 获取教练
  54. async querySchoolCoachFn() {
  55. const [nulls, res] = await learnDrive.querySchoolCoach(this.params)
  56. this.list.push(...res.data)
  57. this.params.pageIndex ++
  58. if(res.data.length<this.params.pageSize) {
  59. this.status = 'nomore'
  60. }
  61. console.log('获取教练')
  62. console.log(res)
  63. },
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .main {
  69. background-color: #f8f8f8;
  70. .searchBox {
  71. background-color: #fff;
  72. padding: 16rpx 32rpx;
  73. }
  74. }
  75. .ul {
  76. width: 100%;
  77. border-bottom: 10rpx solid #f8f8f8;
  78. font-size: 30rpx;
  79. padding: 0 32rpx;
  80. color: #333333;
  81. background-color: #fff;
  82. .li {
  83. width: 100%;
  84. height: 98rpx;
  85. line-height: 98rpx;
  86. display: flex;
  87. font-size: 30rpx;
  88. justify-content: space-between;
  89. align-center: center;
  90. border-bottom: 1px solid #F5F7FA;
  91. }
  92. }
  93. </style>