|
|
@@ -501,19 +501,34 @@ const go = async (item) => {
|
|
|
if (item.type === "CRM") {
|
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
- dd.biz.util.openLink({
|
|
|
- url:
|
|
|
+ if (window.dd) {
|
|
|
+ const targetUrl = item.appUrl;
|
|
|
+ if (targetUrl) {
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: targetUrl,
|
|
|
+
|
|
|
+ onSuccess: () => {},
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: "https://crm-tencent.xiaoshouyi.com",
|
|
|
+
|
|
|
+ onSuccess: () => {},
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if (window.DingTalkPC) {
|
|
|
+ const newTab = window.open("", "_blank");
|
|
|
+ newTab.location.href =
|
|
|
item.indexUrl +
|
|
|
"/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=" +
|
|
|
- getAccessToken(), // 先跳你的 SSO 链接
|
|
|
- onSuccess: () => {
|
|
|
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
- setTimeout(() => {
|
|
|
- dd.biz.util.openLink({ url: item.flowUrl });
|
|
|
- }, 100);
|
|
|
- },
|
|
|
- });
|
|
|
+ getAccessToken();
|
|
|
+
|
|
|
+ setTimeout(function () {
|
|
|
+ newTab.location.href = item.flowUrl;
|
|
|
+ }, 3000);
|
|
|
+ }
|
|
|
} else {
|
|
|
+ // 浏览器环境
|
|
|
const newTab = window.open("", "_blank");
|
|
|
newTab.location.href =
|
|
|
item.indexUrl +
|
|
|
@@ -522,7 +537,7 @@ const go = async (item) => {
|
|
|
|
|
|
setTimeout(function () {
|
|
|
newTab.location.href = item.flowUrl;
|
|
|
- }, 100);
|
|
|
+ }, 3000);
|
|
|
}
|
|
|
}
|
|
|
} else {
|