Browse Source

提测前微处理

刘洋 1 year ago
parent
commit
e9b9adc28a
4 changed files with 16 additions and 13 deletions
  1. 1 1
      .env
  2. 1 1
      src/api/common.js
  3. 11 3
      src/pages/examGuidance.vue
  4. 3 8
      src/pages/examNotice.vue

+ 1 - 1
.env

@@ -1 +1 @@
-VITE_WEIXIN_APPID=1234567
+VITE_WEIXIN_APPID=wx90d496f6838bcff7

+ 1 - 1
src/api/common.js

@@ -3,7 +3,7 @@ import request from "@/api/apiConfig";
 //获取系统常用属性
 //获取系统常用属性
 export function getProperties() {
 export function getProperties() {
   return request({
   return request({
-    url: "/api/system/properties",
+    url: "/api/student/system/properties",
     method: "post",
     method: "post",
     noAuth: true,
     noAuth: true,
   });
   });

+ 11 - 3
src/pages/examGuidance.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
-  <div class="page exam-guidance">
+  <div class="page exam-guidance p-16">
     <div class="title">考场引导</div>
     <div class="title">考场引导</div>
-    <div class="content" v-html="ct"></div>
+    <div class="content" v-html="cutNbsp(ct)"></div>
   </div>
   </div>
 </template>
 </template>
 <script name="ExamGuidance" setup>
 <script name="ExamGuidance" setup>
@@ -11,7 +11,12 @@ import { getRoomGuide } from "@/api/user";
 
 
 const route = useRoute();
 const route = useRoute();
 const ct = ref("");
 const ct = ref("");
-
+function cutNbsp(ct) {
+  if (typeof ct !== "string") {
+    return ct;
+  }
+  return ct.replace(/&nbsp;/g, " ");
+}
 //获取考场引导
 //获取考场引导
 function _getRoomGuide() {
 function _getRoomGuide() {
   getRoomGuide({ examRoomId: route.params?.examRoomId }).then((res) => {
   getRoomGuide({ examRoomId: route.params?.examRoomId }).then((res) => {
@@ -23,5 +28,8 @@ _getRoomGuide();
 <style lang="less" scoped>
 <style lang="less" scoped>
 .exam-guidance {
 .exam-guidance {
   background: #fff;
   background: #fff;
+  .content {
+    margin-top: 20px;
+  }
 }
 }
 </style>
 </style>

+ 3 - 8
src/pages/examNotice.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div class="page exam-notice">
+  <div class="page exam-notice p-16">
     <div class="title">考试须知</div>
     <div class="title">考试须知</div>
     <div class="content" v-html="cutNbsp(ct)"></div>
     <div class="content" v-html="cutNbsp(ct)"></div>
   </div>
   </div>
@@ -10,22 +10,17 @@ import { useRoute } from "vue-router";
 import { getExamNotice } from "@/api/user";
 import { getExamNotice } from "@/api/user";
 
 
 const route = useRoute();
 const route = useRoute();
-const ct = ref(
-  `
-  <p>Peter&rsquo;s&nbsp;job&nbsp;was&nbsp;to&nbsp;examine&nbsp;cars&nbsp;when&nbsp;they&nbsp;crossed&nbsp;the&nbsp;frontier&nbsp;to&nbsp;make&nbsp;sure&nbsp;that&nbsp;they&nbsp;were&nbsp;not&nbsp;smuggling&nbsp;anything&nbsp;into&nbsp;the&nbsp;country.&nbsp;Every&nbsp;evening&nbsp;he&nbsp;would&nbsp;see&nbsp;a&nbsp;factory&nbsp;worker&nbsp;coming&nbsp;___1___the&nbsp;hill&nbsp;towards&nbsp;the&nbsp;frontier,&nbsp;___2___a&nbsp;bike&nbsp;with&nbsp;a&nbsp;pile&nbsp;of&nbsp;goods&nbsp;of&nbsp;old&nbsp;straw&nbsp;on&nbsp;it.&nbsp;When&nbsp;the&nbsp;bike___3___&nbsp;the&nbsp;frontier,&nbsp;Peter&nbsp;would&nbsp;stop&nbsp;the&nbsp;man&nbsp;and___4___him&nbsp;take&nbsp;the&nbsp;straw&nbsp;off&nbsp;and&nbsp;untie&nbsp;it.&nbsp;Then&nbsp;he&nbsp;would&nbsp;examine&nbsp;the&nbsp;straw&nbsp;very___5___&nbsp;to&nbsp;see___6___he&nbsp;could&nbsp;find&nbsp;anything,&nbsp;after&nbsp;which&nbsp;he&nbsp;would&nbsp;look&nbsp;in&nbsp;all&nbsp;the&nbsp;man&rsquo;s&nbsp;pockets___7___he&nbsp;let&nbsp;him&nbsp;tie&nbsp;the&nbsp;straw&nbsp;again.&nbsp;The&nbsp;man&nbsp;would&nbsp;then&nbsp;put&nbsp;it&nbsp;on&nbsp;his&nbsp;bike&nbsp;and&nbsp;go&nbsp;off&nbsp;down&nbsp;the&nbsp;hill&nbsp;with&nbsp;it.&nbsp;Although&nbsp;Peter&nbsp;was&nbsp;always___8___to&nbsp;find&nbsp;gold&nbsp;or&nbsp;other&nbsp;valuable&nbsp;things&nbsp;___9___in&nbsp;the&nbsp;straw,&nbsp;he&nbsp;never&nbsp;found&nbsp;___10___.&nbsp;He&nbsp;was&nbsp;sure&nbsp;the&nbsp;man&nbsp;was&nbsp;smuggling&nbsp;something,&nbsp;but&nbsp;he&nbsp;was&nbsp;not&nbsp;able&nbsp;to&nbsp;think&nbsp;out&nbsp;what&nbsp;it&nbsp;could&nbsp;be.&nbsp;</p>
-  `
-);
+const ct = ref("");
 function cutNbsp(ct) {
 function cutNbsp(ct) {
   if (typeof ct !== "string") {
   if (typeof ct !== "string") {
     return ct;
     return ct;
   }
   }
   return ct.replace(/&nbsp;/g, " ");
   return ct.replace(/&nbsp;/g, " ");
 }
 }
-
 //获取考试须知
 //获取考试须知
 function _getExamNotice() {
 function _getExamNotice() {
   getExamNotice({ applyTaskId: route.params?.applyId }).then((res) => {
   getExamNotice({ applyTaskId: route.params?.applyId }).then((res) => {
-    // ct.value = res?.content || "";
+    ct.value = res?.content || "";
   });
   });
 }
 }
 _getExamNotice();
 _getExamNotice();