Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
58fc3df5
Commit
58fc3df5
authored
Sep 08, 2025
by
张九刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 生长工具分享
parent
bcb03ac5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
shengzhangTools.vue
pages/shengzhangTools/shengzhangTools.vue
+17
-8
No files found.
pages/shengzhangTools/shengzhangTools.vue
View file @
58fc3df5
...
...
@@ -217,13 +217,13 @@
</
template
>
<
script
setup
>
import
{
onMounted
,
ref
,
getCurrentInstance
,
watch
}
from
'vue'
import
{
onMounted
,
ref
,
getCurrentInstance
,
watch
}
from
'vue'
import
BabySwitchPopup
from
'@/components/BabySwitchPopup.vue'
import
BabyFeedSwitchPopup
from
'@/components/BabyFeedSwitchPopup.vue'
import
DatePickerPopup
from
'@/components/DatePickerPopup.vue'
import
BabyTestTipsPopup
from
'@/components/BabyTestTipsPopup.vue'
import
{
growthHome
,
guideCompleted
,
getGrowthCurveData
,
fetchShengzhangToolsJSON
}
from
'../../api/shengzhangTools'
import
{
onLoad
,
onShow
,
onShareAppMessage
,
onShareTimeline
}
from
"@dcloudio/uni-app"
;
import
{
onLoad
,
onShow
,
onShareAppMessage
,
onShareTimeline
}
from
"@dcloudio/uni-app"
;
import
{
throttleTap
,
jump
,
JumpType
,
formatDate
}
from
'../../utils/index.js'
;
import
{
useShengzhangStore
}
from
'../../stores/shengzhangResult.js'
;
import
{
useUserStore
}
from
"@/stores/user"
;
...
...
@@ -732,7 +732,8 @@ const guideHandler = async () => {
}
}
const
userStore
=
useUserStore
();
const
{
babyInfo
}
=
storeToRefs
(
userStore
)
// 获取页面参数
onLoad
((
options
)
=>
{
if
(
options
.
babyId
)
{
...
...
@@ -740,6 +741,15 @@ onLoad((options) => {
console
.
log
(
'获取到的babyId:'
,
babyId
.
value
)
}
})
watch
(
babyInfo
,
async
(
newVal
,
oldVal
)
=>
{
console
.
log
(
oldVal
,
'-----babyId发生变化,重新获取数据'
,
newVal
)
if
((
!
oldVal
||
!
oldVal
?.
content
?.
id
)
&&
newVal
?.
content
?.
id
){
console
.
log
(
'start重新获取数据'
,
newVal
)
await
babyRefresh
();
}
})
onShow
(
async
()
=>
{
...
...
@@ -755,8 +765,7 @@ const onRegisterConfirm = async () => {
const
onBabyChange1
=
async
()
=>
{
await
babyRefresh
();
}
const
userStore
=
useUserStore
();
const
{
babyInfo
}
=
storeToRefs
(
userStore
)
const
refreshBabyInfo
=
async
()
=>
{
const
userStore
=
useUserStore
();
babyId
.
value
=
userStore
.
babyInfo
?.
content
?.
id
;
...
...
@@ -811,15 +820,15 @@ const babyRefresh = async () => {
)
{
isNotLogin
.
value
=
true
;
}
console
.
log
(
babyInfo
?.
babyStage
+
'--------------------'
,
babyInfo
)
console
.
log
(
babyInfo
?.
babyStage
+
'--------------------'
,
babyInfo
)
if
(
babyInfo
&&
babyInfo
.
babyStage
==
2
)
{
isTip
.
value
=
false
await
refreshBabyInfo
();
}
else
{
isTip
.
value
=
true
;
}
}
const
shengzhangToolsData
=
ref
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment