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
ceedb43e
Commit
ceedb43e
authored
Oct 27, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务person页面立即查询结果
parent
bb7eb5d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
TaskPerson.vue
components/renwu/TaskPerson.vue
+20
-0
index.vue
pages/index/index.vue
+1
-1
person.vue
pages/person/person.vue
+25
-0
No files found.
components/renwu/TaskPerson.vue
View file @
ceedb43e
...
@@ -130,6 +130,7 @@
...
@@ -130,6 +130,7 @@
import
{
ref
,
watch
,
onMounted
,
computed
}
from
"vue"
;
import
{
ref
,
watch
,
onMounted
,
computed
}
from
"vue"
;
import
{
onLoad
}
from
"@dcloudio/uni-app"
;
import
{
onLoad
}
from
"@dcloudio/uni-app"
;
import
{
useUserStore
}
from
"../../stores/user.js"
;
import
{
useUserStore
}
from
"../../stores/user.js"
;
import
{
useIntegralStore
}
from
"../../stores/integral.js"
;
import
PickerCustom
from
"../PickerCustom.vue"
;
import
PickerCustom
from
"../PickerCustom.vue"
;
import
MultiSelectLayer
from
"../MultiSelectLayer.vue"
;
import
MultiSelectLayer
from
"../MultiSelectLayer.vue"
;
import
{
uploadImage
}
from
"../../api/common.js"
;
import
{
uploadImage
}
from
"../../api/common.js"
;
...
@@ -138,6 +139,9 @@ import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
...
@@ -138,6 +139,9 @@ import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
import
{
usePageCfgStore
}
from
"../../stores/pageCfg"
;
import
{
usePageCfgStore
}
from
"../../stores/pageCfg"
;
import
md
from
"../../md.js"
;
import
md
from
"../../md.js"
;
import
{
jump
,
JumpType
}
from
"../../utils/index.js"
;
import
{
jump
,
JumpType
}
from
"../../utils/index.js"
;
import
{
useGlobalStore
}
from
"../../stores/global.js"
;
const
globalStore
=
useGlobalStore
();
// Props 定义
// Props 定义
const
props
=
defineProps
({
const
props
=
defineProps
({
...
@@ -534,6 +538,9 @@ const onSubmit = async (e) => {
...
@@ -534,6 +538,9 @@ const onSubmit = async (e) => {
icon
:
"success"
,
icon
:
"success"
,
});
});
//获取任务奖品
await
checkAndUpdateTaskResult
();
// 触发成功事件
// 触发成功事件
emit
(
'success'
);
emit
(
'success'
);
// 关闭弹窗
// 关闭弹窗
...
@@ -546,6 +553,19 @@ const onSubmit = async (e) => {
...
@@ -546,6 +553,19 @@ const onSubmit = async (e) => {
}
}
};
};
// 检查任务结果并更新全局状态
const
checkAndUpdateTaskResult
=
async
()
=>
{
const
integralStore
=
useIntegralStore
();
await
integralStore
.
queryTodoResultServer
();
console
.
log
(
'queryTodoResult:'
,
integralStore
.
queryTodoResult
);
if
(
integralStore
.
queryTodoResult
?.
success
&&
integralStore
.
queryTodoResult
?.
data
?.
length
>
0
)
{
globalStore
.
isShowTaskComplete
=
true
;
globalStore
.
taskCompletePoints
=
integralStore
.
queryTodoResult
.
data
[
0
]?.
actualCredits
;
globalStore
.
taskCompleteTitle
=
integralStore
.
queryTodoResult
.
data
[
0
]?.
taskName
;
}
};
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
emit
(
'close'
);
emit
(
'close'
);
};
};
...
...
pages/index/index.vue
View file @
ceedb43e
...
@@ -179,7 +179,7 @@ const checkAndUpdateTaskResult = async () => {
...
@@ -179,7 +179,7 @@ const checkAndUpdateTaskResult = async () => {
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// globalStore.isShowTaskComplete = true;//?????????
// globalStore.isShowTaskComplete = true;//?????????
//
签到
奖品
//
任务
奖品
await
checkAndUpdateTaskResult
();
await
checkAndUpdateTaskResult
();
// 调用邀请活动首页接口
// 调用邀请活动首页接口
...
...
pages/person/person.vue
View file @
ceedb43e
...
@@ -140,6 +140,11 @@ import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
...
@@ -140,6 +140,11 @@ import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
import
{
usePageCfgStore
}
from
"../../stores/pageCfg"
;
import
{
usePageCfgStore
}
from
"../../stores/pageCfg"
;
import
md
from
"../../md.js"
;
import
md
from
"../../md.js"
;
import
{
jump
,
JumpType
}
from
"../../utils/index.js"
;
import
{
jump
,
JumpType
}
from
"../../utils/index.js"
;
import
{
useIntegralStore
}
from
"../../stores/integral.js"
;
import
{
useGlobalStore
}
from
"../../stores/global.js"
;
const
globalStore
=
useGlobalStore
();
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
pageType
=
ref
(
"add"
);
const
pageType
=
ref
(
"add"
);
const
babyId
=
ref
(
""
);
const
babyId
=
ref
(
""
);
...
@@ -517,6 +522,10 @@ const onSubmit = async (e) => {
...
@@ -517,6 +522,10 @@ const onSubmit = async (e) => {
title
:
"提交成功"
,
title
:
"提交成功"
,
icon
:
"success"
,
icon
:
"success"
,
});
});
//获取任务奖品
await
checkAndUpdateTaskResult
();
uni
.
navigateBack
();
uni
.
navigateBack
();
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -525,6 +534,22 @@ const onSubmit = async (e) => {
...
@@ -525,6 +534,22 @@ const onSubmit = async (e) => {
});
});
}
}
};
};
// 检查任务结果并更新全局状态
const
checkAndUpdateTaskResult
=
async
()
=>
{
const
integralStore
=
useIntegralStore
();
await
integralStore
.
queryTodoResultServer
();
console
.
log
(
'queryTodoResult:'
,
integralStore
.
queryTodoResult
);
if
(
integralStore
.
queryTodoResult
?.
success
&&
integralStore
.
queryTodoResult
?.
data
?.
length
>
0
)
{
globalStore
.
isShowTaskComplete
=
true
;
globalStore
.
taskCompletePoints
=
integralStore
.
queryTodoResult
.
data
[
0
]?.
actualCredits
;
globalStore
.
taskCompleteTitle
=
integralStore
.
queryTodoResult
.
data
[
0
]?.
taskName
;
}
};
const
handleReturn
=
()
=>
{
const
handleReturn
=
()
=>
{
uni
.
navigateBack
();
uni
.
navigateBack
();
};
};
...
...
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