|
|
@@ -1053,6 +1053,9 @@ const protectedOpen = (url: string) => {
|
|
|
|
|
|
let dialogVisible = ref(false);
|
|
|
|
|
|
+let ua2 = navigator.userAgent.toLowerCase();
|
|
|
+let isDing = ua2.includes("dingtalk") || ua2.includes("dingtalkwork");
|
|
|
+
|
|
|
const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
if (!app.label) return;
|
|
|
|
|
|
@@ -1306,11 +1309,18 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
|
|
|
if (app.label === "绩效管理(OKR)") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
- dd.biz.util.openLink({
|
|
|
- url: `https://dingokr.eapps.dingtalkcloud.com/web/index.html?corpId=dingbe7f9a7e8cffa2bd35c2f4657eb6378f`,
|
|
|
+ if (isDing) {
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: `https://dingokr.eapps.dingtalkcloud.com/web/index.html?corpId=dingbe7f9a7e8cffa2bd35c2f4657eb6378f`,
|
|
|
|
|
|
- onSuccess: () => {},
|
|
|
- });
|
|
|
+ onSuccess: () => {},
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ window.open(
|
|
|
+ `https://dingokr.eapps.dingtalkcloud.com/web/index.html?corpId=dingbe7f9a7e8cffa2bd35c2f4657eb6378f`,
|
|
|
+ "_blank",
|
|
|
+ );
|
|
|
+ }
|
|
|
} else {
|
|
|
router.push({ path: "/login" });
|
|
|
}
|