|
|
@@ -181,7 +181,6 @@ import { useUserStore } from "@/stores/useUserStore";
|
|
|
import { getAccessToken } from "@/utils/auth";
|
|
|
import * as echarts from "echarts";
|
|
|
import { useRouter } from "vue-router";
|
|
|
-import { pa } from "element-plus/es/locales.mjs";
|
|
|
const router = useRouter();
|
|
|
|
|
|
const userStore = useUserStore();
|
|
|
@@ -413,28 +412,58 @@ const go = async (item) => {
|
|
|
});
|
|
|
|
|
|
if (res) {
|
|
|
- const newTab = window.open("", "_blank");
|
|
|
+ const ua = window.navigator.userAgent.toLowerCase();
|
|
|
+ if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
+ const targetUrl1 = item.indexUrl + "?ssoToken=" + res + "#/main";
|
|
|
+ const targetUrl2 = item.flowUrl;
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: targetUrl1, // 先跳你的 SSO 链接
|
|
|
+ onSuccess: () => {
|
|
|
+ // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
+ setTimeout(() => {
|
|
|
+ dd.biz.util.openLink({ url: targetUrl2 });
|
|
|
+ }, 100);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const newTab = window.open("", "_blank");
|
|
|
+
|
|
|
+ newTab.location.href = item.indexUrl + "?ssoToken=" + res + "#/main";
|
|
|
+
|
|
|
+ setTimeout(function () {
|
|
|
+ newTab.location.href = item.flowUrl;
|
|
|
+ }, 100);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- newTab.location.href = item.indexUrl + "?ssoToken=" + res + "#/main";
|
|
|
+ if (item.type === "CRM") {
|
|
|
+ const ua = window.navigator.userAgent.toLowerCase();
|
|
|
+ if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url:
|
|
|
+ item.indexUrl +
|
|
|
+ "/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=" +
|
|
|
+ getAccessToken(), // 先跳你的 SSO 链接
|
|
|
+ onSuccess: () => {
|
|
|
+ // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
+ setTimeout(() => {
|
|
|
+ dd.biz.util.openLink({ url: item.flowUrl });
|
|
|
+ }, 100);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const newTab = window.open("", "_blank");
|
|
|
+ newTab.location.href =
|
|
|
+ item.indexUrl +
|
|
|
+ "/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=" +
|
|
|
+ getAccessToken();
|
|
|
|
|
|
setTimeout(function () {
|
|
|
newTab.location.href = item.flowUrl;
|
|
|
}, 100);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if (item.type === "CRM") {
|
|
|
- const newTab = window.open("", "_blank");
|
|
|
-
|
|
|
- newTab.location.href =
|
|
|
- item.indexUrl +
|
|
|
- "/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=" +
|
|
|
- getAccessToken();
|
|
|
-
|
|
|
- setTimeout(function () {
|
|
|
- newTab.location.href = item.flowUrl;
|
|
|
- }, 100);
|
|
|
- }
|
|
|
} else {
|
|
|
router.push({ path: "/login" });
|
|
|
}
|