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

88 lines
2.3 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="intro">
  24. <image class="bg" src="@/pages_order/static/product/intro-bg.png" mode="heightFix"></image>
  25. <view class="content">
  26. <view class="font1">你是独一无二的</view>
  27. <view class="font2">你的健康数据也是</view>
  28. <view class="font3">普兆即精准</view>
  29. <button class="flex btn">
  30. <image class="btn-icon" src="@/pages_order/static/index/btn-icon.png" mode="widthFix"></image>
  31. <text>定制健康档案</text>
  32. </button>
  33. </view>
  34. </view>
  35. <view class="section">
  36. <sectionHeader title="推荐产品" @showAll="jumpToRecommendNutrient"></sectionHeader>
  37. <nutrientRecommendSwiper></nutrientRecommendSwiper>
  38. </view>
  39. <view class="section section-custom">
  40. <sectionHeader style="padding-bottom: 16rpx;" title="自选补剂" @showAll="jumpToCustomNutrient"></sectionHeader>
  41. <nutrientCustomView></nutrientCustomView>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import sectionHeader from '@/components/home/sectionHeader.vue'
  47. import nutrientRecommendSwiper from './nutrientRecommendSwiper.vue'
  48. import nutrientCustomView from './nutrientCustomView.vue'
  49. export default {
  50. components: {
  51. sectionHeader,
  52. nutrientRecommendSwiper,
  53. nutrientCustomView,
  54. },
  55. data() {
  56. return {
  57. keyword: '',
  58. }
  59. },
  60. mounted() {
  61. },
  62. methods: {
  63. // 搜素
  64. search() {
  65. // todo
  66. uni.navigateTo({
  67. url: '/pages/index/category?search=' + this.keyword
  68. })
  69. this.keyword = ''
  70. },
  71. jumpToRecommendNutrient() {
  72. // todo
  73. },
  74. jumpToCustomNutrient() {
  75. // todo
  76. },
  77. },
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. @import '../styles/tab.scss';
  82. </style>