Commit 5532badb authored by “yiyousong”'s avatar “yiyousong”

perf: 优化admin获取站点跳转信息

parent fe722845
...@@ -187,12 +187,18 @@ export default { ...@@ -187,12 +187,18 @@ export default {
if (this.userData.admin || this.userData.id == 1) { if (this.userData.admin || this.userData.id == 1) {
event.preventDefault(); event.preventDefault();
let redirectUrl = ""; let redirectUrl = "";
let hash = "";
let redirect = await this.getFinalRedirect(modelUrl); let redirect = await this.getFinalRedirect(modelUrl);
if (!modelUrl.includes("http")) {
let index = modelUrl.indexOf("/");
hash = modelUrl.slice(index + 1);
}
if (redirect) { if (redirect) {
redirectUrl = redirect; redirectUrl = redirect + hash;
} else { } else {
redirectUrl = modelUrl; redirectUrl = modelUrl;
} }
this.$notification.open({ this.$notification.open({
message: "跳转链接", message: "跳转链接",
key: 1, key: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment