From 5e10cc741165443f8efd64f75d759063fe0ea455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E5=BC=A0=E5=98=89=E5=AE=81=E2=80=9D?= <“zhangjianing@zhiketong.cn”> Date: Tue, 4 Apr 2023 14:43:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A4=E6=96=AD=E5=86=85=E7=BD=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/home.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/components/home.tsx b/app/components/home.tsx index ac4c1e3b9..9bfcd45cd 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -611,6 +611,7 @@ export function Home() { const [isAllow, setIsAllow] = useState(false); // 白名单状态 const [isRequestErr, setIsRequestErr] = useState(false); // 接口报错状态 const [isLoading, setIsLoading] = useState(false); + const [isNotInLan, setIsNotInLan] = useState(false); // 不在内网 useEffect(() => { getBaseInfo() @@ -631,6 +632,7 @@ export function Home() { } else { const { code, msg } = data; setIsAllow(code === 0); + setIsNotInLan(code === 403); } setIsLoading(false) } @@ -692,7 +694,11 @@ export function Home() { // 接口报错 isRequestErr ? (

服务出了点问题~

- ) : // 不在企业微信 + ) : + // 不在内网 + isNotInLan ? +

请在公司内网使用,无线连接到ZKT-Office或VPN连接

: + // 不在企业微信 !isWorkWechat() ? (

请在企业微信里使用ChatGPT,路径:企业微信--工作台--ChatGPT

) : // 不在白名单