|
@@ -340,20 +340,38 @@ const handleSizeChange = async (size) => {
|
|
|
|
|
|
|
|
const goBackPage = async (row) => {
|
|
const goBackPage = async (row) => {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
- const ua = window.navigator.userAgent.toLowerCase();
|
|
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url: `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
|
|
|
|
|
-
|
|
|
|
|
- onSuccess: () => {
|
|
|
|
|
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url: `https://crm-tencent.xiaoshouyi.com/bff/neoweb#/approval_workbench`,
|
|
|
|
|
- });
|
|
|
|
|
- }, 3000);
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const ua = window.navigator.userAgent; // const ua = navigator.userAgent;
|
|
|
|
|
+ const isDesktop =
|
|
|
|
|
+ ua.includes("DingTalk") &&
|
|
|
|
|
+ (ua.includes("Windows") || ua.includes("Macintosh"));
|
|
|
|
|
+
|
|
|
|
|
+ let ua2 = navigator.userAgent.toLowerCase();
|
|
|
|
|
+ var isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
|
|
+ if (isMobile && !isDesktop) {
|
|
|
|
|
+ const originPath =
|
|
|
|
|
+ "/bff/spa/crmh5/index.html#/home?platform=H5&deviceType=0";
|
|
|
|
|
+ // 连续三次encodeURIComponent
|
|
|
|
|
+ let e1 = encodeURIComponent(originPath);
|
|
|
|
|
+ let e2 = encodeURIComponent(e1);
|
|
|
|
|
+ let e3 = encodeURIComponent(e2);
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}&returnUri=${e3}`,
|
|
|
|
|
+
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (isDesktop) {
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
|
|
|
|
|
+ onSuccess: () => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `https://crm-tencent.xiaoshouyi.com/bff/neoweb#/approval_workbench`,
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 3000);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
const newTab = window.open("", "_blank");
|
|
const newTab = window.open("", "_blank");
|
|
|
newTab.location.href = `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`;
|
|
newTab.location.href = `https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`;
|