Files
frontend-uniapp/src/pages/start-filing/index.vue
T
2025-01-20 08:01:53 +08:00

59 lines
2.2 KiB
Vue

<script setup lang="ts">
import PickerItem from '@/components/PickerItem.vue'
import FeedSlogan from '@/pages/feed-questionnaire/components/FeedSlogan.vue'
import edit from '@/static/image/start-filing/edit.png'
import { useFeedingPlanStore } from '@/stores/feeding-plan'
import ToolApi from '@/utils'
const safeHeight = ToolApi.getSafeHeight()
const feedSloganBottom = ref<number>(13)
function handleNext() {
uni.navigateTo({ url: '/pages/feed-questionnaire/index' })
}
const { pet, petTypeOptions, genderOptions } = useFeedingPlanStore()
</script>
<template>
<view class="flex flex-col bg-[#F5F6F7] overflow-y-auto" :style="`height:calc(100vh - ${safeHeight}px)`">
<view class="w-[80px] h-[80px] rounded-full bg-[#D9D9D9] relative mt-[88px] mx-auto">
<view class="absolute right-1 bottom-1 w-[18px] h-[18px] bg-[#0052D9] rounded-full flex items-center justify-center">
<image :src="edit" class="w-[10px] h-[10px]" />
</view>
</view>
<view class="w-full px-4 flex flex-col gap-4 mt-[28px]">
<CellGroup class="w-full bg-[#fff] shadow-cell-group rounded-3 overflow-hidden">
<Cell title="宠物名称">
<PopupInput v-model="pet.name" placeholder="请输入宠物名称" />
</Cell>
</CellGroup>
<CellGroup class="w-full bg-[#fff] shadow-cell-group rounded-3 overflow-hidden">
<Cell title="品种" border>
<PickerItem v-model="pet.type" :options="petTypeOptions" />
</Cell>
<Cell title="性别" border>
<PickerItem v-model="pet.gender" :options="genderOptions" />
</Cell>
<Cell title="出生日期" border>
<PickerDate v-model="pet.birthday" />
</Cell>
<Cell title="体重">
<PopupInput v-model="pet.weight" placeholder="请输入宠物体重" suffix="kg" />
</Cell>
</CellGroup>
</view>
<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-[58px]" @tap="handleNext">
下一题
</button>
</view>
<FeedSlogan :bottom="feedSloganBottom" />
</view>
</template>
<style scoped>
</style>