Prechádzať zdrojové kódy

顺序练习新增4月份新题和新增题库

zhangyujun 3 rokov pred
rodič
commit
9a4e688f62

+ 4 - 4
src/api/modules/test.ts

@@ -35,7 +35,7 @@ class Test {
 	/** 获取地方题分类 */
 	selectDfQustionInfo(params: Partial<Test.getTopicClassParams>): AxiosPromise<Test.selectDfQustionInfoRes[]> {
 		return request({
-			url: `/student/question/info/selectDfQustionInfo`,
+			url: `/student/question/info/selectDfQuestionInfo`,
 			params,
 		});
 	}
@@ -43,7 +43,7 @@ class Test {
 	/** 获取分类专题分类 */
 	selectFlQustionInfo(params: Partial<Test.getTopicClassParams>): AxiosPromise<Test.selectFlQustionInfoRes[]> {
 		return request({
-			url: `/student/question/info/selectFlQustionInfo`,
+			url: `/student/question/info/selectFlQuestionInfo`,
 			params,
 		});
 	}
@@ -51,7 +51,7 @@ class Test {
 	/** 获取精选题分类 */
 	selectJxQustionInfo(params: Partial<Test.getTopicClassParams>): AxiosPromise<Test.selectJxQustionInfoRes[]> {
 		return request({
-			url: `/student/question/info/selectJxQustionInfo`,
+			url: `/student/question/info/selectJxQuestionInfo`,
 			params,
 		});
 	}
@@ -59,7 +59,7 @@ class Test {
 	/** 获取顺序练习分类 */
 	selectSxQustionInfo(params: Partial<Test.getTopicClassParams>): AxiosPromise<Test.selectSxQustionInfoRes[]> {
 		return request({
-			url: `/student/question/info/selectSxQustionInfo`,
+			url: `/student/question/info/selectSxQuestionInfo`,
 			params,
 		});
 	}

+ 1 - 1
src/model/test.ts

@@ -5,7 +5,7 @@ class TestModel {
 	async getTopicClass(type: "df" | "fl" | "jx" | "sx", params: Partial<Test.getTopicClassParams>) {
 		switch (type) {
 			case "df": {
-				const res = await test.selectDfQustionInfo(params);
+				const res = await test.selectDfQuestionInfo(params);
 				return res.data;
 			}
 			case "fl": {

+ 1 - 1
src/views/classify/index.vue

@@ -46,7 +46,7 @@ const classData = ref();
 getTopicClass(query.path as string, query).then(({ data }) => {
 	//地方专题第一个选项去掉
 	if (query.title == "地方专题") {
-		data.data.shift();
+		data.data?.shift();
 	}
 
 	classData.value = data.data;

+ 183 - 0
src/views/classifyChoose/index.vue

@@ -0,0 +1,183 @@
+<template>
+	<m-nav-bar :title="query.title" />
+	<div class="cell-container">
+		<div class="cell-box" style="padding-right: 0px">
+			<van-cell
+				class="cell"
+				:title="item.excellIssueName || item.placeIssueName || item.classIssueName || item.sequeIssueName"
+				is-link
+				center
+				v-for="(item, index) in classDataLeft"
+				:key="index"
+				:border="false"
+				@click="
+					() => {
+						push({
+							name: 'exercise',
+							query: {
+								...query,
+								classIssueName: item.classIssueName,
+								placeIssueName: item.placeIssueName,
+								excellIssueName: item.excellIssueName,
+								sequeIssueName: item.sequeIssueName,
+								placeIssue: item.placeIssue,
+								classIssue: item.classIssue,
+								excellIssue: item.excellIssue,
+								sequeIssue: item.sequeIssue,
+							},
+						});
+					}
+				">
+				<template #icon>
+					<div class="icon-blue">{{ index + 1 }}</div>
+				</template>
+			</van-cell>
+			<van-cell
+				v-if="query.title !== '地方专题'"
+				@click="
+					() => {
+						push({
+							name: 'classify',
+							query: {
+								...query,
+								title: '地方专题',
+								path: 'selectDfQuestionInfo',
+								sort: 4,
+							},
+						});
+					}
+				"
+				class="cell"
+				title="地方专题"
+				is-link
+				center
+				:border="false">
+				<template #icon>
+					<div class="icon-blue">{{ "地" }}</div>
+				</template>
+			</van-cell>
+		</div>
+		<div class="cell-box">
+			<van-cell
+				class="cell"
+				:title="item.placeIssueName || item.classIssueName || item.excellIssueName || item.sequeIssueName"
+				is-link
+				center
+				v-for="(item, index) in classDataRight"
+				:key="index"
+				:border="false"
+				@click="
+					() => {
+						push({
+							name: 'exercise',
+							query: {
+								...query,
+								classIssueName: item.classIssueName,
+								placeIssueName: item.placeIssueName,
+								excellIssueName: item.excellIssueName,
+								sequeIssueName: item.sequeIssueName,
+								placeIssue: item.placeIssue,
+								classIssue: item.classIssue,
+								excellIssue: item.excellIssue,
+								sequeIssue: item.sequeIssue,
+							},
+						});
+					}
+				">
+				<template #icon>
+					<div class="icon-red">{{ index + 1 }}</div>
+				</template>
+			</van-cell>
+		</div>
+	</div>
+</template>
+
+<script setup lang="ts">
+import { getTopicClass } from "@/api";
+import { ref, reactive } from "vue";
+import { RouterBus } from "@/hooks";
+const {
+	route: { query },
+	router: { push },
+} = new RouterBus();
+const classDataLeft = ref([]);
+const classDataRight = ref([]);
+const classData = ref([]);
+getTopicClass(query.path as string, {
+	...query,
+	excellIssueName: "必学",
+}).then(({ data }) => {
+	// res.data.data.shift();
+	console.log(data);
+	classDataLeft.value = data.data;
+	getTopicClass(query.path as string, {
+		...query,
+		excellIssueName: "新增",
+	}).then(({ data }) => {
+		// data.data.shift();
+		classDataLeft.value = [...classDataLeft.value, ...data.data];
+	});
+	getTopicClass(query.path as string, {
+		...query,
+		excellIssueName: "地方",
+	}).then(({ data }) => {
+		// data.data.shift();
+		classDataLeft.value = [...classDataLeft.value, ...data.data];
+	});
+
+});
+
+getTopicClass(query.path as string, {
+	...query,
+	excellIssueName: "选学",
+}).then(({ data }) => {
+	classDataRight.value = data.data;
+});
+</script>
+
+<style lang="scss" scoped>
+.cell-container {
+	display: flex;
+	flex-direction: row;
+}
+.cell-box {
+	display: flex;
+	padding: 5px 15px;
+	flex-wrap: wrap;
+	flex-direction: column;
+
+	.cell {
+		width: 167px;
+		margin-top: 10px;
+		box-shadow: 0px 0px 10px rgba(124, 129, 136, 0.2);
+	}
+	.icon-blue {
+		width: 20px;
+		height: 20px;
+		background: #498ef5;
+		border-radius: 50%;
+		font-weight: 500;
+		font-family: PingFang SC;
+		font-size: 13px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #ffffff;
+		margin-right: 5px;
+	}
+	.icon-red {
+		width: 20px;
+		height: 20px;
+		background: red;
+		border-radius: 50%;
+		font-weight: 500;
+		font-family: PingFang SC;
+		font-size: 13px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		color: #ffffff;
+		margin-right: 5px;
+	}
+}
+</style>

+ 1 - 1
src/views/classifyCol/index.vue

@@ -41,7 +41,7 @@
 							query: {
 								...query,
 								title: '地方专题',
-								path: 'selectDfQustionInfo',
+								path: 'selectDfQuestionInfo',
 								sort: 4,
 							},
 						});

+ 5 - 0
src/views/classifyOrder/index.vue

@@ -65,6 +65,11 @@ const {
 } = new RouterBus();
 const classData = ref();
 getTopicClass(query.path as string, query).then(({ data }) => {
+	switch (query.title) {
+		case "顺序练习":
+			data.data?.shift()
+			break;
+	}
 	classData.value = data.data;
 });
 </script>

+ 6 - 6
src/views/home/children/test/components/sujectOne.vue

@@ -71,7 +71,7 @@ const vipClick = (item: any, index: number) => {
 			name: "classify",
 			query: {
 				...props.query,
-				path: "selectJxQustionInfo",
+				path: "selectJxQuestionInfo",
 				title: "精选考题",
 				sort: 2,
 			},
@@ -90,7 +90,7 @@ const testList = [
 					name: "classifyOrder",
 					query: {
 						...props.query,
-						path: "selectSxQustionInfo",
+						path: "selectSxQuestionInfo",
 						title: "顺序练习",
 						sort: 3,
 					},
@@ -103,7 +103,7 @@ const testList = [
 					name: "classify",
 					query: {
 						...props.query,
-						path: "selectFlQustionInfo",
+						path: "selectFlQuestionInfo",
 						title: "分类练习",
 						sort: 1,
 					},
@@ -115,10 +115,10 @@ const testList = [
 				icon: "精选考题",
 				name: "精选考题\n500题",
 				route: {
-					name: "classifyCol",
+					name: "classifyChoose",
 					query: {
 						...props.query,
-						path: "selectJxQustionInfo",
+						path: "selectJxQuestionInfo",
 						title: "精选考题",
 						sort: 2,
 					},
@@ -133,7 +133,7 @@ const testList = [
 					name: "classify",
 					query: {
 						...props.query,
-						path: "selectDfQustionInfo",
+						path: "selectDfQuestionInfo",
 						title: "地方专题",
 						sort: 4,
 					},