fix
This commit is contained in:
parent
487b0bb8df
commit
20802004ab
Binary file not shown.
@ -80,27 +80,26 @@ router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title;
|
||||
}
|
||||
let link = document.querySelector("link[rel='canonical']")
|
||||
let link = document.querySelector("link[rel='canonical']");
|
||||
if (!link) {
|
||||
link = document.createElement('link')
|
||||
link.rel = 'canonical'
|
||||
document.head.appendChild(link)
|
||||
link = document.createElement("link");
|
||||
link.rel = "canonical";
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
link.href = to.meta.canonical
|
||||
|
||||
let alternateLink = document.querySelector("link[rel='alternate']")
|
||||
link.href = to.meta.canonical;
|
||||
|
||||
let alternateLink = document.querySelector("link[rel='alternate']");
|
||||
if (!alternateLink) {
|
||||
alternateLink = document.createElement('link')
|
||||
alternateLink.rel = 'alternate'
|
||||
alternateLink.media = 'only screen and (max-width: 640px)'
|
||||
document.head.appendChild(alternateLink)
|
||||
alternateLink = document.createElement("link");
|
||||
alternateLink.rel = "alternate";
|
||||
alternateLink.media = "only screen and (max-width: 640px)";
|
||||
document.head.appendChild(alternateLink);
|
||||
}
|
||||
alternateLink.href = to.meta.alternate
|
||||
alternateLink.href = to.meta.alternate;
|
||||
|
||||
next(); // 如果是 PC 设备,继续导航
|
||||
} else {
|
||||
window.location.href = `https://m.counterfire.games?code=${
|
||||
to.query.code ? to.query.code : ""
|
||||
window.location.href = `https://m.counterfire.games${ to.query.code ? '?code=' + to.query.code : ""
|
||||
}`;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user