add:新增宠物、进度卡片组件页面
This commit is contained in:
1 parent
7d9a931b12
commit
cf82fb2d07
9 files changed
+61
-15
No files matched your search
Vendored
-1
@@ -7,7 +7,6 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
FeedStep: typeof import('./components/FeedStep.vue')['default']
|
|
||||||
TabBar: typeof import('./components/TabBar.vue')['default']
|
TabBar: typeof import('./components/TabBar.vue')['default']
|
||||||
TitleBar: typeof import('./components/TitleBar.vue')['default']
|
TitleBar: typeof import('./components/TitleBar.vue')['default']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,14 @@
|
|||||||
"path": "pages/pet-manual/index",
|
"path": "pages/pet-manual/index",
|
||||||
"type": "page"
|
"type": "page"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/feed-plan/components/FeedFlogan",
|
||||||
|
"type": "page"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/feed-plan/components/FeedStep",
|
||||||
|
"type": "page"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/pet-manual/components/CardList",
|
"path": "pages/pet-manual/components/CardList",
|
||||||
"type": "page"
|
"type": "page"
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import feedSlogan from '@/static/image/feed-plan/feed-slogan.png'
|
||||||
|
import ToolApi from '@/utils'
|
||||||
|
|
||||||
|
const safeBottomMenuHeight = ToolApi.getMenuButtonInfoHeight()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="w-screen fixed left-0" :style="{ bottom: `${safeBottomMenuHeight + 70}px` }">
|
||||||
|
<image :src="feedSlogan" class="w-[138px] h-[38px] mx-auto" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
File renamed without changes.
@@ -1,7 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import FeedStep from '@/components/FeedStep.vue'
|
import FeedFlogan from '@/pages/feed-plan/components/FeedFlogan.vue'
|
||||||
import feedSlogan from '@/static/image/feed-plan/feed-slogan.png'
|
import FeedStep from '@/pages/feed-plan/components/FeedStep.vue'
|
||||||
import feedTitle from '@/static/image/feed-plan/feed-title.png'
|
import feedTitle from '@/static/image/feed-plan/feed-title.png'
|
||||||
|
import back from '@/static/image/pet-parameters/back.png'
|
||||||
|
import cat from '@/static/image/pet-parameters/cat.png'
|
||||||
|
import dog from '@/static/image/pet-parameters/dog.png'
|
||||||
import ToolApi from '@/utils'
|
import ToolApi from '@/utils'
|
||||||
|
|
||||||
interface StepInfo {
|
interface StepInfo {
|
||||||
@@ -10,17 +13,20 @@ interface StepInfo {
|
|||||||
}
|
}
|
||||||
const titleName = ref<string>('喂养计算器')
|
const titleName = ref<string>('喂养计算器')
|
||||||
const safeHeight = ToolApi.getSafeHeight()
|
const safeHeight = ToolApi.getSafeHeight()
|
||||||
const safeBottomMenuHeight = ToolApi.getMenuButtonInfoHeight()
|
|
||||||
const stepInfo = ref<StepInfo[]>([
|
const stepInfo = ref<StepInfo[]>([
|
||||||
{ step: 1, title: '宠物基础信息' },
|
{ step: 1, title: '宠物基础信息' },
|
||||||
{ step: 2, title: '身体状态信息' },
|
{ step: 2, title: '身体状态信息' },
|
||||||
{ step: 3, title: '计算喂养计划' },
|
{ step: 3, title: '计算喂养计划' },
|
||||||
])
|
])
|
||||||
const controlFormDisplay = ref({
|
const controlFormDisplay = ref({
|
||||||
display1: true,
|
display1: false,
|
||||||
display2: false,
|
display2: false,
|
||||||
display3: false,
|
display3: true,
|
||||||
})
|
})
|
||||||
|
const animalCard = ref([
|
||||||
|
{ image: cat, name: '猫猫' },
|
||||||
|
{ image: dog, name: '狗狗' },
|
||||||
|
])
|
||||||
function handleReady() {
|
function handleReady() {
|
||||||
controlFormDisplay.value = {
|
controlFormDisplay.value = {
|
||||||
display1: false,
|
display1: false,
|
||||||
@@ -28,11 +34,9 @@ function handleReady() {
|
|||||||
display3: false,
|
display3: false,
|
||||||
}
|
}
|
||||||
controlFormDisplay.value.display2 = true
|
controlFormDisplay.value.display2 = true
|
||||||
const timerId: NodeJS.Timeout
|
setTimeout(() => {
|
||||||
timerId = setTimeout(() => {
|
|
||||||
controlFormDisplay.value.display2 = false
|
controlFormDisplay.value.display2 = false
|
||||||
controlFormDisplay.value.display3 = true
|
controlFormDisplay.value.display3 = true
|
||||||
clearTimeout(timerId)
|
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -48,22 +52,39 @@ function handleReady() {
|
|||||||
<view class="h-[121px] ml-15 mt-14">
|
<view class="h-[121px] ml-15 mt-14">
|
||||||
<FeedStep :list="stepInfo" />
|
<FeedStep :list="stepInfo" />
|
||||||
</view>
|
</view>
|
||||||
|
<FeedFlogan />
|
||||||
<view class="flex items-center justify-center">
|
<view class="flex items-center justify-center">
|
||||||
<button class="w-[176px] h-[47px] flex items-center justify-center bg-[#4545E5] border-none text-[white] rounded-3xl mt-[87px]" @tap="handleReady">
|
<button class="w-[176px] h-[47px] flex items-center justify-center bg-[#4545E5] border-none text-[white] rounded-3xl mt-[87px]" @tap="handleReady">
|
||||||
准备好了
|
准备好了
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="w-full fixed left-0" :style="{ bottom: `${safeBottomMenuHeight + 70}px` }">
|
|
||||||
<image :src="feedSlogan" class="w-[138px] h-[38px] mx-auto" />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-show="controlFormDisplay.display2" class="flex items-center justify-center w-full h-full">
|
<view v-show="controlFormDisplay.display2" class="flex items-center justify-center w-full h-full">
|
||||||
<FeedStep :list="stepInfo" :stage="stepInfo[0].step - 1" />
|
<FeedStep :list="stepInfo" :stage="stepInfo[0].step - 1" />
|
||||||
</view>
|
</view>
|
||||||
<view v-show="controlFormDisplay.display3">
|
<view v-show="controlFormDisplay.display3">
|
||||||
123
|
<view class="m-4 flex items-center">
|
||||||
|
<image :src="back" class="w-[6px] h-[10px]" />
|
||||||
|
<text class="text-[12px] font-pingfangsc ml-1">
|
||||||
|
返回
|
||||||
|
</text>
|
||||||
|
<view class="flex-1 h-[6px] bg-[#E7E7E7] ml-3 rounded relative">
|
||||||
|
<view class="absolute h-[6px] bg-[#0052D9] rounded" style="width: 80%" />
|
||||||
|
</view>
|
||||||
|
<text class="text-[12px] font-pingfangsc ml-3">
|
||||||
|
80%
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[69px] w-full flex justify-center items-center text-[20px] font-bold">
|
||||||
|
您的宠物是?
|
||||||
|
</view>
|
||||||
|
<view class="flex w-full justify-center items-center mt-[37px] gap-3">
|
||||||
|
<view v-for="(item, index) in animalCard" :key="index" class="w-[136px] h-[154px] bg-[white] rounded-lg flex justify-center">
|
||||||
|
<image v-if="index === 0" :src="animalCard[0].image" class="w-[76px] h-[69px] mt-[40px]" />
|
||||||
|
<image v-else :src="animalCard[1].image" class="w-[96px] h-[73px] mt-[35px]" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<FeedFlogan />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 285 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
Vendored
+2
@@ -8,6 +8,8 @@ interface NavigateToOptions {
|
|||||||
"/pages/home/index" |
|
"/pages/home/index" |
|
||||||
"/pages/me/index" |
|
"/pages/me/index" |
|
||||||
"/pages/pet-manual/index" |
|
"/pages/pet-manual/index" |
|
||||||
|
"/pages/feed-plan/components/FeedFlogan" |
|
||||||
|
"/pages/feed-plan/components/FeedStep" |
|
||||||
"/pages/pet-manual/components/CardList";
|
"/pages/pet-manual/components/CardList";
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|||||||
Reference in new issue
Block a user