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.
jwl-applet/src/jtools/store/question.js

32 lines
605 B

2 years ago
import {
defineStore
} from 'pinia';
2 years ago
import http from '@/jtools/request/index';
2 years ago
import {
queryQuestion
} from '@/jtools/api/question';
2 years ago
import storage from '@/jtools/storage';
const question = defineStore({
2 years ago
id: 'question',
state: () => ({
2 years ago
currentCartype: storage.get('carType') || '1001',
2 years ago
orderQuestion: [], //顺序做题
}),
2 years ago
2 years ago
actions: {
// 获取顺序做题
getOrderQuestion(val) {
queryQuestion({
carTypeId: this.currentCartype,
subject: val
}).then(res => {
if (res.code == '0000') {
this.orderQuestion = res.data
}
})
},
}
2 years ago
});
2 years ago
export default question;