Commit e3509a05 authored by LiZongLin's avatar LiZongLin

每日答题分数保存接口替换

parent d2cfc276
......@@ -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({
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',
data:data
})
}
......
......@@ -65,7 +65,7 @@
getToken(code, this.token).then(res => {
console.log(res);
this.updateToken(res.data.token)
this.updateUserInfo(res.data.userInfo)
this.updateUserInfo(res.data.user)
uni.redirectTo({
url: this.url
})
......
......@@ -174,8 +174,18 @@
this.getFinishSituation().then(() => {
console.log("finishSituationList", this.finishSituationList);
let i = 0;
if (i === this.day-1) {
console.log("所有答题已完成");
uni.showToast({
title: '所有答题已完成,请退出答题页面',
icon: 'none'
})
return
}
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) {
console.log(this.finishSituationList[i]);
this.getNotFinish(this.finishSituationList[i].date, i)
......@@ -184,13 +194,6 @@
}
}
}
if (i === this.day) {
console.log("所有答题已完成");
uni.showToast({
title: '所有答题已完成,请退出答题页面',
icon: 'none'
})
}
})
}
},
......@@ -250,14 +253,16 @@
clearInterval(this.timer)
// this.timer = null
}
// let addScoreData = {
// signupId:this.signupId,
// examId:this.examId,
// score:this.score,
// activityId:this.activityId,
// flagTime:this.flagTime
// }
addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
let addScoreData = {
signupId:this.signupId,
examId:this.examId,
score:this.score,
activityId:this.activityId,
examTime:this.flagTime
}
console.log(addScoreData);
// addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
addScore(addScoreData).then(res => {
console.log('成绩录入', res);
this.scoreFlag = false
})
......
......@@ -20,10 +20,11 @@ const url_all = {
// 'DEV': 'http://127.0.0.1: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',
// 体验版
trial: 'https://www.aiwanyundong.com/api',
trial: 'https://www.aiwanyundong.com/stage-api',
// 正式版
release: 'https://www.aiwanyundong.com/api'
// 'DEV': 'https://www.aiwanyundong.com/api/'
......
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