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

  1. <template>
  2. <view class="page__view">
  3. <navbar bgColor="#FFFFFF" >
  4. <view>
  5. <uv-tabs
  6. :current="current"
  7. :list="tabs"
  8. :activeStyle="{
  9. 'font-family': 'PingFang SC',
  10. 'font-weight': 600,
  11. 'font-size': '40rpx',
  12. 'line-height': 1.2,
  13. 'color': '#252545',
  14. }"
  15. :inactiveStyle="{
  16. 'font-family': 'PingFang SC',
  17. 'font-weight': 400,
  18. 'font-size': '32rpx',
  19. 'line-height': 1.5,
  20. 'color': '#A8A8A8',
  21. }"
  22. lineWidth="22rpx"
  23. lineHeight="4rpx"
  24. lineColor="#252545"
  25. @change="onTabChange"
  26. ></uv-tabs>
  27. </view>
  28. </navbar>
  29. <!-- 营养素 -->
  30. <tab-nutrient v-if="current == 0"></tab-nutrient>
  31. <!-- 检测 -->
  32. <tab-detect v-else-if="current == 1"></tab-detect>
  33. <!-- 课程 -->
  34. <tab-course v-else-if="current == 2"></tab-course>
  35. <tabber select="product" />
  36. </view>
  37. </template>
  38. <script>
  39. import tabber from '@/components/base/tabbar.vue'
  40. import tabNutrient from '@/pages_order/product/tabNutrient/index.vue'
  41. import tabDetect from '@/pages_order/product/tabDetect/index.vue'
  42. import tabCourse from '@/pages_order/product/tabCourse/index.vue'
  43. export default {
  44. components: {
  45. tabNutrient,
  46. tabDetect,
  47. tabCourse,
  48. tabber,
  49. },
  50. data() {
  51. return {
  52. tabs: [
  53. { name: '营养素' },
  54. { name: '检测' },
  55. { name: '课程' },
  56. ],
  57. current: 0,
  58. }
  59. },
  60. methods: {
  61. onTabChange(e) {
  62. console.log('current', e.index)
  63. this.current = e.index
  64. // todo
  65. },
  66. },
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .page__view {
  71. width: 100vw;
  72. min-height: 100vh;
  73. background-image: linear-gradient(#EAE5FF, #F3F2F7, #F3F2F7);
  74. position: relative;
  75. /deep/ .uv-tabs__wrapper__nav__line {
  76. border-radius: 2rpx;
  77. }
  78. }
  79. </style>