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

91 lines
2.4 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. <view class="section-header">
  37. <sectionHeader title="推荐产品" @showAll="jumpToRecommendNutrient"></sectionHeader>
  38. </view>
  39. <nutrientRecommendSwiper></nutrientRecommendSwiper>
  40. </view>
  41. <view class="section section-custom">
  42. <sectionHeader title="自选补剂" @showAll="jumpToCustomNutrient"></sectionHeader>
  43. <slot name="custom"></slot>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import sectionHeader from '../sectionHeader.vue'
  49. import nutrientRecommendSwiper from './nutrientRecommendSwiper.vue'
  50. export default {
  51. components: {
  52. sectionHeader,
  53. nutrientRecommendSwiper,
  54. },
  55. data() {
  56. return {
  57. keyword: '',
  58. }
  59. },
  60. mounted() {
  61. },
  62. methods: {
  63. // 搜素
  64. search() {
  65. uni.navigateTo({
  66. url: `/pages_order/product/productList?type=0&search=${this.keyword}&title=营养素`
  67. })
  68. // this.keyword = ''
  69. },
  70. jumpToRecommendNutrient() {
  71. uni.navigateTo({
  72. url: `/pages_order/product/productList?type=0&homeRecommend=Y&title=推荐产品`
  73. })
  74. },
  75. jumpToCustomNutrient() {
  76. uni.navigateTo({
  77. url: `/pages_order/product/productList?type=0&title=自选补剂`
  78. })
  79. },
  80. },
  81. }
  82. </script>
  83. <style scoped lang="scss">
  84. @import '../styles/tab.scss';
  85. </style>