修改
This commit is contained in:
@@ -204,12 +204,15 @@ function queryData(){
|
||||
$api.myRequest('/train/public/trainPractice/getQuestions', {
|
||||
userId: userInfo.value.userId
|
||||
},'post',9100,header).then((resData) => {
|
||||
resData.forEach((item,i)=>{
|
||||
problemData.value.push(item)
|
||||
problemList.value.push({index:i+1,whether:""})
|
||||
})
|
||||
start()
|
||||
accuracyRates()
|
||||
if(resData&&resData.code==200){
|
||||
resData.data.forEach((item,i)=>{
|
||||
problemData.value.push(item)
|
||||
problemList.value.push({index:i+1,whether:""})
|
||||
})
|
||||
start()
|
||||
accuracyRates()
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
function collect(is){
|
||||
@@ -222,7 +225,9 @@ function collect(is){
|
||||
questionId:problemData.value[questionIndex.value-1].questionId,
|
||||
collect:is
|
||||
},'post',9100,header).then((resData) => {
|
||||
problemData.value[questionIndex.value-1].isCollect=is
|
||||
if(resData&&resData.code==200){
|
||||
problemData.value[questionIndex.value-1].isCollect=is
|
||||
}
|
||||
});
|
||||
};
|
||||
//正确率
|
||||
@@ -234,7 +239,9 @@ function accuracyRates(){
|
||||
$api.myRequest('/train/public/trainPractice/getCount', {
|
||||
userId: userInfo.value.userId,
|
||||
},'post',9100,header).then((resData) => {
|
||||
accuracyRate.value=resData.truePresent
|
||||
if(resData&&resData.code==200){
|
||||
accuracyRate.value=resData.data.truePresent
|
||||
}
|
||||
});
|
||||
};
|
||||
//提交答案
|
||||
|
||||
Reference in New Issue
Block a user