From e6387fe6b7c18ae13336f6916f4ea37128d5922f Mon Sep 17 00:00:00 2001
From: Shan Ao <178391389@qq.com>
Date: Mon, 10 Mar 2025 16:19:06 +0800
Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9token=E7=BB=AD=E6=9C=9F?=
=?UTF-8?q?=E4=B8=BA=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E7=BB=AD=E6=9C=9F?=
=?UTF-8?q?=E7=9A=84=E6=96=B9=E5=BC=8F=202.=20=E7=89=B9=E7=BA=A7=E5=8A=A8?=
=?UTF-8?q?=E7=81=AB-=E4=B8=8A=E4=BC=A0=E4=BC=9A=E8=AE=AE=E7=BA=AA?=
=?UTF-8?q?=E8=A6=81=20=E5=A2=9E=E5=8A=A0=E7=9B=B8=E6=9C=BA=20=E7=9B=B8?=
=?UTF-8?q?=E5=86=8C=E9=80=89=E6=8B=A9=E7=9A=84=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/super-hot/security-committee/detail.vue | 9 ---------
utils/request.js | 14 +++++++++-----
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/pages/super-hot/security-committee/detail.vue b/pages/super-hot/security-committee/detail.vue
index ba4c1b2..058fc02 100644
--- a/pages/super-hot/security-committee/detail.vue
+++ b/pages/super-hot/security-committee/detail.vue
@@ -215,21 +215,12 @@
-
-
-
-
-
-
-
-
diff --git a/utils/request.js b/utils/request.js
index c80ca7c..0b6e470 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -1,7 +1,7 @@
// export var requestPath = 'https://skqhdg.porthebei.com:9005/qa-regulatory-gwj/'; // 后台请求地址
-export var requestPath = 'http://192.168.0.102:8060/new_template';
+export var requestPath = 'http://192.168.0.101:8060/new_template';
let videoApiPath = 'https://arqsp.qhdsafety.com:10010'; // 视频平台后台请求地址
import store from '../store/index'
@@ -31,10 +31,6 @@ function post(url, data) {
uni.hideLoading();
}
if (res.data.result === 'success') {
- if (dayjs().diff(dayjs(uni.getStorageSync('tokenTime')), "minute") >= 5) {
- uni.setStorageSync('tokenTime', dayjs().format("YYYY-MM-DD HH:mm:ss"))
- setRefreshToken();
- }
resolve(res.data)
} else {
if(url =='/admin/check'){
@@ -189,4 +185,12 @@ function videoApiGet(url, data) {
})
}
+setInterval(async () => {
+ if (uni.getStorageSync('tokenTime') == null) return;
+ if (dayjs().diff(dayjs(uni.getStorageSync('tokenTime')), "minute") >= 5) {
+ uni.setStorageSync('tokenTime', dayjs().format("YYYY-MM-DD HH:mm:ss"))
+ await setRefreshToken();
+ }
+}, 1000 * 60);
+
export {post, upload, uploads,setBasePath,videoApiGet}