ZaiZai 2 éve
szülő
commit
6b3ae5343d
3 módosított fájl, 14 hozzáadás és 8 törlés
  1. 1 1
      public/version.json
  2. 10 1
      src/api/request/httpApi.js
  3. 3 6
      src/components/message/index.vue

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20230726095855"
+  "value": "20230808163511"
 }

+ 10 - 1
src/api/request/httpApi.js

@@ -26,7 +26,7 @@ const getResData = async (response, error = false) => {
         const httpData = {
             response, res: data, data: resData?.data,
             code: resData?.code, msg: resData?.msg, status: response?.status,
-            disposition: headers['content-disposition'],
+            headers: headers, disposition: getDisposition(headers),
             message: getMsgVal(response), error: error,
         }
         //处理延迟响应
@@ -60,3 +60,12 @@ const getMsgVal = (response) => {
         return msg || error_description || '未知错误'
     }
 }
+
+//响应头中获取content-disposition
+const getDisposition = (headers) => {
+    try {
+        return headers['content-disposition']
+    } catch {
+        return ''
+    }
+}

+ 3 - 6
src/components/message/index.vue

@@ -72,17 +72,14 @@ const texts = ref(props.text)
         margin-bottom: 10px;
     }
 }
-html.dark {
+
+//深色模式
+html.dark .hc-message-box {
     .title {
-        position: relative;
-        font-size: 20px;
         color:white;
-        margin-bottom: 20px;
     }
     .text {
         color:white;
-        font-size: 14px;
-        margin-bottom: 10px;
     }
 }
 </style>