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

85 lines
2.0 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. <!-- todo -->
  25. <sectionHeader :title="`直播 · 05月11日 12:00`" @showAll="jumpToLive"></sectionHeader>
  26. <view style="padding: 0 32rpx;">
  27. <courseLiveCard v-for="item in liveList" :key="item.id" :data="item"></courseLiveCard>
  28. </view>
  29. </view>
  30. <view class="section">
  31. <sectionHeader style="padding-bottom: 16rpx;" title="推荐课程" @showAll="jumpToRecommendCourse"></sectionHeader>
  32. <courseRecommendView></courseRecommendView>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import sectionHeader from '@/components/home/sectionHeader.vue'
  38. import courseLiveCard from './courseLiveCard.vue'
  39. import courseRecommendView from './courseRecommendView.vue'
  40. export default {
  41. components: {
  42. sectionHeader,
  43. courseLiveCard,
  44. courseRecommendView,
  45. },
  46. data() {
  47. return {
  48. keyword: '',
  49. liveList: [],
  50. }
  51. },
  52. mounted() {
  53. this.liveList = [
  54. {
  55. id: '001',
  56. url: '',
  57. startTime: '2025-07-25 19:30:00',
  58. },
  59. ]
  60. },
  61. methods: {
  62. // 搜素
  63. search() {
  64. // todo
  65. uni.navigateTo({
  66. url: '/pages/index/category?search=' + this.keyword
  67. })
  68. this.keyword = ''
  69. },
  70. jumpToLive() {
  71. // todo
  72. },
  73. jumpToRecommendCourse() {
  74. // todo
  75. },
  76. },
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. @import '../styles/tab.scss';
  81. </style>