This commit is contained in:
2023-08-19 17:44:10 +08:00
parent 58928d301a
commit 4f252443f5
6 changed files with 31 additions and 308 deletions

View File

@@ -30,4 +30,4 @@ export function getInfo() {
url: 'driver-api/tdSysUser/info',
method: 'get',
});
}
}

View File

@@ -0,0 +1,10 @@
import request from '../request/index.js';
export function queryQuestion(data) {
return request({
url: 'driver-api/tdQuestion/queryQuestion',
method: 'POST',
data,
});
}

View File

@@ -1,18 +1,24 @@
import { defineStore } from 'pinia';
import http from '@/jtools/request/index';
import constants from '@/jtools/constants';
import { queryQuestion } from '@/jtools/api/question';
import storage from '@/jtools/storage';
const question = defineStore({
id: 'question',
state: () => ({
currentCartype: storage.get('carType') || '1001',
orderQuestionList: [], //顺序做题
}),
actions: {
// 获取顺序做题
getQuestionList(arr) {
this.orderQuestionList=[...arr]
getQuestionList() {
console.log(11111);
queryQuestion({carTypeId:this.currentCartype,subject:'1'}).then(res=>{
if(res.code=='0000'){
this.orderQuestionList=res.data
}
})
},
}
});