Bladeren bron

增加了vant和最新4月份的题库

zhangyujun 3 jaren geleden
bovenliggende
commit
ebaa9f145a

+ 33 - 0
package-lock.json

@@ -530,6 +530,11 @@
         "fastq": "^1.6.0"
       }
     },
+    "@popperjs/core": {
+      "version": "2.11.4",
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.4.tgz",
+      "integrity": "sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg=="
+    },
     "@rollup/pluginutils": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz",
@@ -731,6 +736,24 @@
         "eslint-visitor-keys": "^2.0.0"
       }
     },
+    "@vant/icons": {
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.7.3.tgz",
+      "integrity": "sha512-tW4EqzxN4kXw1rnlnQJQHofEifPbt/gECOWiibomht8QLyvoGuE4iUmDFS288dJ07ZjuTy0bhdABj0SENo2fmQ=="
+    },
+    "@vant/popperjs": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
+      "integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
+      "requires": {
+        "@popperjs/core": "^2.9.2"
+      }
+    },
+    "@vant/use": {
+      "version": "1.3.6",
+      "resolved": "https://registry.npmjs.org/@vant/use/-/use-1.3.6.tgz",
+      "integrity": "sha512-3z+nywPaV2F5BdJO7RQxWlgfzJeEOmViD2yHMb7Tg+R4NR/7iQskqW8v2Cnv9FWSJgTOSHlcr7UzeLpiTAP4HA=="
+    },
     "@vitejs/plugin-vue": {
       "version": "1.10.2",
       "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.10.2.tgz",
@@ -3102,6 +3125,16 @@
       "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
       "dev": true
     },
+    "vant": {
+      "version": "3.4.7",
+      "resolved": "https://registry.npmjs.org/vant/-/vant-3.4.7.tgz",
+      "integrity": "sha512-/iafbNF3VPcDevIun8DMj84V9sGMcBZ2LW8j20uqthW6NpFmkMpDFJxMINQFIZ0myEogqVSDVhS6XFAwlx3nkQ==",
+      "requires": {
+        "@vant/icons": "^1.7.1",
+        "@vant/popperjs": "^1.1.0",
+        "@vant/use": "^1.3.6"
+      }
+    },
     "vite": {
       "version": "2.6.13",
       "resolved": "https://registry.npmjs.org/vite/-/vite-2.6.13.tgz",

+ 3 - 2
package.json

@@ -11,7 +11,8 @@
     "dayjs": "^1.10.8",
     "vue": "3.0.11",
     "vue-router": "^4.0.6",
-    "vuex": "4.0.0"
+    "vuex": "4.0.0",
+    "vant": "^3.1.5"
   },
   "devDependencies": {
     "@types/node": "^14.14.41",
@@ -33,4 +34,4 @@
     "vite": "2.6.13",
     "vue-eslint-parser": "^7.6.0"
   }
-}
+}

+ 22 - 5
src/api/api.ts

