Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
tjty-app
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王永飞
tjty-app
Commits
e3509a05
Commit
e3509a05
authored
Nov 24, 2022
by
LiZongLin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每日答题分数保存接口替换
parent
d2cfc276
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
21 deletions
+30
-21
dailyAnswer.js
tjty-app/api/dailyAnswer.js
+5
-2
login.vue
tjty-app/pages/login/login.vue
+1
-1
tjty_dailyAnswer.vue
.../pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
+21
-16
request.js
tjty-app/utils/request.js
+3
-2
No files found.
tjty-app/api/dailyAnswer.js
View file @
e3509a05
...
@@ -30,10 +30,13 @@ export function getExamPapers(signupId,activityId,examTime) {
...
@@ -30,10 +30,13 @@ export function getExamPapers(signupId,activityId,examTime) {
}
}
//新增每日答题分数
//新增每日答题分数
export
function
addScore
(
signupId
,
examId
,
score
,
activityId
,
examTime
)
{
// export function addScore(signupId,examId,score,activityId,examTime) {
export
function
addScore
(
data
)
{
return
request
({
return
request
({
url
:
`/tjt-race/answerQuestion/addScore/
${
signupId
}
/
${
examId
}
/
${
score
}
/
${
activityId
}
/
${
examTime
}
`
,
// url: `/tjt-race/answerQuestion/addScore/${signupId}/${examId}/${score}/${activityId}/${examTime}`,
url
:
`/tjt-race/answerQuestion/addScore`
,
method
:
'post'
,
method
:
'post'
,
data
:
data
})
})
}
}
...
...
tjty-app/pages/login/login.vue
View file @
e3509a05
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
getToken
(
code
,
this
.
token
).
then
(
res
=>
{
getToken
(
code
,
this
.
token
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
this
.
updateToken
(
res
.
data
.
token
)
this
.
updateToken
(
res
.
data
.
token
)
this
.
updateUserInfo
(
res
.
data
.
user
Info
)
this
.
updateUserInfo
(
res
.
data
.
user
)
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
this
.
url
url
:
this
.
url
})
})
...
...
tjty-app/pages_daily_answer/tjty_dailyAnswer/tjty_dailyAnswer.vue
View file @
e3509a05
...
@@ -174,8 +174,18 @@
...
@@ -174,8 +174,18 @@
this
.
getFinishSituation
().
then
(()
=>
{
this
.
getFinishSituation
().
then
(()
=>
{
console
.
log
(
"finishSituationList"
,
this
.
finishSituationList
);
console
.
log
(
"finishSituationList"
,
this
.
finishSituationList
);
let
i
=
0
;
let
i
=
0
;
if
(
i
===
this
.
day
-
1
)
{
console
.
log
(
"所有答题已完成"
);
uni
.
showToast
({
title
:
'所有答题已完成,请退出答题页面'
,
icon
:
'none'
})
return
}
for
(
i
=
0
;
i
<
this
.
day
;
i
++
)
{
for
(
i
=
0
;
i
<
this
.
day
;
i
++
)
{
if
(
i
<
this
.
day
)
{
console
.
log
(
'i'
,
i
);
console
.
log
(
'this.day'
,
this
.
day
);
if
(
i
<
this
.
day
-
1
)
{
if
(
this
.
finishSituationList
[
i
].
flag
===
false
)
{
if
(
this
.
finishSituationList
[
i
].
flag
===
false
)
{
console
.
log
(
this
.
finishSituationList
[
i
]);
console
.
log
(
this
.
finishSituationList
[
i
]);
this
.
getNotFinish
(
this
.
finishSituationList
[
i
].
date
,
i
)
this
.
getNotFinish
(
this
.
finishSituationList
[
i
].
date
,
i
)
...
@@ -184,13 +194,6 @@
...
@@ -184,13 +194,6 @@
}
}
}
}
}
}
if
(
i
===
this
.
day
)
{
console
.
log
(
"所有答题已完成"
);
uni
.
showToast
({
title
:
'所有答题已完成,请退出答题页面'
,
icon
:
'none'
})
}
})
})
}
}
},
},
...
@@ -250,14 +253,16 @@
...
@@ -250,14 +253,16 @@
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
// this.timer = null
// this.timer = null
}
}
// let addScoreData = {
let
addScoreData
=
{
// signupId:this.signupId,
signupId
:
this
.
signupId
,
// examId:this.examId,
examId
:
this
.
examId
,
// score:this.score,
score
:
this
.
score
,
// activityId:this.activityId,
activityId
:
this
.
activityId
,
// flagTime:this.flagTime
examTime
:
this
.
flagTime
// }
}
addScore
(
this
.
signupId
,
this
.
examId
,
this
.
score
,
this
.
activityId
,
this
.
flagTime
).
then
(
res
=>
{
console
.
log
(
addScoreData
);
// addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
addScore
(
addScoreData
).
then
(
res
=>
{
console
.
log
(
'成绩录入'
,
res
);
console
.
log
(
'成绩录入'
,
res
);
this
.
scoreFlag
=
false
this
.
scoreFlag
=
false
})
})
...
...
tjty-app/utils/request.js
View file @
e3509a05
...
@@ -20,10 +20,11 @@ const url_all = {
...
@@ -20,10 +20,11 @@ const url_all = {
// 'DEV': 'http://127.0.0.1:8080', // 开发
// 'DEV': 'http://127.0.0.1:8080', // 开发
// 'DEV': 'http://192.168.1.11:8080'
// 'DEV': 'http://192.168.1.11:8080'
// 开发版
// 开发版
develop
:
'https://www.aiwanyundong.com/api'
,
develop
:
'https://www.aiwanyundong.com/stage-api'
,
// develop: 'https://www.aiwanyundong.com/api',
// develop: 'http://192.168.0.63:8080',
// develop: 'http://192.168.0.63:8080',
// 体验版
// 体验版
trial
:
'https://www.aiwanyundong.com/api'
,
trial
:
'https://www.aiwanyundong.com/
stage-
api'
,
// 正式版
// 正式版
release
:
'https://www.aiwanyundong.com/api'
release
:
'https://www.aiwanyundong.com/api'
// 'DEV': 'https://www.aiwanyundong.com/api/'
// 'DEV': 'https://www.aiwanyundong.com/api/'
...
...
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