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; },