@@ -1,4 +1,4 @@
-import { AxiosPromise } from "axios";
+import { AxiosPromise, AxiosResponse } from "axios";
 import request from "./request";
 //用户授权码模式登录
 function loginCode(data?: {
@@ -28,7 +28,7 @@ function studentQustionInfoSelectTestQuestionInfo(params: {
     liceMoto: string,
     liceTruck: string,
     subject: number,
-}):AxiosPromise<selectTestQuestionInfo.response> {
+}): AxiosPromise<selectTestQuestionInfo.response> {
     return request({
         url: "student/qustion/info/selectTestQuestionInfo",
         method: "get",
@@ -44,7 +44,7 @@ function openApiqustionInfoSelectTestQuestionInfo(params: {
     liceMoto: string,
     liceTruck: string,
     subject: number,
-}):AxiosPromise<selectTestQuestionInfo.response> {
+}): AxiosPromise<selectTestQuestionInfo.response> {
     return request({
         url: "open-api/qustion/info/selectTestQuestionInfo",
         method: "get",
@@ -54,19 +54,36 @@ function openApiqustionInfoSelectTestQuestionInfo(params: {
 
 }
 //查询用户信息
-function studentUserInfo():AxiosPromise<studentUserInfo.response>{
+function studentUserInfo(): AxiosPromise<studentUserInfo.response> {
     return request({
         url: "student/qustion/info/selectTestQuestionInfo",
         method: "get",
     })
 
 }
+//查询202204题库列表
+async function questionTwoList(params: {
+    pageNum: number,
+    pageSize: number,
+    cartype: "0" | "1" | "2" | "3",
+    kemu: number,
+    explainJs?: string
+}): Promise<AxiosPromise<questionTwoList.response>> {
+    let res: AxiosResponse<questionTwoList.response> = await request({
+        url: "https://admin1.zzxcx.net/zzjs-admin/open-api/question/two/list",
+        method: "get",
+        params
+    })
+    //
+    return res
+}
 export default {
     loginCode,
     loginCodeTest,
     studentQustionInfoSelectTestQuestionInfo,
     studentUserInfo,
-    openApiqustionInfoSelectTestQuestionInfo
+    openApiqustionInfoSelectTestQuestionInfo,
+    questionTwoList
 
 
 }

+ 1 - 1
src/api/request.ts

@@ -1,7 +1,7 @@
 import axios from "axios";
 import { requestLogger, responseLogger } from "axios-logger";
 const request = axios.create({
-	baseURL: import.meta.env.MODE === "production" ? "/prod-api" : "/dev-api",
+	// baseURL: import.meta.env.MODE === "production" ? "/prod-api" : "/dev-api",
 });
 request.interceptors.request.use(config=>{
 	// let token = window.localStorage.getItem("token")

+ 27 - 0
src/api/types/questionTwoList.d.ts

@@ -0,0 +1,27 @@
+declare namespace questionTwoList {
+    interface row {
+        "an1": string,
+        "an2": string,
+        "an3": string,
+        "an4": string,
+        "an5": string,
+        "an6": string,
+        "an7": string,
+        "cartype": string,
+        "explainJs": string,
+        "id": number,
+        "image": string,
+        "kemu": number,
+        "name": string,
+        "num": number,
+        "rightAnswer": number,
+        "type": number,
+        "isExplainJs"?:Boolean
+    }
+    interface response {
+        code: number,
+        msg: string,
+        rows: row[]
+    }
+
+}

BIN
src/assets/img/aprilExam.png


BIN
src/assets/img/beforeTopics.png


BIN
src/assets/img/blueBus.png


BIN
src/assets/img/blueCar.png


BIN
src/assets/img/blueMoto.png


BIN
src/assets/img/blueTruck.png


BIN
src/assets/img/nextTopics.png


BIN
src/assets/img/noimg.png


BIN
src/assets/img/okimg.png


BIN
src/assets/img/whiteBus.png


BIN
src/assets/img/whiteCar.png


BIN
src/assets/img/whiteMoto.png


BIN
src/assets/img/whiteTruck.png


+ 47 - 0
src/assets/json/questionTwoList.json

@@ -0,0 +1,47 @@
+{
+	"code": 200,
+	"msg": "成功",
+	"rows": [
+		{
+			"createTime": "2022-03-30 10:49:00",
+			"updateTime": "2022-03-30 10:54:21",
+			"an1": "正确",
+			"an2": "错误",
+			"an3": "",
+			"an4": "",
+			"an5": "",
+			"an6": "",
+			"an7": "",
+			"cartype": "",
+			"explainJs": "《机动车驾驶证申请和使用规定》第八十条:机动车驾驶人在实习期内发生的道路交通安全违法行为被记满12分的,注销其实习的准驾车型驾驶资格",
+			"id": 0,
+			"image": "",
+			"kemu": 0,
+			"name": "",
+			"num": 0,
+			"rightAnswer": 1,
+			"type": 0
+		},
+		{
+			"createTime": "2022-03-30 10:49:00",
+			"updateTime": "2022-03-30 10:54:21",
+			"id": 93,
+			"num": 93,
+			"name": "允许自学直考人员使用图中小型客车教练车,在学车专用标识签注的指导人员随车指导下学习驾驶。",
+			"image": "https://wos.58cdn.com.cn/XyVuTsRqXyf/question/22670-1561968327494.webp",
+			"rightAnswer": 2,
+			"explainJs": "《机动车驾驶证申领和使用规定》第二十六条:实行小型汽车、小型自动挡汽车驾驶证自学直考的地方,申请人可以使用加装安全辅助装置的自备机动车,在具备安全驾驶经历等条件的人员随车指导下,按照公安机关交通管理部门指定的路线、时间学习驾驶技能,按照第二十三条的规定申请相应准驾车型的驾驶证。",
+			"type": 1,
+			"an1": "正确",
+			"an2": "错误",
+			"an3": null,
+			"an4": null,
+			"an5": null,
+			"an6": null,
+			"an7": null,
+			"kemu": 1,
+			"cartype": "0,1,2"
+		}
+	],
+	"total": 0
+}

+ 1 - 1
src/components/mask/submitMask.vue

@@ -79,7 +79,7 @@ export default {
       backView,
     };
   },
-  beforeDestroy() {
+  beforeUnmount() {
     window.clearInterval(this.timer);
   },
   props: {

+ 4 - 0
src/hooks/examTest.ts

@@ -431,7 +431,11 @@ export function useExamTest() {
     let errorScore = ref(0)
     let beforeSubmitVisible = ref(false)
     let submitVisible = ref(false)
+
     let submitScore = () => {
+        //重置为0,不然会有数据不准确的bug
+        correctScore.value = 0
+        errorScore.value = 0
         list.value.forEach(item => {
             correctScore.value += item.answer == item.userAnswer ? 1 : 0
             if (item.userAnswer) {

+ 13 - 1
src/main.ts

@@ -3,5 +3,17 @@ import App from './App';
 import router from './router';
 import store from './store';
 import '@/style/index.scss';
+import "vant/lib/index.css";
+let app = createApp(App)
+app.directive('opacity', {
+    mounted(el, binding) {
+        console.log(binding.value)
+        // binding.value 是我们传递给指令的值——在这里是 200 //透明度
+        el.style.opacity = binding.value?1:0
+    },
+    updated(el,binding){
+        el.style.opacity = binding.value?1:0
 
-createApp(App).use(router).use(store).mount('#app');
+    }
+})
+app.use(router).use(store).mount('#app');

+ 6 - 0
src/router/index.ts

@@ -31,6 +31,12 @@ const routes: RouteRecordRaw[] = [
     name: 'examScore',
     component: () => import('../views/exam/score.vue'),
   },
+  {
+    path: '/aprilExam/test',
+    name: 'aprilExamTest',
+    component: () => import('../views/aprilExam/test.vue'),
+
+  }
 ];
 
 const router = createRouter({

+ 594 - 0
src/views/aprilExam/test.vue

@@ -0,0 +1,594 @@
+<template>
+  <div>
+    <div class="container">
+      <div class="tab">
+        <div
+          v-for="(item, index) in tabItemList"
+          :key="index"
+          class="tab-item"
+          @click="
+            () => {
+              tabItemListIndex = index;
+              getPage(index);
+            }
+          "
+          :class="{
+            'tab-item_select': tabItemListIndex == index,
+          }"
+        >
+          <img class="tab-img" v-if="tabItemListIndex !== index" :src="item.whiteImg" />
+          <img class="tab-img" v-if="tabItemListIndex === index" :src="item.blueImg" />
+          <span class="tabItem-title">{{ item.title }}</span>
+        </div>
+      </div>
+      <div class="topics">
+        <div class="topics-title"></div>
+        <div class="topics-content">
+          {{ list[listIndex].explainJs }}
+        </div>
+      </div>
+      <div class="options">
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 1)"
+          v-if="list[listIndex].an1"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 1 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 1 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">A</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 1 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 1 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an1 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 2)"
+          v-if="list[listIndex].an2"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 2 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 2 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">B</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 2 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 2 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an2 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 3)"
+          v-if="list[listIndex].an3"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 3 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 3 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">C</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 3 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 3 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an3 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 4)"
+          v-if="list[listIndex].an4"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 4 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 4 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">D</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 4 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 4 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an4 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 5)"
+          v-if="list[listIndex].an5"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 5 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 5 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">E</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 5 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 5 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an5 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+
+        <div
+          class="options-select"
+          @click="selectAnswer(list[listIndex], 6)"
+          v-if="list[listIndex].an6"
+        >
+          <div class="options-selectText">
+            <img
+              src="@/assets/img/okimg.png"
+              v-if="list[listIndex].rightAnswer == 6 && list[listIndex].isExplainJs"
+              class="options-selectText-okimg"
+            />
+            <img
+              src="@/assets/img/noimg.png"
+              v-if="list[listIndex].rightAnswer !== 6 && list[listIndex].isExplainJs"
+              class="options-selectText-noimg"
+            />
+            <div class="options-selectText-header">F</div>
+            <div
+              class="options-selectText-mid"
+              :class="{
+                'options-selectText-mid_selectOk':
+                  list[listIndex].rightAnswer == 6 && list[listIndex].isExplainJs,
+                'options-selectText-mid_selectNo':
+                  list[listIndex].rightAnswer !== 6 && list[listIndex].isExplainJs,
+              }"
+            >
+              {{ list[listIndex].an6 }}
+            </div>
+          </div>
+          <div class="options-bg"></div>
+        </div>
+      </div>
+      <div class="explain" v-opacity="list[listIndex].isExplainJs">
+        <div class="explain-answer">
+          <div class="explain-answerText">
+            <span>正确答案:</span>
+            <span style="color: #12af85">{{ answerIndexMap[list[listIndex].rightAnswer] }}</span>
+          </div>
+        </div>
+        <div class="explain-header">题目解析</div>
+        <div class="explain-content">
+          《机动车驾驶证申请和使用规定》第八十条:机动车驾驶人在实习期内发生的道路交通安全违法行为被记满12分的,注销其实习的准驾车型驾驶资格
+        </div>
+      </div>
+      <div class="bottom">
+        <div class="bottom-container">
+          <img @click="backTopics" src="@/assets/img/beforeTopics.png" />
+          <span>
+            <span style="color: #ffac4d">{{ listIndex + 1 }}</span
+            >/{{ list.length }}
+          </span>
+          <img @click="nextTopics" src="@/assets/img/nextTopics.png" />
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { reactive, ref } from 'vue';
+import { Toast } from 'vant';
+import api from '@/api/api';
+import blueTabItemImg0 from '@/assets/img/blueCar.png';
+import blueTabItemImg1 from '@/assets/img/blueBus.png';
+import blueTabItemImg2 from '@/assets/img/blueTruck.png';
+import blueTabItemImg3 from '@/assets/img/blueMoto.png';
+
+import whiteTabItemImg0 from '@/assets/img/whiteCar.png';
+import whiteTabItemImg1 from '@/assets/img/whiteBus.png';
+import whiteTabItemImg2 from '@/assets/img/whiteTruck.png';
+import whiteTabItemImg3 from '@/assets/img/whiteMoto.png';
+const tabItemListIndex = ref(0);
+const answerIndexMap = ['!', 'A', 'B', 'C', 'D', 'E', 'F', 'G'];
+const tabItemList = [
+  {
+    blueImg: blueTabItemImg0,
+    whiteImg: whiteTabItemImg0,
+    title: '小车',
+  },
+  {
+    blueImg: blueTabItemImg1,
+    whiteImg: whiteTabItemImg1,
+    title: '客车',
+  },
+  {
+    blueImg: blueTabItemImg2,
+    whiteImg: whiteTabItemImg2,
+    title: '货车',
+  },
+  {
+    blueImg: blueTabItemImg3,
+    whiteImg: whiteTabItemImg3,
+    title: '摩托车',
+  },
+];
+let list = ref<questionTwoList.row[]>([
+  {
+    an1: '正确',
+    an2: '错误',
+    an3: '',
+    an4: '',
+    an5: '',
+    an6: '',
+    an7: '',
+    cartype: '',
+    explainJs:
+      '《机动车驾驶证申请和使用规定》第八十条:机动车驾驶人在实习期内发生的道路交通安全违法行为被记满12分的,注销其实习的准驾车型驾驶资格',
+    id: 0,
+    image: '',
+    kemu: 0,
+    name: '',
+    num: 0,
+    rightAnswer: 0,
+    type: 0,
+  },
+]);
+let listIndex = ref(0);
+let list0 = ref<questionTwoList.row[]>([]);
+let list1 = ref<questionTwoList.row[]>([]);
+let list2 = ref<questionTwoList.row[]>([]);
+let list3 = ref<questionTwoList.row[]>([]);
+const query = {
+  pageNum: 1,
+  pageSize: 1000,
+  cartype: '0' as '0' | '1' | '2' | '3',
+  kemu: 1,
+};
+let getPage = (index: number) => {
+  let indexStr = String(index);
+  query.cartype = indexStr as '0' | '1' | '2' | '3';
+  switch (index) {
+    case 0:
+      if (list0.value.length == 0) {
+        api.questionTwoList(query).then((res) => {
+          list0.value = res.data.rows;
+          list.value = res.data.rows;
+        });
+      } else {
+        list.value = list0.value;
+      }
+
+      break;
+    case 1:
+      if (list1.value.length == 0) {
+        api.questionTwoList(query).then((res) => {
+          list1.value = res.data.rows;
+          list.value = res.data.rows;
+        });
+      } else {
+        list.value = list1.value;
+      }
+
+      break;
+    case 2:
+      if (list2.value.length == 0) {
+        api.questionTwoList(query).then((res) => {
+          list2.value = res.data.rows;
+          list.value = res.data.rows;
+        });
+      } else {
+        list.value = list2.value;
+      }
+
+      break;
+    case 3:
+      if (list3.value.length == 0) {
+        api.questionTwoList(query).then((res) => {
+          list3.value = res.data.rows;
+          list.value = res.data.rows;
+        });
+      } else {
+        list.value = list3.value;
+      }
+
+      break;
+  }
+};
+let nextTopics = () => {
+  if (listIndex.value == list.value.length - 1) {
+    Toast('到底了');
+    return;
+  } else {
+    listIndex.value = listIndex.value + 1;
+  }
+};
+let backTopics = () => {
+  if (listIndex.value == 0) {
+    Toast('到底了');
+    return;
+  } else {
+    listIndex.value = listIndex.value - 1;
+  }
+};
+let selectAnswer = (item: questionTwoList.row, index: number) => {
+  item.isExplainJs = true;
+  console.log(item);
+};
+//初始获取题目
+getPage(0);
+
+//truck
+</script>
+
+<style lang="scss" scoped>
+.container {
+  width: 100vw;
+  height: 100vh;
+  background-image: url('./../../assets/img/aprilExam.png');
+  background-size: 100%;
+  padding-bottom: 136px;
+  overflow-y: scroll;
+}
+.tab {
+  padding: 0px 60px;
+  padding-top: 32px;
+  display: flex;
+  justify-content: space-around;
+
+  .tab-item {
+    display: flex;
+
+    align-content: center;
+    align-items: center;
+    width: 140px;
+    height: 60px;
+    padding: 0px 15px;
+    padding-left: 10px;
+    justify-content: space-between;
+    white-space: nowrap;
+    color: #fff;
+    .tabItem-title {
+      font-size: 26px;
+    }
+  }
+  .tab-item_select {
+    background: #fff;
+    border: 4px solid #2d2d2d;
+    border-radius: 35px;
+    color: #498ef5;
+  }
+  .tab-img {
+    width: 40px;
+    height: 24px;
+  }
+}
+.topics {
+  width: 690px;
+  margin: 0 auto;
+  margin-top: 154px;
+  border: 5px solid #2d2d2d;
+  padding: 26px 0;
+  position: relative;
+  background: #fff;
+  border-radius: 8px;
+  .topics-title::before {
+    content: '判断';
+    color: white;
+  }
+  .topics-title {
+    position: absolute;
+    top: 26px;
+    width: 88px;
+    height: 44px;
+    left: -5px;
+    background: #01c18d;
+    border: 5px solid #333;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .topics-content {
+    text-align: left;
+    font-size: 30px;
+    text-indent: 3em;
+    font-weight: 600;
+  }
+}
+.options {
+  width: 100%;
+  margin-top: 30px;
+  padding-left: 60px;
+  .options-select {
+    width: 644px;
+    height: 98px;
+    position: relative;
+    margin-bottom: 26px;
+  }
+  .options-selectText {
+    border: 5px solid #2d2d2d;
+    height: 84px;
+    line-height: 84px;
+    display: flex;
+    align-content: center;
+    align-items: center;
+    background: #fff;
+    border-radius: 8px;
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 630px;
+    z-index: 10;
+  }
+  .options-selectText-header {
+    background: #ffac4d;
+    width: 56px;
+    height: 56px;
+    border: 3px solid #2d2d2d;
+    position: relative;
+    left: -3px;
+    display: flex;
+    justify-content: center;
+    align-content: center;
+    align-items: center;
+    color: white;
+    border-radius: 8px;
+  }
+
+  .options-selectText-mid {
+    margin-left: 20px;
+  }
+  .options-selectText-mid_selectOk {
+    color: #12af85;
+  }
+  .options-selectText-mid_selectNo {
+    color: #ff4d53;
+  }
+  .options-selectText-okimg {
+    position: absolute;
+    right: 28px;
+    width: 28px;
+    height: 28px;
+  }
+  .options-selectText-noimg {
+    position: absolute;
+    right: 28px;
+    width: 28px;
+    height: 28px;
+  }
+  .options-bg {
+    width: 630px;
+    height: 84px;
+    background: #d6b352;
+    border: 5px solid #2d2d2d;
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    border-radius: 8px;
+    overflow: hidden;
+  }
+}
+.explain {
+  margin-top: 60px;
+  width: 690px;
+  border: 4px solid #2d2d2d;
+  margin: 0 auto;
+  background: #fff;
+  padding-bottom: 20px;
+  .explain-answer {
+    height: 86px;
+    display: flex;
+    align-items: flex-end;
+    font-size: 32px;
+    font-weight: 700;
+    .explain-answerText {
+      width: 630px;
+      margin: 0 auto;
+      text-align: left;
+      border-bottom: 2px solid #cccccc;
+    }
+  }
+  .explain-header {
+    margin-top: 32px;
+    text-align: left;
+    padding-left: 30px;
+    font-weight: 600;
+  }
+  .explain-content {
+    font-size: 24px;
+    text-align: left;
+    padding: 8px 30px;
+  }
+}
+.bottom {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  height: 136px;
+  background: #fff;
+  display: flex;
+  align-content: center;
+  align-items: center;
+  padding: 0 60px;
+  .bottom-container {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    height: 60px;
+    line-height: 60px;
+    font-weight: 700;
+    img {
+      width: 60px;
+      height: 60px;
+    }
+  }
+}
+</style>

+ 10 - 9
src/views/exam/begin.vue

@@ -22,7 +22,9 @@
             <div class="info">驾考理论考试01号考台:</div>
             <div style="color: #ba2f35" class="box2-id">身份证号:123456789101112131415161718</div>
             <div class="box2-space1"></div>
-            <div class="box2-name" style="color: #ba2f35">考生姓名:极速驾培</div>
+            <div class="box2-name" style="color: #ba2f35">
+              考生姓名:{{ query.username || '张三' }}
+            </div>
             <div class="pl124 exam-container">
               <div
                 @click="
@@ -40,7 +42,7 @@
             </div>
             <div class="mt14" style="color: #ba2f35">点击"确认"按钮开始考试</div>
             <div class="box2-tip" style="color: #666769">
-             操作提示:每题考试答案确认后,点击【下一题】,电脑立即判定所选答案,如选择错误,系统将提示正确答案,提示后不允许修改答案。
+              操作提示:每题考试答案确认后,点击【下一题】,电脑立即判定所选答案,如选择错误,系统将提示正确答案,提示后不允许修改答案。
             </div>
           </div>
         </div>
@@ -64,7 +66,7 @@ export default defineComponent({
     // );
     //旋转你的屏幕
     const phone = new Phone();
-    const backView = phone.backView.bind(phone)
+    const backView = phone.backView.bind(phone);
     const push = useRouter().push;
     const route = useRoute();
     const query = route.query;
@@ -83,7 +85,7 @@ export default defineComponent({
       query,
       push,
       subjectImg,
-      backView
+      backView,
     };
   },
 });
@@ -129,7 +131,7 @@ export default defineComponent({
   flex-direction: column;
   background: #fff;
   position: relative;
-  .backButton{
+  .backButton {
     position: absolute;
     top: 28px;
     left: 13px;
@@ -211,15 +213,15 @@ export default defineComponent({
     .box2-space1 {
       height: 5px;
     }
-    .box2-id{
+    .box2-id {
       font-weight: 700;
       font-size: 13px;
     }
-     .box2-name{
+    .box2-name {
       font-weight: 700;
       font-size: 13px;
     }
-    .box2-tip{
+    .box2-tip {
       margin-top: 7px;
       font-size: 11px;
     }
@@ -227,7 +229,6 @@ export default defineComponent({
       margin-bottom: 7px;
       font-size: 14px;
       font-weight: 700;
-
     }
   }
 }

+ 23 - 5
tsconfig.json

@@ -1,21 +1,39 @@
 {
-  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
+  "include": [
+    "src/**/*.ts",
+    "src/**/*.d.ts",
+    "src/**/*.tsx",
+    "src/**/*.vue"
+  ],
   "compilerOptions": {
+    "baseUrl": "./",
     "paths": {
-      "@/*": ["src/*"],
+      "@/*": [
+        "src/*"
+      ],
     },
     "jsx": "preserve",
     "target": "esnext",
     "module": "esnext",
     "sourceMap": true,
     "outDir": "./dist",
-    "lib": ["esnext", "dom"],
-    "types": ["vite/client", "node"],
+    "lib": [
+      "esnext",
+      "dom"
+    ],
+    "types": [
+      "vite/client",
+      "node"
+    ],
     "strict": true,
     "noUnusedLocals": true,
     "noImplicitReturns": true,
     "moduleResolution": "node",
     "esModuleInterop": true,
-    "plugins": [{ "name": "@vuedx/typescript-plugin-vue" }]
+    "plugins": [
+      {
+        "name": "@vuedx/typescript-plugin-vue"
+      }
+    ]
   }
 }