提交
This commit is contained in:
@@ -30,4 +30,4 @@ export function getInfo() {
|
||||
url: 'driver-api/tdSysUser/info',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
10
src/jtools/api/question.js
Normal file
10
src/jtools/api/question.js
Normal 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,
|
||||
});
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user