Commit 1dc28651 authored by lg's avatar lg

chore: 修复无宝宝信息时点击报错的问题

parent 611aae83
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<image class="banner_cover" :src="$baseUrl + 'my/cover_white.png'" mode="aspectFill"/> <image class="banner_cover" :src="$baseUrl + 'my/cover_white.png'" mode="aspectFill"/>
</view> </view>
<button v-if="cfgStatus.isRegister" type="primary" class="phone-button" @click="clickRegisterShield"/> <button v-if="!cfgStatus.isRegister" type="primary" class="phone-button" @click="clickRegisterShield"/>
<!-- 用户信息区域 --> <!-- 用户信息区域 -->
<view class="user-info" :style="{ 'min-height': cfgStatus.showDetail ? '343rpx' : '180rpx' }"> <view class="user-info" :style="{ 'min-height': cfgStatus.showDetail ? '343rpx' : '180rpx' }">
...@@ -294,8 +294,6 @@ const handleToolClick = async (item) => { ...@@ -294,8 +294,6 @@ const handleToolClick = async (item) => {
// 编辑个人资料 // 编辑个人资料
const handleEditProfile = (e) => { const handleEditProfile = (e) => {
if ( if (
!cfgStatus.value.isRegister || !cfgStatus.value.isRegister ||
!userStore.userInfo || !userStore.userInfo ||
...@@ -312,12 +310,12 @@ const handleEditProfile = (e) => { ...@@ -312,12 +310,12 @@ const handleEditProfile = (e) => {
componentContent: "资料编辑" componentContent: "资料编辑"
}) })
const type = userStore.babyInfo?.allBabyBaseInfo?.length == 0 ? "add" : "edit"; const type = userStore.babyInfo?.allBabyBaseInfo?.length ? "edit" : "add";
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find(
(item) => item.selected
)?.id;
if (type === "edit") { if (type === "edit") {
babyId.value = userStore.babyInfo?.allBabyBaseInfo.find(
(item) => item.selected
)?.id;
navigateTo(`/pages/person/person?type=${type}&id=${babyId.value}`); navigateTo(`/pages/person/person?type=${type}&id=${babyId.value}`);
} else { } else {
navigateTo(`/pages/person/person?type=${type}`); 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