Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TianGongKaiWu-20251203
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
SparkProjects
TianGongKaiWu-20251203
Commits
8399921f
Commit
8399921f
authored
Dec 16, 2025
by
天马流星拳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(任务): 修改任务领奖接口及参数传递方式
重构任务领奖接口配置,从字符串改为对象形式以支持更多配置 修改任务领奖参数传递方式,改为传递整个任务对象以便获取更多信息
parent
0368fa87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
index.ts
src/api/index.ts
+6
-1
index.jsx
src/panels/taskPanel/index.jsx
+1
-1
task.js
src/store/task.js
+3
-2
No files found.
src/api/index.ts
View file @
8399921f
...
@@ -58,7 +58,12 @@ const API = generateAPI({
...
@@ -58,7 +58,12 @@ const API = generateAPI({
withToken
:
true
,
withToken
:
true
,
},
},
// 任务领奖接口
// 任务领奖接口
sendPrizeTask
:
"task_1/sendPrize.do"
,
// sendPrizeTask: "task_1/sendPrize.do",
sendPrizeTask
:
{
uri
:
"task_1/sendPrize.do"
,
method
:
'post'
,
withToken
:
true
,
},
// 查询题目
// 查询题目
queryQS
:
"answer_1/query.do"
,
queryQS
:
"answer_1/query.do"
,
// 开始答题
// 开始答题
...
...
src/panels/taskPanel/index.jsx
View file @
8399921f
...
@@ -54,7 +54,7 @@ class TaskPanel extends React.Component {
...
@@ -54,7 +54,7 @@ class TaskPanel extends React.Component {
})
}
></
Button
>
}
})
}
></
Button
>
}
{
el
.
taskStatus
==
1
&&
<
Button
className=
'dailingqu'
onClick=
{
_asyncThrottle
(()
=>
{
{
el
.
taskStatus
==
1
&&
<
Button
className=
'dailingqu'
onClick=
{
_asyncThrottle
(()
=>
{
handleTaskLogClick
(
16
,
el
.
code
,
2
);
handleTaskLogClick
(
16
,
el
.
code
,
2
);
taskStore
.
sendPrize
(
el
.
prizePendingCodeList
.
code
);
taskStore
.
sendPrize
(
el
);
})
}
></
Button
>
}
})
}
></
Button
>
}
{
el
.
taskStatus
==
2
&&
<
Button
className=
'completed'
></
Button
>
}
{
el
.
taskStatus
==
2
&&
<
Button
className=
'completed'
></
Button
>
}
</
div
>
</
div
>
...
...
src/store/task.js
View file @
8399921f
...
@@ -86,9 +86,10 @@ const taskStore = makeAutoObservable({
...
@@ -86,9 +86,10 @@ const taskStore = makeAutoObservable({
setSendPrizeInfo
(
data
)
{
setSendPrizeInfo
(
data
)
{
this
.
sendPrizeInfo
=
data
||
{};
this
.
sendPrizeInfo
=
data
||
{};
},
},
async
sendPrize
(
code
)
{
async
sendPrize
(
item
)
{
console
.
log
(
"🚀 ~ item:"
,
item
)
// const { success, data } = await API.sendPrizeTask({ code: code, channel: CFG.channel });
// const { success, data } = await API.sendPrizeTask({ code: code, channel: CFG.channel });
const
{
success
,
data
}
=
await
API
.
sendPrizeTask
({
prizePendingCode
:
code
});
const
{
success
,
data
}
=
await
API
.
sendPrizeTask
({
prizePendingCode
:
item
.
prizePendingCode
,
taskCode
:
item
.
code
});
if
(
success
)
{
if
(
success
)
{
store
.
updateIndex
();
store
.
updateIndex
();
taskStore
.
queryTaskInfo
();
taskStore
.
queryTaskInfo
();
...
...
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