Commit 2f99e2c5 authored by 张九刚's avatar 张九刚

feat: backuo

parent cfa344ec
...@@ -17,9 +17,9 @@ const { ...@@ -17,9 +17,9 @@ const {
// 通常可以吧 baseUrl 单独放在一个 js 文件了 // 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall"; // const baseUrl = "http://172.16.230.108:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境 // const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
let baseUrl = "https://momclub.feihe.com/pmall";//生产环境 // let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock // const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall" const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const request = (options = {}) => { const request = (options = {}) => {
// 在这里可以对请求头进行一些设置 // 在这里可以对请求头进行一些设置
......
...@@ -4,68 +4,45 @@ ...@@ -4,68 +4,45 @@
<!-- 弹窗头部 --> <!-- 弹窗头部 -->
<view class="popup-header"> <view class="popup-header">
<text class="popup-title">切换宝宝</text> <text class="popup-title">切换宝宝</text>
<image <image class="close-btn" :src="`${$baseUrl}shengzhangTool/1001/changeBaby/closeBtn.png`"
class="close-btn" mode="aspectFit" @click="closePopup" />
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/closeBtn.png`"
mode="aspectFit"
@click="closePopup"
/>
</view> </view>
<!-- 宝宝列表 --> <!-- 宝宝列表 -->
<view class="baby-list"> <view class="baby-list">
<view <view v-for="(baby, index) in babyList" :key="index" class="baby-item"
v-for="(baby, index) in babyList" :class="{ selected: selectIndex === index }" @click="selectBaby(index)">
:key="index"
class="baby-item"
:class="{ selected: selectIndex === index }"
@click="selectBaby(index)"
>
<!-- 选中背景 --> <!-- 选中背景 -->
<image <image v-if="selectIndex === index" class="baby-item-bg"
v-if="selectIndex === index" :src="`${$baseUrl}shengzhangTool/1001/changeBaby/babyItemBg.png`" mode="aspectFit" />
class="baby-item-bg"
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/babyItemBg.png`"
mode="aspectFit"
/>
<!-- 宝宝头像 --> <!-- 宝宝头像 -->
<image <image class="baby-avatar"
class="baby-avatar" :src="baby.babyAvatar || `https://course.feihe.com/momclub-picture/common/default_avatar.png`"
:src="baby.babyAvatar || `https://course.feihe.com/momclub-picture/common/default_avatar.png`" mode="aspectFill" />
mode="aspectFill"
/>
<!-- 宝宝信息 --> <!-- 宝宝信息 -->
<view class="baby-info"> <view class="baby-info">
<view class="baby-name-row"> <view class="baby-name-row">
<text class="baby-name">{{ baby.babyName }}</text> <text class="baby-name">{{ baby.babyName }}</text>
<image <image class="gender-icon"
class="gender-icon" :src="baby.babyGender === 'M' ? `${$baseUrl}shengzhangTool/1001/sex1.png` : `${$baseUrl}shengzhangTool/1001/sex0.png`"
:src="baby.babyGender === 'M' ? `${$baseUrl}shengzhangTool/1001/sex1.png` : `${$baseUrl}shengzhangTool/1001/sex0.png`" mode="aspectFit" />
mode="aspectFit"
/>
</view> </view>
<text class="baby-birthday">宝宝生日: {{ baby.babyBirthday }}</text> <text class="baby-birthday">宝宝生日: {{ baby.babyBirthday }}</text>
</view> </view>
</view> </view>
</view> </view>
<image <image class="ok-btn" :class="{ 'ok-btn-active': isOkPressed }"
class="ok-btn" :src="`${$baseUrl}shengzhangTool/1001/changeBaby/okBtn.png`" @touchstart="handleOkTouchStart"
:class="{'ok-btn-active': isOkPressed}" @touchend="handleOkTouchEnd" mode="aspectFit"></image>
:src="`${$baseUrl}shengzhangTool/1001/changeBaby/okBtn.png`"
@touchstart="handleOkTouchStart"
@touchend="handleOkTouchEnd"
mode="aspectFit"
></image>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { ref, defineEmits, defineProps, onMounted } from 'vue' import { ref, defineEmits, defineProps, onMounted, watch } from 'vue'
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
import md from '../md.js' import md from '../md.js'
...@@ -91,12 +68,13 @@ const props = defineProps({ ...@@ -91,12 +68,13 @@ const props = defineProps({
} }
}) })
const userStore = useUserStore(); const userStore = useUserStore();
const emit = defineEmits(['update:visible', 'update:selectedIndex', 'change']) const emit = defineEmits(['update:visible', 'update:selectedIndex', 'change'])
const selectHandle = () => { const selectHandle = () => {
} }
const isOkPressed = ref(false) const isOkPressed = ref(false)
...@@ -145,9 +123,10 @@ const selectBaby = (index) => { ...@@ -145,9 +123,10 @@ const selectBaby = (index) => {
} }
const babyList = ref([]); const babyList = ref([]);
onMounted(() => { const initListData = () => {
babyList.value = (userStore.babyInfo?.allBabyBaseInfo || []).filter(tem => tem.babyStage === 2); babyList.value = (userStore.babyInfo?.allBabyBaseInfo || []).filter(tem => tem.babyStage === 2);
if(babyList.value === null){ if (babyList.value === null) {
babyList.value = []; babyList.value = [];
} }
...@@ -159,6 +138,16 @@ onMounted(() => { ...@@ -159,6 +138,16 @@ onMounted(() => {
toolName: "生长曲线", toolName: "生长曲线",
popName: "切换宝宝弹窗" popName: "切换宝宝弹窗"
}); });
}
watch(() => props.visible, (val, oldVal) => {
if (val && !oldVal) {
// 打开的时候更新数据
initListData();
}
}, { immediate: true })
onMounted(() => {
initListData();
}) })
...@@ -192,13 +181,13 @@ onMounted(() => { ...@@ -192,13 +181,13 @@ onMounted(() => {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 40rpx 30rpx 20rpx; padding: 40rpx 30rpx 20rpx;
.popup-title { .popup-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
.close-btn { .close-btn {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
...@@ -223,11 +212,11 @@ onMounted(() => { ...@@ -223,11 +212,11 @@ onMounted(() => {
height: 129rpx; height: 129rpx;
border-radius: 16rpx; border-radius: 16rpx;
background-color: #fff; background-color: #fff;
&.selected { &.selected {
background-color: transparent; background-color: transparent;
} }
.baby-item-bg { .baby-item-bg {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -238,7 +227,7 @@ onMounted(() => { ...@@ -238,7 +227,7 @@ onMounted(() => {
height: 100%; height: 100%;
z-index: 1; z-index: 1;
} }
.baby-avatar { .baby-avatar {
position: relative; position: relative;
z-index: 2; z-index: 2;
...@@ -247,30 +236,30 @@ onMounted(() => { ...@@ -247,30 +236,30 @@ onMounted(() => {
border-radius: 50%; border-radius: 50%;
margin-right: 20rpx; margin-right: 20rpx;
} }
.baby-info { .baby-info {
position: relative; position: relative;
z-index: 2; z-index: 2;
flex: 1; flex: 1;
.baby-name-row { .baby-name-row {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 8rpx; margin-bottom: 8rpx;
.baby-name { .baby-name {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-right: 10rpx; margin-right: 10rpx;
} }
.gender-icon { .gender-icon {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
} }
} }
.baby-birthday { .baby-birthday {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
...@@ -285,6 +274,7 @@ onMounted(() => { ...@@ -285,6 +274,7 @@ onMounted(() => {
height: 98rpx; height: 98rpx;
margin-left: 35rpx; margin-left: 35rpx;
margin-top: 0rpx; margin-top: 0rpx;
&.ok-btn-active { &.ok-btn-active {
transform: scale(0.95); transform: scale(0.95);
} }
...@@ -292,12 +282,4 @@ onMounted(() => { ...@@ -292,12 +282,4 @@ onMounted(() => {
} }
} }
</style> </style>
\ No newline at end of file
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
</template> </template>
</view> </view>
<view class="form-btn" @click="onAdd"> <view class="form-btn" @click="onAdd">
<image v-if="isType == '0' || isType == '2'" :src="`${$baseUrl}chanjianTool/1001/icon23.png`"></image> <image v-if="isType == '0' || isType == '2'" :src="`${$baseUrl}chanjianTool/1001/icon23.png`"></image>
<template v-if="type == '1'"> <template v-if="type == '1'">
...@@ -43,6 +44,8 @@ ...@@ -43,6 +44,8 @@
<template v-if="type == '2'"> <template v-if="type == '2'">
{{ isType == '0' ? '添加状态' : isType == '3' ? '我知道了' : isType == '1' ? '切换状态' : '修改状态' }} {{ isType == '0' ? '添加状态' : isType == '3' ? '我知道了' : isType == '1' ? '切换状态' : '修改状态' }}
</template> </template>
<button v-if="isNotLogin" type="primary" class="phone-button" open-type="getPhoneNumber"
@getphonenumber="getRealtimePhoneNumber" />
</view> </view>
</view> </view>
</view> </view>
...@@ -53,7 +56,8 @@ import { ...@@ -53,7 +56,8 @@ import {
ref, ref,
onMounted, onMounted,
computed, computed,
defineEmits defineEmits,
watch
} from 'vue' } from 'vue'
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
// 接受父组件参数 // 接受父组件参数
...@@ -61,6 +65,10 @@ const props = defineProps({ ...@@ -61,6 +65,10 @@ const props = defineProps({
type: { type: {
type: String, type: String,
default: '1', // 1 非宝宝状态 2 非孕中状态 default: '1', // 1 非宝宝状态 2 非孕中状态
},
isNotLogin: {
type: Boolean,
default: false //是否未登录
} }
}) })
// 用户信息 // 用户信息
...@@ -68,7 +76,7 @@ const userStore = useUserStore(); ...@@ -68,7 +76,7 @@ const userStore = useUserStore();
const babyInfo = ref(userStore.babyInfo) const babyInfo = ref(userStore.babyInfo)
// 回调函数 // 回调函数
const emit = defineEmits([ 'statusChange', 'close']) const emit = defineEmits(['statusChange', 'close'])
const isType = ref('0') // 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限 const isType = ref('0') // 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限
...@@ -77,18 +85,18 @@ const babyBaseId = ref('') ...@@ -77,18 +85,18 @@ const babyBaseId = ref('')
// 产检信息 // 产检信息
const pregnancyStatus = computed(() => { const pregnancyStatus = computed(() => {
return isType.value == '0' ? '新增孕中' return isType.value == '0' ? '新增孕中'
: isType.value == '1' ? '切换孕中' : isType.value == '1' ? '切换孕中'
: isType.value == '2' ? '修改备孕' : isType.value == '2' ? '修改备孕'
: ''; : '';
}) })
// 生长曲线和喂养记录 // 生长曲线和喂养记录
const babyStatus = computed(() => { const babyStatus = computed(() => {
return isType.value == '0' ? '新增宝宝' return isType.value == '0' ? '新增宝宝'
: isType.value == '1' ? '切换宝宝' : isType.value == '1' ? '切换宝宝'
: isType.value == '2' ? (babyInfo.value.babyStage == 0 ? '修改备孕' : : isType.value == '2' ? (babyInfo.value.babyStage == 0 ? '修改备孕' :
babyInfo.value.babyStage == 1 ? '修改孕中' : '') babyInfo.value.babyStage == 1 ? '修改孕中' : '')
: ''; : '';
}) })
// 跳转新增宝宝状态页面 // 跳转新增宝宝状态页面
const navigateToFn = () => { const navigateToFn = () => {
...@@ -98,12 +106,30 @@ const navigateToFn = () => { ...@@ -98,12 +106,30 @@ const navigateToFn = () => {
url: `/pages/person/person?type=${type}` url: `/pages/person/person?type=${type}`
}) })
} }
const getRealtimePhoneNumber = async (e) => {
console.log("获取手机号码", e);
if (e.detail.errMsg !== "getPhoneNumber:ok") {
uni.showToast({
title: "请授权使用手机号",
icon: "none",
});
return;
}
await userStore.phoneCallback(e.detail, () => { }, () => {
emit('afterPhone') //如果没有宝宝信息,页面中处理宝宝注册信息
});
console.log("closeclosecloseclose");
emit('close')
emit('statusChange') //借用这个事件,刷新下页面数据
};
// 切换状态 需要对应的宝宝id 直接请求接口 // 切换状态 需要对应的宝宝id 直接请求接口
const switchState = async () => { const switchState = async () => {
console.log('切换状态', babyBaseId.value) console.log('切换状态', babyBaseId.value)
await userStore.changeBabySelected(babyBaseId.value); await userStore.changeBabySelected(babyBaseId.value);
// 发送事件 通知主页面 // 发送事件 通知主页面
emit('statusChange') emit('statusChange')
} }
// 修改状态 需要对应备胎的id 跳转到编辑页面 // 修改状态 需要对应备胎的id 跳转到编辑页面
...@@ -117,8 +143,12 @@ const modifyState = async () => { ...@@ -117,8 +143,12 @@ const modifyState = async () => {
url: `/pages/person/person?type=${type}&id=${babyBaseId.value}` url: `/pages/person/person?type=${type}&id=${babyBaseId.value}`
}) })
} }
//这里新增一下未登录的情况,点击事件直接去拉起手机号授权
// 跳转新增产检页面 // 跳转新增产检页面
const onAdd = () => { const onAdd = () => {
if (props.isNotLogin == true) {
return;
}
// 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限 // 0 添加状态或者宝宝 1 切换状态 2 修改状态 3 宝宝已达上限
switch (isType.value) { switch (isType.value) {
case '0': case '0':
...@@ -138,10 +168,14 @@ const onAdd = () => { ...@@ -138,10 +168,14 @@ const onAdd = () => {
} }
} }
onMounted(() => { onMounted(async () => {
if (props.isNotLogin) {
await userStore.wxAutoLogin();
}
// 宝宝生长测试和喂养记录 // 宝宝生长测试和喂养记录
console.log('babyInfo-获取宝宝', babyInfo.value) console.log('babyInfo-获取宝宝', babyInfo.value)
const babyBaseInfo = babyInfo.value.allBabyBaseInfo const babyBaseInfo = babyInfo?.value?.allBabyBaseInfo
console.log("🚀 ~ babyBaseInfo:", babyBaseInfo) console.log("🚀 ~ babyBaseInfo:", babyBaseInfo)
// 有宝宝状态 // 有宝宝状态
if (babyBaseInfo) { if (babyBaseInfo) {
...@@ -168,7 +202,7 @@ onMounted(() => { ...@@ -168,7 +202,7 @@ onMounted(() => {
// } // }
babyBaseId.value = babyInfo.value.content.id; babyBaseId.value = babyInfo.value.content.id;
isType.value = '2'; isType.value = '2';
} }
} }
// 产检提醒 // 产检提醒
...@@ -205,14 +239,14 @@ onMounted(() => { ...@@ -205,14 +239,14 @@ onMounted(() => {
// 如果找到符合条件的 baby,取出它的 id 并赋值 // 如果找到符合条件的 baby,取出它的 id 并赋值
babyBaseId.value = stageOneBaby.id; babyBaseId.value = stageOneBaby.id;
} else { // 修改 } else { // 修改
console.log('没有找到符合条件的 baby', babyInfo.value); console.log('没有找到符合条件的 baby', babyInfo.value);
// // 判断没有备孕的状态 // // 判断没有备孕的状态
// if (!babyBaseInfo.some(baby => baby.babyStage == 0)) { // if (!babyBaseInfo.some(baby => baby.babyStage == 0)) {
// isType.value = '0' // isType.value = '0'
// } else { // } else {
// const stageZeroBaby = babyBaseInfo.find(baby => baby.babyStage == 0); // const stageZeroBaby = babyBaseInfo.find(baby => baby.babyStage == 0);
babyBaseId.value = babyInfo.value.content.id; babyBaseId.value = babyInfo.value.content.id;
isType.value = '2'; isType.value = '2';
// } // }
} }
...@@ -319,11 +353,19 @@ onMounted(() => { ...@@ -319,11 +353,19 @@ onMounted(() => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 55rpx; margin-top: 55rpx;
position: relative;
image { image {
width: 42rpx; width: 42rpx;
height: 42rpx; height: 42rpx;
margin-right: 12rpx; margin-right: 12rpx;
} }
.phone-button {
width: 100%;
height: 100%;
position: absolute;
opacity: 0;
}
} }
</style> </style>
\ No newline at end of file
...@@ -6,7 +6,7 @@ const init = (SENSORS_URL) => { ...@@ -6,7 +6,7 @@ const init = (SENSORS_URL) => {
sensors.setPara({ sensors.setPara({
name: "sensors", name: "sensors",
server_url: SENSORS_URL, server_url: SENSORS_URL,
show_log: true, show_log: false,
autoTrack: { autoTrack: {
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集 appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集 appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
......
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
<script setup> <script setup>
import { ref, computed, onMounted, onUnmounted, getCurrentInstance } from 'vue' import { ref, computed, onMounted, onUnmounted, getCurrentInstance } from 'vue'
import { onShow, onLoad, onHide } from '@dcloudio/uni-app' import { onShow, onLoad, onHide,onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
import BabySwitchPopup from '@/components/BabySwitchPopup.vue' import BabySwitchPopup from '@/components/BabySwitchPopup.vue'
import popupTip from '../../components/popup-tip/popup-tip.vue' import popupTip from '../../components/popup-tip/popup-tip.vue'
import { fetchFeedingJSON, feedingHome, feedingRecords, feedingFoodsCustom, feedingFoodsCustomAdd, feedingFoodsCustomDelete, feedingTimerStart, feedingTimerStop, feedingVoiceUpload, feedingVoiceResult } from '@/api/feeding.js' import { fetchFeedingJSON, feedingHome, feedingRecords, feedingFoodsCustom, feedingFoodsCustomAdd, feedingFoodsCustomDelete, feedingTimerStart, feedingTimerStop, feedingVoiceUpload, feedingVoiceResult } from '@/api/feeding.js'
...@@ -2412,7 +2412,7 @@ function showAddFoodPopup(categoryName) { ...@@ -2412,7 +2412,7 @@ function showAddFoodPopup(categoryName) {
pageName: "喂养工具首页", pageName: "喂养工具首页",
buttonName: "辅食添加" + categoryName, buttonName: "辅食添加" + categoryName,
}); });
// 防连点检查 // 防连点检查
if (foodSelectionState.value.isAddingFood) { if (foodSelectionState.value.isAddingFood) {
console.log('防连点:添加辅食按钮被阻止') console.log('防连点:添加辅食按钮被阻止')
...@@ -3747,7 +3747,22 @@ function loadDefaultFoodsData() { ...@@ -3747,7 +3747,22 @@ function loadDefaultFoodsData() {
} }
} }
onShareAppMessage(() => {
return {
title: "喂养记录:喂奶辅食轻松记录,喂养数据一目了然",
path: "/pages/feedingIndex/feedingIndex",
imageUrl: $baseUrl + "share/weiyang.png",
}
});
onShareTimeline(() => {
return {
title: "喂养记录:喂奶辅食轻松记录,喂养数据一目了然",
path: "/pages/feedingIndex/feedingIndex",
imageUrl: $baseUrl + "share/weiyang.png",
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -117,8 +117,7 @@ ...@@ -117,8 +117,7 @@
<popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @close="isTip = false"></popup-tip> <popup-tip v-if="isTip" type="2" @statusChange="onBabyChange" @close="isTip = false"></popup-tip>
<!-- 使用封装后的日期选择器组件 --> <!-- 使用封装后的日期选择器组件 -->
<DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm" <DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm" />
/>
</view> </view>
</view> </view>
</template> </template>
...@@ -133,7 +132,9 @@ import { ...@@ -133,7 +132,9 @@ import {
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
onShow onShow,
onShareAppMessage,
onShareTimeline
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
jump, jump,
...@@ -354,7 +355,7 @@ const close = (type) => { ...@@ -354,7 +355,7 @@ const close = (type) => {
}); });
} }
showPicker.value = false; showPicker.value = false;
} }
// 选择提醒事件 // 选择提醒事件
const handleChange = (e) => { const handleChange = (e) => {
...@@ -589,6 +590,24 @@ onMounted(() => { ...@@ -589,6 +590,24 @@ onMounted(() => {
pageName: "产检提醒首页" pageName: "产检提醒首页"
}); });
}) })
onShareAppMessage(() => {
return {
title: "产检工具:孕检项目全掌握,产检日程不错过",
path: "/pages/postnatalCheckUp/postnatalCheckUp",
imageUrl: $baseUrl + "share/chanjian.png",
}
});
onShareTimeline(() => {
return {
title: "产检工具:孕检项目全掌握,产检日程不错过",
path: "/pages/postnatalCheckUp/postnatalCheckUp",
imageUrl: $baseUrl + "share/chanjian.png",
}
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
This diff is collapsed.
...@@ -71,7 +71,7 @@ export const useUserStore = defineStore("userInfo", { ...@@ -71,7 +71,7 @@ export const useUserStore = defineStore("userInfo", {
* @param {Object} data : {encryptedData, iv, code} * @param {Object} data : {encryptedData, iv, code}
* @returns * @returns
*/ */
async phoneCallback(data, onOpenRegisterFn = () => { }) { async phoneCallback(data, onOpenRegisterFn = () => { }, cb) {
uni.login({ uni.login({
provider: "weixin", provider: "weixin",
success: async (res) => { success: async (res) => {
...@@ -86,7 +86,11 @@ export const useUserStore = defineStore("userInfo", { ...@@ -86,7 +86,11 @@ export const useUserStore = defineStore("userInfo", {
code: data.code, code: data.code,
codeLogin: res.code, codeLogin: res.code,
}); });
!babyExistence && onOpenRegisterFn && onOpenRegisterFn(); !babyExistence && onOpenRegisterFn && onOpenRegisterFn();
if (!babyExistence.value && cb) {
cb();
}
const homeStore = useHomeStore(); const homeStore = useHomeStore();
await homeStore.setBabyExistence(babyExistence); await homeStore.setBabyExistence(babyExistence);
...@@ -115,7 +119,7 @@ export const useUserStore = defineStore("userInfo", { ...@@ -115,7 +119,7 @@ export const useUserStore = defineStore("userInfo", {
// 缓存用户memberId // 缓存用户memberId
uni.setStorageSync('memberId', data?.memberId) uni.setStorageSync('memberId', data?.memberId)
} }
this.userInfo = data; this.userInfo = data;
}, },
setBabyNickCache(id, name) { setBabyNickCache(id, name) {
......
...@@ -404,6 +404,8 @@ const initData = async () => { ...@@ -404,6 +404,8 @@ const initData = async () => {
// 已出生或孕中显示 // 已出生或孕中显示
cfgStatus.value.showDetail = __showDetail; cfgStatus.value.showDetail = __showDetail;
if (__showDetail) { if (__showDetail) {
wheelOptions.value = wheelOptions.value =
babyInfo.value.babyStage == 2 babyInfo.value.babyStage == 2
......
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