学员端小程序
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.

101 lines
1.8 KiB

  1. <template>
  2. <!-- 选择驾校弹出框 -->
  3. <view class="box">
  4. <view class="schoolTit">
  5. 选择驾校
  6. </view>
  7. <view class="searchBox">
  8. <u-search placeholder="请输入驾校名称" v-model.trim="keyword" @search="searchSchool" @custom="searchSchool">
  9. </u-search>
  10. </view>
  11. <scroll-view scroll-y="true" style="height: calc(100% - 180rpx);" @scrolltolower="loadMore">
  12. <view class="ul">
  13. <view class="li" v-for="(item,index) in list" :key="index" @click="chooseSchool(item)">
  14. <view class="name">
  15. {{item.schoolName}}
  16. </view>
  17. <view class="starText">
  18. {{item.starLevel}}
  19. </view>
  20. <!-- <view class="distance">
  21. {{ $u.utils.distanceFn(item.distance)}}
  22. </view> -->
  23. </view>
  24. </view>
  25. <u-loadmore :status="status" icon-type="circle" />
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. keyword: '',
  34. status: 'loadmore',
  35. list: [
  36. {schoolName: '翔力驾校',starLevel: 5, }
  37. ]
  38. }
  39. },
  40. methods: {
  41. // 选择驾校
  42. chooseSchool(item) {
  43. this.$emit('chooseSchool', item)
  44. },
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .schoolTit {
  50. line-height: 90rpx;
  51. text-align: center;
  52. font-size: 28rpx;
  53. }
  54. .searchBox {
  55. width: 100%;
  56. padding: 0 20rpx 20rpx 20rpx;
  57. border-bottom: 1rpx solid #ededed;
  58. }
  59. .ul {
  60. width: 100%;
  61. padding: 0 20rpx;
  62. .li {
  63. width: 100%;
  64. display: flex;
  65. align-items: center;
  66. height: 90rpx;
  67. font-size: 24rpx;
  68. border-bottom: 1rpx solid #ededed;
  69. &:last-child {
  70. border: none;
  71. }
  72. .name {
  73. width: 0;
  74. flex: 1;
  75. font-size: 28rpx;
  76. }
  77. .starText {
  78. color: red;
  79. width: 100rpx;
  80. text-align: right;
  81. flex-shrink: 0;
  82. white-space: nowrap;
  83. }
  84. .distance {
  85. width: 120rpx;
  86. text-align: right;
  87. flex-shrink: 0;
  88. white-space: nowrap;
  89. }
  90. }
  91. }
  92. </style>