From c00e8941aaa8acee4950978071571a5de2679dd1 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 08 四月 2024 14:36:09 +0800
Subject: [PATCH] 保存纤度登记的接口,字段类型调整,处理数据格式+联调获取纤度检验列表的接口,字段调试

---
 src/common/untils/request.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 9270bbc..5da21ec 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -16,7 +16,13 @@
     // if (token != undefined) {
     //   config.headers.Authorization = "Bearer " + token;
     // }
-
+    let token = document.cookie.replace(
+      /(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/,
+      "$1",
+    );
+    if (token) {
+      config.headers.Authorization = "Bearer " + token;
+    }
     return config
   },
   (error) => {

--
Gitblit v1.8.0