|
@@ -988,10 +988,10 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
|
|
|
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
|
var isMobile = ua2.indexOf("dingtalk") > -1;
|
|
var isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
if (isMobile && !isDesktop) {
|
|
if (isMobile && !isDesktop) {
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
|
- url: "https://crm-tencent.xiaoshouyi.com/bff/spa/crmh5/index.html#/neo/startPage",
|
|
|
|
|
|
|
+ url: `https://crm-tencent.xiaoshouyi.com/bff/spa/crmh5/index.html#/neo/startPage?token=${getAccessToken()}`,
|
|
|
|
|
|
|
|
onSuccess: () => {},
|
|
onSuccess: () => {},
|
|
|
});
|
|
});
|
|
@@ -1089,7 +1089,7 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
|
var isMobile = ua2.indexOf("dingtalk") > -1;
|
|
var isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
|
|
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
if (isMobile && !isDesktop) {
|
|
if (isMobile && !isDesktop) {
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
|
url: `${res.ehrUrl}/gateway/login/free?loginfree_licence=${res.licence}&signature=${res.sign}&redirect_url=/proxy/h5/home`,
|
|
url: `${res.ehrUrl}/gateway/login/free?loginfree_licence=${res.licence}&signature=${res.sign}&redirect_url=/proxy/h5/home`,
|
|
@@ -1115,7 +1115,6 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (app.label === "供应商管理(SRM)") {
|
|
if (app.label === "供应商管理(SRM)") {
|
|
|
- alert("判断点击SRM");
|
|
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const ua = window.navigator.userAgent;
|
|
const ua = window.navigator.userAgent;
|
|
|
const isDesktop =
|
|
const isDesktop =
|
|
@@ -1125,8 +1124,6 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
let ua2 = navigator.userAgent.toLowerCase();
|
|
|
let isMobile = ua2.indexOf("dingtalk") > -1;
|
|
let isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
|
|
|
|
|
- alert(`isMobile: ${isMobile}>>>>>>>>>>>>isDesktop: ${isDesktop}`);
|
|
|
|
|
- // alert(`isDesktop: ${isDesktop}`);
|
|
|
|
|
const res = await srmLogin({
|
|
const res = await srmLogin({
|
|
|
username: userStore.getUser.username,
|
|
username: userStore.getUser.username,
|
|
|
});
|
|
});
|
|
@@ -1136,10 +1133,9 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
- alert("SRM判断是钉钉");
|
|
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
if (isMobile && !isDesktop) {
|
|
if (isMobile && !isDesktop) {
|
|
|
- alert("SRM判断是钉钉手机端登录");
|
|
|
|
|
|
|
+ // alert("SRM判断是钉钉手机端登录");
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
|
url: `https://srm-m.deepoil.cc:7777/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
|
|
url: `https://srm-m.deepoil.cc:7777/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
|
|
|
|
|
|