|
|
@@ -1304,9 +1304,24 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
|
|
|
|
if (app.key === "pms") {
|
|
|
- protectedOpen(
|
|
|
- `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}`,
|
|
|
- );
|
|
|
+ const pmsDesktopUrl = `${import.meta.env.VITE_PMS_URL}/portalLogin?username=${userStore.getUser.username}`;
|
|
|
+ const pmsMobileUrl = `https://aims.deepoil.cc/deepoil/#/pages/entry/index?username=${userStore.getUser.username}`;
|
|
|
+ const ua = window.navigator.userAgent;
|
|
|
+ const isDesktopDingTalk =
|
|
|
+ isDingTalkClient() &&
|
|
|
+ (ua.includes("Windows") || ua.includes("Macintosh"));
|
|
|
+
|
|
|
+ if (isDingTalkClient() && !isDesktopDingTalk) {
|
|
|
+ if (userStore.getUser.username && getAccessToken()) {
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: pmsMobileUrl,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ router.push({ path: "/login" });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ protectedOpen(pmsDesktopUrl);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (app.key === "zhonghang") {
|