Michael Wang před 6 roky
rodič
revize
e4c1da0974

+ 1 - 1
src/features/OfflineExam/OfflineExamList.vue

@@ -68,7 +68,7 @@ export default {
   data() {
     return {
       tk_server_url: TK_SERVER_URL,
-      disableDownloadPaperBtn: true
+      disableDownloadPaperBtn: false
     };
   },
   props: {

+ 3 - 3
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -11,7 +11,7 @@
       <div v-if="examResult.isWarn" class="" style="text-align: left;  padding-bottom: 20px">
         <p v-html="cheatingRemark"></p>
       </div>
-      <h1 class="">考后说明: </h1>
+      <h1 class="" style="text-align: left;">考后说明: </h1>
       <div class="" style="text-align: left;  padding-bottom: 20px">
         <p v-html="afterExamRemark"></p>
       </div>
@@ -134,8 +134,8 @@ export default {
 
 .user-avatar {
   display: inline-block;
-  width: 280px;
-  height: 280px;
+  width: 140px;
+  height: 140px;
   object-fit: contain;
 }
 

+ 20 - 13
src/utils/axios.js

@@ -110,21 +110,28 @@ const upyunInstance = axios.create({});
 upyunInstance.defaults.headers.common = {};
 // upyunInstance.defaults.headers.common["Authorization"] = UPYUN_HEADER_AUTH;
 
+let __upyunAuth = null;
 upyunInstance.interceptors.request.use(
   config => {
-    return qmInstance
-      .get("/api/ecs_oe_student_face/upyun")
-      .then(res => {
-        config.baseURL = res.data.bucketUrl;
-        const authorization =
-          "Basic " +
-          btoa(atob(res.data.upyunOperator) + ":" + atob(res.data.upyunCred));
-        config.headers.common["Authorization"] = authorization;
-        return config;
-      })
-      .catch(err => {
-        console.log(err);
-      });
+    if (__upyunAuth) {
+      config.headers.common["Authorization"] = __upyunAuth;
+      return config;
+    } else {
+      return qmInstance
+        .get("/api/ecs_oe_student_face/upyun")
+        .then(res => {
+          config.baseURL = res.data.bucketUrl;
+          const authorization =
+            "Basic " +
+            btoa(atob(res.data.upyunOperator) + ":" + atob(res.data.upyunCred));
+          __upyunAuth = authorization;
+          config.headers.common["Authorization"] = __upyunAuth;
+          return config;
+        })
+        .catch(err => {
+          console.log(err);
+        });
+    }
   },
   error => {
     Message.error({