|
|
@@ -537,11 +537,11 @@ const go = async (item) => {
|
|
|
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
// 钉钉环境
|
|
|
- const loading = ElLoading.service({
|
|
|
- lock: true,
|
|
|
- text: "正在跳转,请稍候...",
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
- });
|
|
|
+ // const loading = ElLoading.service({
|
|
|
+ // lock: true,
|
|
|
+ // text: "正在跳转,请稍候...",
|
|
|
+ // background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ // });
|
|
|
|
|
|
// const targetUrl1 = item.indexUrl + "?ssoToken=" + res + "#/main";
|
|
|
// const targetUrl2 = item.flowUrl;
|
|
|
@@ -567,17 +567,37 @@ const go = async (item) => {
|
|
|
// ElMessage.error("打开链接失败,请重试");
|
|
|
// },
|
|
|
// });
|
|
|
+ if (window.dd) {
|
|
|
+ const targetUrl1 =
|
|
|
+ "https://yfding.keruioil.com/spa/workflow/static4mobileform/index.html?_random=1778205102430#/req?iscreate=1&workflowid=681&isagent=0&f_weaver_belongto_userid=&beagenter=0&f_weaver_belongto_usertype=0";
|
|
|
+ dd.biz.util.openLink({
|
|
|
+ url: targetUrl1,
|
|
|
+ onSuccess: () => {},
|
|
|
+ onFail: (err) => {
|
|
|
+ // loading.close();
|
|
|
+ ElMessage.error("打开链接失败,请重试");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else if (window.DingTalkPC) {
|
|
|
+ const loading = ElLoading.service({
|
|
|
+ lock: true,
|
|
|
+ text: "正在跳转,请稍候...",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+
|
|
|
+ const newTab = window.open("", "_blank");
|
|
|
+ newTab.location.href =
|
|
|
+ item.indexUrl + "?ssoToken=" + res + "#/main";
|
|
|
|
|
|
- const targetUrl1 =
|
|
|
- "https://yfding.keruioil.com/spa/workflow/static4mobileform/index.html?_random=1778205102430#/req?iscreate=1&workflowid=681&isagent=0&f_weaver_belongto_userid=&beagenter=0&f_weaver_belongto_usertype=0";
|
|
|
- dd.biz.util.openLink({
|
|
|
- url: targetUrl1,
|
|
|
- onSuccess: () => {},
|
|
|
- onFail: (err) => {
|
|
|
- loading.close();
|
|
|
- ElMessage.error("打开链接失败,请重试");
|
|
|
- },
|
|
|
- });
|
|
|
+ setTimeout(() => {
|
|
|
+ newTab.location.href = item.flowUrl;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close();
|
|
|
+ }, 500);
|
|
|
+ }, 100);
|
|
|
+ } else {
|
|
|
+ console.log("❌ 非钉钉环境");
|
|
|
+ }
|
|
|
} else {
|
|
|
// 浏览器环境
|
|
|
const loading = ElLoading.service({
|