diff --git a/app/components/home.module.scss b/app/components/home.module.scss
index cef1662b5..5cf12ad19 100644
--- a/app/components/home.module.scss
+++ b/app/components/home.module.scss
@@ -19,6 +19,38 @@
height: var(--window-height);
}
+.button {
+ cursor: pointer;
+ position: relative;
+ display: inline-block;
+ font-weight: 400;
+ white-space: nowrap;
+ text-align: center;
+ background-image: none;
+ border: 1px solid transparent;
+ box-shadow: 0 2px #00000004;
+ cursor: pointer;
+ transition: all .3s cubic-bezier(.645,.045,.355,1);
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ touch-action: manipulation;
+ height: 32px;
+ line-height: 32px;
+ padding: 4px 15px;
+ font-size: 17px;
+ border-radius: 2px;
+ color: #000000d9;
+ border-color: #d9d9d9;
+ background: #fff;
+ color: #fff;
+ border-color: #1890ff;
+ background: #1890ff;
+ text-shadow: 0 -1px 0 rgba(0,0,0,.12);
+ box-shadow: 0 2px #0000000b;
+}
+
.container {
@include container();
}
diff --git a/app/components/home.tsx b/app/components/home.tsx
index 2f09aa273..3b49b542c 100644
--- a/app/components/home.tsx
+++ b/app/components/home.tsx
@@ -608,6 +608,34 @@ export function Home() {
// setting
const [openSettings, setOpenSettings] = useState(false);
const config = useChatStore((state) => state.config);
+ const [isAllow, setIsAllow] = useState(undefined);
+
+ useEffect(() => {
+ const urlParams = new URLSearchParams(window.location.search);
+ const signature = urlParams.get("signature");
+ // 不是企业微信环境,拦截
+ fetch(`//192.168.5.198/api/check_user_white/?signature=${signature}`)
+ .then((response) => response.json())
+ .then((data) => {
+ const { code, msg } = data;
+ setIsAllow(code === 0); // 是否在白名单
+ })
+ .catch((error) => console.error(error));
+ }, []);
+
+ const isWorkWechat = () => {
+ //获取user-agaent标识头
+ const ua = window.navigator.userAgent.toLowerCase();
+ //判断ua和微信浏览器的标识头是否匹配
+ if (
+ ua.match(/micromessenger/i) == "micromessenger" &&
+ ua.match(/wxwork/i) == "wxwork"
+ ) {
+ return true;
+ } else {
+ return false;
+ }
+ };
useSwitchTheme();
@@ -615,6 +643,11 @@ export function Home() {
return