|
@@ -421,10 +421,16 @@ const go = async (item) => {
|
|
|
username: userStore.getUser.username,
|
|
username: userStore.getUser.username,
|
|
|
});
|
|
});
|
|
|
if (res) {
|
|
if (res) {
|
|
|
- const ua = window.navigator.userAgent.toLowerCase();
|
|
|
|
|
|
|
+ const ua = window.navigator.userAgent; // const ua = navigator.userAgent;
|
|
|
|
|
+ const isDesktop =
|
|
|
|
|
+ ua.includes("DingTalk") &&
|
|
|
|
|
+ (ua.includes("Windows") || ua.includes("Macintosh"));
|
|
|
|
|
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
- if (window.dd) {
|
|
|
|
|
|
|
+ let ua2 = navigator.userAgent.toLowerCase();
|
|
|
|
|
+ let isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
|
|
+
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
|
|
+ if (isMobile && !isDesktop) {
|
|
|
const targetUrl = item.appUrl;
|
|
const targetUrl = item.appUrl;
|
|
|
if (targetUrl) {
|
|
if (targetUrl) {
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
@@ -457,12 +463,12 @@ const go = async (item) => {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- } else if (window.DingTalkPC) {
|
|
|
|
|
- const loading = ElLoading.service({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "正在跳转,请稍候...",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ } else if (isDesktop) {
|
|
|
|
|
+ // const loading = ElLoading.service({
|
|
|
|
|
+ // lock: true,
|
|
|
|
|
+ // text: "正在跳转,请稍候...",
|
|
|
|
|
+ // background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
+ // });
|
|
|
|
|
|
|
|
const newTab = window.open("", "_blank");
|
|
const newTab = window.open("", "_blank");
|
|
|
newTab.location.href =
|
|
newTab.location.href =
|
|
@@ -471,7 +477,7 @@ const go = async (item) => {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
newTab.location.href = item.flowUrl;
|
|
newTab.location.href = item.flowUrl;
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- loading.close();
|
|
|
|
|
|
|
+ // loading.close();
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}, 100);
|
|
}, 100);
|
|
|
} else {
|
|
} else {
|
|
@@ -554,16 +560,26 @@ const handleDetailClick = (task, categoryTitle) => {
|
|
|
if (isMobile) {
|
|
if (isMobile) {
|
|
|
// 示例:根据类型跳转
|
|
// 示例:根据类型跳转
|
|
|
if (task.name === "OA" && categoryTitle === "我的待办") {
|
|
if (task.name === "OA" && categoryTitle === "我的待办") {
|
|
|
- router.push({
|
|
|
|
|
- path: "/mobile-todo-list",
|
|
|
|
|
- query: { type: task.name.toLowerCase() },
|
|
|
|
|
|
|
+ // router.push({
|
|
|
|
|
+ // path: "/mobile-todo-list",
|
|
|
|
|
+ // query: { type: task.name.toLowerCase() },
|
|
|
|
|
+ // });
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `https://yfding.keruioil.com:9443/wxapi/wxclientmenu/d5605d17b3cd4c1987e333ab0d945070`,
|
|
|
|
|
+
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (task.name === "OA" && categoryTitle === "已办事项") {
|
|
if (task.name === "OA" && categoryTitle === "已办事项") {
|
|
|
- router.push({
|
|
|
|
|
- path: "/oa-done-list",
|
|
|
|
|
- query: { type: task.name.toLowerCase() },
|
|
|
|
|
|
|
+ // router.push({
|
|
|
|
|
+ // path: "/oa-done-list",
|
|
|
|
|
+ // query: { type: task.name.toLowerCase() },
|
|
|
|
|
+ // });
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `https://yfding.keruioil.com:9443/wxapi/wxclientmenu/d5605d17b3cd4c1987e333ab0d945070`,
|
|
|
|
|
+
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|