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

111 lines
2.2 KiB

1 year ago
  1. <template>
  2. <view class="pageBg">
  3. <view class="navBox">
  4. <view class="nav" v-for="(item,index) in navList" :key="index" @click="changeNav(item)" :class="{active: currentNav==item.id}">{{ item.text }}</view>
  5. </view>
  6. <view class="card">
  7. <view class="flex-b">
  8. <view class="name">匿名用户</view>
  9. <view class="date">2023/08/08</view>
  10. </view>
  11. <view class="starBox">
  12. <u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="4" disabled></u-rate>
  13. <view class="num">4.9</view>
  14. </view>
  15. <view class="text">教学质量高技术好超有耐心有责任心学车就找这个驾校教练都超好满意满意满意</view>
  16. <view class="imgBox">
  17. <view class="img">
  18. <image src="@/static/images/logo.png" mode=""></image>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. navList: [
  29. {text: '全部', id: 1},
  30. {text: '最新', id: 2},
  31. {text: '有图22', id: 3},
  32. {text: '有视频', id: 4},
  33. ],
  34. currentNav: 1,
  35. }
  36. },
  37. methods: {
  38. changeNav(item) {
  39. this.currentNav = item.id
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .pageBg {
  46. width: 100%;
  47. min-height: 100vh;
  48. padding: 0 28rpx;
  49. .navBox {
  50. padding: 32rpx 0 24rpx 0;
  51. display: flex;
  52. .nav {
  53. padding: 10rpx 24rpx;
  54. height: 60rpx;
  55. background: rgba(25,137,250,0.1);
  56. border-radius: 8rpx;
  57. border: 2rpx solid #1989FA;
  58. font-size: 28rpx;
  59. color: $themC;
  60. margin-right: 20rpx;
  61. text-align: center;
  62. &.active {
  63. color: #fff;
  64. background: $themC;
  65. }
  66. }
  67. }
  68. .card {
  69. width: 100%;
  70. padding: 24rpx 28rpx;
  71. margin-bottom: 20rpx;
  72. .flex-b {
  73. align-items: center;
  74. .name {
  75. font-weight: 600;
  76. font-size: 32rpx;
  77. color: #333;
  78. }
  79. .date {
  80. font-size: 24rpx;
  81. color: #686B73;
  82. }
  83. }
  84. .starBox {
  85. padding: 10rpx 0 24rpx 0;
  86. }
  87. .text {
  88. font-size: 24rpx;
  89. }
  90. .imgBox {
  91. display: flex;
  92. flex-wrap: wrap;
  93. padding-top: 20rpx;
  94. .img {
  95. margin-top: 20rpx;
  96. width: 160rpx;
  97. height: 160rpx;
  98. border-radius: 8rpx;
  99. overflow: hidden;
  100. margin-right: 24rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>