Commit 22c32da0 authored by 张九刚's avatar 张九刚

feat: youhua

parent 40699575
...@@ -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 = {}) => {
// 在这里可以对请求头进行一些设置 // 在这里可以对请求头进行一些设置
......
...@@ -715,17 +715,19 @@ onMounted(async () => { ...@@ -715,17 +715,19 @@ onMounted(async () => {
pageName: "测评结果页" pageName: "测评结果页"
}); });
const userStore = useUserStore(); const userStore = useUserStore();
//获取历史记录
const historyListData = await getGrowthHistoryList();
console.log(userStore.babyInfo?.content?.id+'--------------------',shengzhangStore?.getGrowthCurveDataInfoHeight?.userDataPoints) console.log(userStore.babyInfo?.content?.id+'--------------------',shengzhangStore?.getGrowthCurveDataInfoHeight?.userDataPoints)
if(!userStore.babyInfo?.content?.id || !shengzhangStore?.getGrowthCurveDataInfoHeight?.userDataPoints){ if(!userStore.babyInfo?.content?.id ){
jump({ jump({
type: JumpType.INNER, type: JumpType.INNER,
url: "/pages/shengzhangTools/shengzhangTools" url: "/pages/shengzhangTools/shengzhangTools"
}) })
return; return;
} }
//获取历史记录
const historyListData = await getGrowthHistoryList();
if(!historyListData.success || (!historyListData.data || historyListData.data.length == 0)){ if(!historyListData.success || (!historyListData.data || historyListData.data.length == 0)){
showNoValBg.value = true; showNoValBg.value = true;
......
...@@ -799,7 +799,9 @@ const refreshBabyInfo = async () => { ...@@ -799,7 +799,9 @@ const refreshBabyInfo = async () => {
const babyRefresh = async () => { const babyRefresh = async () => {
const userStore = useUserStore(); const userStore = useUserStore();
await userStore.loadBabyInfo();
const babyInfo = userStore.babyInfo; const babyInfo = userStore.babyInfo;
isNotLogin.value = false; isNotLogin.value = false;
isTip.value = false isTip.value = false
...@@ -819,13 +821,7 @@ const babyRefresh = async () => { ...@@ -819,13 +821,7 @@ const babyRefresh = async () => {
} }
} }
watch(babyInfo, (newVal,oldVal) => {
if(newVal)
{
babyRefresh();
}
},{deep: true, immediate: true})
const shengzhangToolsData = ref({ const shengzhangToolsData = ref({
activeInfo: [ activeInfo: [
{ {
......
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