You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { defineStore } from 'pinia';
|
|
|
|
import http from '@/jtools/request/index';
|
|
|
|
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() {
|
|
|
|
console.log(11111);
|
|
|
|
queryQuestion({carTypeId:this.currentCartype,subject:'1'}).then(res=>{
|
|
|
|
if(res.code=='0000'){
|
|
|
|
this.orderQuestionList=res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default question;
|