Commit b3179047 authored by weishengfei's avatar weishengfei

refactor(calendar): 优化产检记录相关功能

- 修改孕期显示为孕中
- 优化产检记录列表点击事件,传递整个 item 对象
- 新增判断,避免跳转到新增产检记录的详情页面
- 修复个人资料编辑页面的宝宝 ID 传递问题
parent c9bb828c
......@@ -28,7 +28,7 @@
</view>
<view class="info-r">
<view class="info-r-t">
</view>
<view class="info-r-b">
怀孕{{ info.gestationalWeeks }}
......@@ -88,7 +88,7 @@
<text class="empty-text">当日暂无记录</text>
</view>
<view class="con-list-item" v-for="(item, index) in todayRecords" :key="index"
@click="onDetails(item.id)">
@click="onDetails(item)">
<view class="item-time">
<view class="">
第{{ item.index }}次产检
......@@ -389,7 +389,10 @@ const getProject = (projects) => {
}
// 跳转产检详情页面
const onDetails = (id) => {
const onDetails = (item) => {
const { id, type } = item
// 如果是新增的就不跳转
if(type === '1') return
uni.navigateTo({
url: `/pages/productionDetails/productionDetails?id=${id}`
})
......
......@@ -353,7 +353,7 @@ const handleEditProfile = (e) => {
)?.id;
if (type === "edit") {
navigateTo(`/pages/person/person?type=${type}&id=${babyId}`);
navigateTo(`/pages/person/person?type=${type}&id=${babyId.value}`);
} else {
navigateTo(`/pages/person/person?type=${type}`);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment