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

124 lines
2.8 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" 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" @click="goPageSign(item)">报名</view>
  19. <view class="more" v-else @click="goPageDetail(item)">
  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;" v-if="coachList.length>20">
  28. <u-loadmore :status="status" />
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. props: ['showSign', 'coachList', 'status'],
  35. methods: {
  36. // 去详情
  37. goPageDetail(item) {
  38. let objStr = encodeURIComponent(JSON.stringify(item))
  39. this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
  40. },
  41. // 去报名
  42. goPageSign(item) {
  43. this.$store.commit('upDateSchoolClass', {})
  44. this.$store.commit('upDateSchoolCoach', item)
  45. this.$goPage('/pages/indexEntry/enroll/enroll')
  46. },
  47. handleImageError(item) {
  48. item.photoPath = require('@/static/images/index/avatar.png')
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .tabCon {
  55. width: 100%;
  56. .tab1 {
  57. width: 100%;
  58. .card {
  59. width: 100%;
  60. display: flex;
  61. align-items: center;
  62. padding: 36rpx;
  63. margin-top: 20rpx;
  64. .avatar {
  65. width: 100rpx;
  66. height: 98rpx;
  67. border-radius: 50%;
  68. margin-right: 34rpx;
  69. background-color: #f6f6f6;
  70. }
  71. .rightCon {
  72. flex: 1;
  73. width: 0;
  74. .flex {
  75. .name {
  76. font-size: 32rpx;
  77. color: #333;
  78. font-weight: 500;
  79. }
  80. .age {
  81. width: 142rpx;
  82. height: 40rpx;
  83. background: #E8F3FE;
  84. border-radius: 4rpx;
  85. color: $themC;
  86. text-align: center;
  87. line-height: 40rpx;
  88. margin-left: 24rpx;
  89. font-size: 24rpx;
  90. }
  91. }
  92. .flex-b {
  93. margin-top: 14rpx;
  94. .more {
  95. display: flex;
  96. align-items: center;
  97. .moreText {
  98. font-size: 24rpx;
  99. color: #686B73;
  100. margin-right: 10rpx;
  101. }
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108. .btn {
  109. width: 130rpx;
  110. height: 60rpx;
  111. background: #1989FA;
  112. border-radius: 8rpx;
  113. color: #fff;
  114. text-align: center;
  115. line-height: 60rpx;
  116. font-size: 28rpx;
  117. }
  118. </style>