|
|
@@ -982,14 +982,17 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
if (app.label === "客户管理(CRM)") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
|
+ const isMobileDing =
|
|
|
+ ua.includes("dingtalk") && !ua.includes("dingtalk-pc");
|
|
|
+ const isPcDing = ua.includes("dingtalk-pc");
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
- if (window.dd) {
|
|
|
+ if (isMobileDing) {
|
|
|
dd.biz.util.openLink({
|
|
|
url: "https://crm-tencent.xiaoshouyi.com/bff/spa/crmh5/index.html#/neo/startPage",
|
|
|
|
|
|
onSuccess: () => {},
|
|
|
});
|
|
|
- } else if (window.DingTalkPC) {
|
|
|
+ } else {
|
|
|
window.open(
|
|
|
`https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=${getAccessToken()}`,
|
|
|
"_blank",
|
|
|
@@ -1076,14 +1079,17 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
username: userStore.getUser.username,
|
|
|
});
|
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
|
+ const isMobileDing =
|
|
|
+ ua.includes("dingtalk") && !ua.includes("dingtalk-pc");
|
|
|
+ const isPcDing = ua.includes("dingtalk-pc");
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
- if (window.dd) {
|
|
|
+ if (isMobileDing) {
|
|
|
dd.biz.util.openLink({
|
|
|
url: `${res.ehrUrl}/gateway/login/free?loginfree_licence=${res.licence}&signature=${res.sign}&redirect_url=/proxy/h5/home`,
|
|
|
|
|
|
onSuccess: () => {},
|
|
|
});
|
|
|
- } else if (window.DingTalkPC) {
|
|
|
+ } else {
|
|
|
window.open(
|
|
|
`${res.ehrUrl}/gateway/login/free?loginfree_licence=${res.licence}&signature=${res.sign}&redirect_url=${res.redirect}`,
|
|
|
"_blank",
|