普兆健康管家前端代码仓库
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.

105 lines
2.7 KiB

  1. <template>
  2. <view>
  3. <!-- 搜索栏 -->
  4. <view class="search">
  5. <uv-search
  6. v-model="keyword"
  7. placeholder="请输入要查询的内容"
  8. placeholderColor="#C6C6C6"
  9. searchIconColor="#8B8B8B"
  10. :searchIconSize="40"
  11. :inputStyle="{
  12. 'font-family': 'PingFang SC',
  13. 'font-weight': 400,
  14. 'font-size': '28rpx',
  15. 'line-height': 1.4,
  16. 'padding': '12rpx 0',
  17. }"
  18. bgColor="#fff"
  19. :showAction="false"
  20. @search="search"
  21. ></uv-search>
  22. </view>
  23. <view class="section">
  24. <view class="section-header">
  25. <!-- todo -->
  26. <sectionHeader :title="`直播 · 05月11日 12:00`" @showAll="jumpToLive"></sectionHeader>
  27. </view>
  28. <view style="padding: 0 32rpx;">
  29. <courseLiveCard v-for="item in liveList" :key="item.id" :data="item"></courseLiveCard>
  30. </view>
  31. </view>
  32. <!-- <view class="section">
  33. <sectionHeader title="推荐课程" @showAll="jumpToRecommendCourse"></sectionHeader>
  34. <courseRecommendView></courseRecommendView>
  35. </view> -->
  36. <!-- todo: check -->
  37. <view class="section section-custom">
  38. <sectionHeader title="推荐课程" @showAll="jumpToRecommendCourse"></sectionHeader>
  39. <!-- <sectionHeader title="自选课程" @showAll="jumpToCustomCourse"></sectionHeader> -->
  40. <slot name="custom"></slot>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import sectionHeader from '../sectionHeader.vue'
  46. import courseLiveCard from './courseLiveCard.vue'
  47. import courseRecommendView from './courseRecommendView.vue'
  48. export default {
  49. components: {
  50. sectionHeader,
  51. courseLiveCard,
  52. courseRecommendView,
  53. },
  54. data() {
  55. return {
  56. keyword: '',
  57. liveList: [],
  58. }
  59. },
  60. mounted() {
  61. this.liveList = [
  62. {
  63. id: '001',
  64. url: '',
  65. startTime: '2025-07-25 19:30:00',
  66. },
  67. ]
  68. },
  69. methods: {
  70. // 搜素
  71. search() {
  72. // todo: check
  73. uni.navigateTo({
  74. url: `/pages_order/product/productList?type=2&search=${this.keyword}&title=课程`
  75. })
  76. // this.keyword = ''
  77. },
  78. jumpToLive() {
  79. // todo
  80. uni.navigateTo({
  81. url: `/pages_order/product/productList?type=2&title=直播`
  82. })
  83. },
  84. jumpToRecommendCourse() {
  85. // todo
  86. uni.navigateTo({
  87. url: `/pages_order/product/productList?type=2&title=推荐课程`
  88. })
  89. },
  90. jumpToCustomCourse() {
  91. // todo
  92. uni.navigateTo({
  93. url: `/pages_order/product/productList?type=2&title=自选课程`
  94. })
  95. },
  96. },
  97. }
  98. </script>
  99. <style scoped lang="scss">
  100. @import '../styles/tab.scss';
  101. </style>