新增跳转时打开新窗口功能

This commit is contained in:
2026-07-24 18:19:33 +08:00
parent 0e88255852
commit f3bdb07e3d
22 changed files with 132 additions and 46 deletions
+9 -9
View File
@@ -112,26 +112,26 @@
<button
class="uc-btn uc-btn-expert"
id="expertApplyBtn"
onclick="window.location.href = 'apply.html'"
onclick="NavigationUtil.open('apply.html')"
>
专家申请
</button>
<button
class="uc-btn uc-btn-publish"
id="publishArticleBtn"
onclick="window.location.href = 'fabumianfeiwenzhang.html'"
onclick="NavigationUtil.open('fabumianfeiwenzhang.html')"
>
发布文章
</button>
<button
class="uc-btn uc-btn-collection"
onclick="window.location.href = 'mianfeishoucang.html?tab=free'"
onclick="NavigationUtil.open('mianfeishoucang.html?tab=free')"
>
我的收藏
</button>
<button
class="uc-btn uc-btn-tuiguang"
onclick="window.location.href = 'tuiguang.html'"
onclick="NavigationUtil.open('tuiguang.html')"
>
分享推广
</button>
@@ -530,7 +530,7 @@
if (state.isApplying) {
$applyBtn.removeAttr("onclick");
} else {
$applyBtn.attr("onclick", "window.location.href = 'apply.html'");
$applyBtn.attr("onclick", "NavigationUtil.open('apply.html')");
}
}
@@ -695,7 +695,7 @@
{ btn: ["去登录", "取消"] },
function (index) {
layui.layer.close(index);
window.location.href = "login.html";
NavigationUtil.open("login.html");
},
);
});
@@ -757,7 +757,7 @@
});
localStorage.removeItem("token");
setTimeout(function () {
window.location.href = "login.html";
NavigationUtil.open("login.html");
}, 1500);
},
);
@@ -812,11 +812,11 @@
ApiClient.post(ApiClient.API.authLogout, null, { headers: CommonUtil.authHeaders() })
.then(function (res) {
localStorage.removeItem("token");
window.location.href = "login.html";
NavigationUtil.open("login.html");
})
.catch(function () {
localStorage.removeItem("token");
window.location.href = "login.html";
NavigationUtil.open("login.html");
});
}