This commit is contained in:
2023-08-21 09:10:50 +08:00
parent a90c28f6fd
commit 7c54101dd6
12 changed files with 272 additions and 101 deletions

View File

@@ -7,4 +7,28 @@ export function queryQuestion(data) {
method: 'POST',
data,
});
}
export function questionCategory(data) {
return request({
url: 'driver-api/tdQuestion/questionCategory',
method: 'POST',
data,
});
}
export function getTestQuestion(data) {
return request({
url: 'driver-api/tdQuestion/getTestQuestion',
method: 'POST',
data,
});
}
export function submitTest(data) {
return request({
url: 'driver-api/tdQuestionTest/testSubmit',
method: 'POST',
data,
});
}

View File

@@ -12,6 +12,8 @@ const question = defineStore({
state: () => ({
currentCartype: storage.get('carType') || '1001',
orderQuestion: [], //顺序做题
currentIndex_subject1:0,//科目一索引 顺序做题
currentIndex_subject4:0,//科目四索引 顺序做题
}),
actions: {
@@ -26,6 +28,10 @@ const question = defineStore({
}
})
},
//获取索引
getCurrentIndex(index,val){
this[`currentIndex_subject${val}`]=index
}
}
});