|
@@ -5,14 +5,12 @@ import { CollectionModel } from "@/model/collection";
|
|
/**获取题目列表 */
|
|
/**获取题目列表 */
|
|
export const useSubjectList = (type: ExerciseType.ListType) => {
|
|
export const useSubjectList = (type: ExerciseType.ListType) => {
|
|
type TestModelListResType = Awaited<ReturnType<typeof testModel.getList | typeof testModel.getFreeList>>;
|
|
type TestModelListResType = Awaited<ReturnType<typeof testModel.getList | typeof testModel.getFreeList>>;
|
|
-
|
|
|
|
const subjectList = ref<TestModelListResType["list"]>([]); //题目列表
|
|
const subjectList = ref<TestModelListResType["list"]>([]); //题目列表
|
|
const subjectTotal = ref(0); //题目总数
|
|
const subjectTotal = ref(0); //题目总数
|
|
const query = useRoute().query; //路由query参数
|
|
const query = useRoute().query; //路由query参数
|
|
const currentSubjectIndex = ref(0); //当前题目下标
|
|
const currentSubjectIndex = ref(0); //当前题目下标
|
|
const vehicle = useRouter().currentRoute.value.query.vehicle as string; //路由qvehicle参数
|
|
const vehicle = useRouter().currentRoute.value.query.vehicle as string; //路由qvehicle参数
|
|
const subject = useRouter().currentRoute.value.query.subject as string; //路由subject参数
|
|
const subject = useRouter().currentRoute.value.query.subject as string; //路由subject参数
|
|
-
|
|
|
|
onBeforeMount(async () => {
|
|
onBeforeMount(async () => {
|
|
let res: TestModelListResType;
|
|
let res: TestModelListResType;
|
|
if (type == "normal" || type == "test") {
|
|
if (type == "normal" || type == "test") {
|