From bc611830e8b4bb2a9b32ee332a4eaafedc31c855 Mon Sep 17 00:00:00 2001
From: sws <1141121512@qq.com>
Date: Fri, 16 Aug 2024 17:47:31 +0800
Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E7=83=AD=E5=8C=BA=E5=9B=9E?=
=?UTF-8?q?=E6=98=BE=E9=97=AE=E9=A2=98=20sws=202024-08-16?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/model-hot-zone/index copy.vue | 87 ++++++++++++++++++++
src/components/model-hot-zone/index.vue | 2 +-
src/utils/request.ts | 12 +--
3 files changed, 94 insertions(+), 7 deletions(-)
create mode 100644 src/components/model-hot-zone/index copy.vue
diff --git a/src/components/model-hot-zone/index copy.vue b/src/components/model-hot-zone/index copy.vue
new file mode 100644
index 00000000..1b7ea686
--- /dev/null
+++ b/src/components/model-hot-zone/index copy.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
diff --git a/src/components/model-hot-zone/index.vue b/src/components/model-hot-zone/index.vue
index be21a435..69180133 100644
--- a/src/components/model-hot-zone/index.vue
+++ b/src/components/model-hot-zone/index.vue
@@ -49,7 +49,7 @@ watch(
w_scale2.value = hotRef.value?.clientWidth / containerRef.value?.clientWidth;
h_scale2.value = hotRef.value?.clientHeight / containerRef.value?.clientHeight;
}
- }, 50);
+ }, 200);
},
{ immediate: true, deep: true }
);
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 69b56b29..998cc0db 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -15,12 +15,12 @@ service.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
// 如果是本地则使用静态tonken如果是线上则使用cookie的token
const cookie = get_cookie('admin_info');
- let token_key = '';
- if (cookie) {
- token_key = import.meta.env.VITE_APP_BASE_API == '/dev-api' ? '68f4eba5f67a758a972cca831885dfda' : JSON.parse(cookie);
- }
- if (token_key) {
- config.url = config.url + '?token=' + token_key;
+ if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
+ config.url = config.url + '?token=' + 'f714594929c39071f21856b885f91556';
+ } else {
+ if (cookie) {
+ config.url = config.url + '?token=' + JSON.parse(cookie).token;
+ }
}
return config;
},