index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <script setup lang="ts">
  2. import FeedStep from '@/components/FeedStep.vue'
  3. import feedSlogan from '@/static/image/feed-plan/feed-slogan.png'
  4. import feedTitle from '@/static/image/feed-plan/feed-title.png'
  5. import ToolApi from '@/utils'
  6. interface StepInfo {
  7. step: number
  8. title: string
  9. }
  10. const titleName = ref<string>('喂养计算器')
  11. const safeHeight = ToolApi.getSafeHeight()
  12. const safeBottomMenuHeight = ToolApi.getMenuButtonInfoHeight()
  13. const stepInfo = ref<StepInfo[]>([
  14. { step: 1, title: '宠物基础信息' },
  15. { step: 2, title: '身体状态信息' },
  16. { step: 3, title: '计算喂养计划' },
  17. ])
  18. </script>
  19. <template>
  20. <TitleBar :title-name="titleName" />
  21. <view class="flex flex-col bg-[#F5F6F7] overflow-y-auto" :style="`height:calc(100vh - ${safeHeight}px)`">
  22. <view class="w-[273px] h-[125px] mx-auto mt-[105px]">
  23. <image :src="feedTitle" class="w-full h-full" />
  24. </view>
  25. <view class="h-[121px] ml-15 mt-14">
  26. <FeedStep :list="stepInfo" />
  27. </view>
  28. <view class="mx-auto">
  29. <button class="w-[176px] h-[47px] flex items-center justify-center bg-[#4545E5] border-none text-[white] rounded-3xl mt-[87px]">
  30. 准备好了
  31. </button>
  32. </view>
  33. <view class="w-full fixed left-0" :style="{ bottom: `${safeBottomMenuHeight + 70}px` }">
  34. <image :src="feedSlogan" class="w-[138px] h-[38px] mx-auto" />
  35. </view>
  36. </view>
  37. </template>
  38. <style scoped>
  39. </style>