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

120 lines
2.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="tabCon">
  3. <view class="tab1">
  4. <view class="card" @click="goPage(item)" v-for="(item,index) in coachList" :key="index">
  5. <view class="avatar">
  6. <image :src="item.photoPath" mode="" @error="handleImageError(item)"></image>
  7. </view>
  8. <view class="rightCon">
  9. <view class="flex">
  10. <view class="name">{{ item.name }}</view>
  11. <!-- <view class="age">10年教龄</view> -->
  12. </view>
  13. <view class="flex-b">
  14. <view class="starBox">
  15. <u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" disabled style="pointer-events: none;"></u-rate>
  16. <view class="num">{{item.stars}}</view>
  17. </view>
  18. <view class="btn" v-if="showSign">报名</view>
  19. <view class="more" v-else>
  20. <view class="moreText">查看详情</view>
  21. <u-icon name="arrow-right"></u-icon>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view style="padding-bottom: 20rpx;">
  28. <u-loadmore :status="status" />
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. props: ['showSign', 'coachList', 'status'],
  35. methods: {
  36. goPage(item) {
  37. if(this.showSign) {
  38. }else {
  39. this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?coachId='+ item.id)
  40. }
  41. },
  42. handleImageError(item) {
  43. item.photoPath = require('@/static/images/index/avatar.png')
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .tabCon {
  50. width: 100%;
  51. .tab1 {
  52. width: 100%;
  53. .card {
  54. width: 100%;
  55. display: flex;
  56. align-items: center;
  57. padding: 36rpx;
  58. margin-top: 20rpx;
  59. .avatar {
  60. width: 100rpx;
  61. height: 98rpx;
  62. border-radius: 50%;
  63. margin-right: 34rpx;
  64. background-color: #f6f6f6;
  65. }
  66. .rightCon {
  67. flex: 1;
  68. width: 0;
  69. .flex {
  70. .name {
  71. font-size: 32rpx;
  72. color: #333;
  73. font-weight: 500;
  74. }
  75. .age {
  76. width: 142rpx;
  77. height: 40rpx;
  78. background: #E8F3FE;
  79. border-radius: 4rpx;
  80. color: $themC;
  81. text-align: center;
  82. line-height: 40rpx;
  83. margin-left: 24rpx;
  84. font-size: 24rpx;
  85. }
  86. }
  87. .flex-b {
  88. margin-top: 14rpx;
  89. .more {
  90. display: flex;
  91. align-items: center;
  92. .moreText {
  93. font-size: 24rpx;
  94. color: #686B73;
  95. margin-right: 10rpx;
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. .btn {
  104. width: 130rpx;
  105. height: 60rpx;
  106. background: #1989FA;
  107. border-radius: 8rpx;
  108. color: #fff;
  109. text-align: center;
  110. line-height: 60rpx;
  111. font-size: 28rpx;
  112. }
  113. </style>