From f5e66da24d11103d19986d88428e17d6d4dd8b0f Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期四, 27 三月 2025 14:44:10 +0800
Subject: [PATCH] 数据监测

---
 src/utils/request.ts |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/utils/request.ts b/src/utils/request.ts
index be836d4..77501ee 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -119,6 +119,8 @@
 						const param = res.config.data ? `\n    璇锋眰鍙傛暟锛�${JSON.stringify(decodeFormData(res.config.data))}\n` : '';
 						ElMessage.error('鍐呴儴閿欒锛�');
 						Logger.error(`${res.config.url} 鍝嶅簲澶辫触${param}`, serveData?.json_msg && new Error(serveData?.json_msg));
+						throw '';
+
 						return res.data;
 				}
 				// 闈� message error锛屼笖 handleFail 涓� true
@@ -128,6 +130,7 @@
 					ElMessage.error(errorText);
 					const param = res.config.data ? `\n    璇锋眰鍙傛暟锛�${JSON.stringify(decodeFormData(res.config.data))}\n` : '';
 					Logger.error(`${res.config.url} 鍝嶅簲澶辫触${param}`, errorText && new Error(errorText));
+					throw '';
 				}
 			}
 			return res.data;
@@ -203,6 +206,7 @@
 	const domainPrefix = subDomainName ? `${subDomainName}-` : '';
 	return domainPrefix;
 };
+export const domainPrefix = getDomainPrefix(window);
 
 // token 閿畾涔�
 const sessionName = 'access-session';
@@ -212,7 +216,7 @@
 	phoneNumber?: string;
 };
 
-const getDomainKey = (suffix: string) => getDomainPrefix() + suffix;
+const getDomainKey = (suffix: string) => suffix;
 
 export const accessSessionKey = getDomainKey(sessionName);
 export const userInfoKey = getDomainKey(userInfoName);

--
Gitblit v1.9.3