fix(登录): 移除强制登录逻辑并处理路由token参数

移除页面加载和查看全部时的强制登录弹窗逻辑
添加路由token参数处理,存储token后清除URL中的参数
This commit is contained in:
34701892@qq.com 2026-02-04 11:12:53 +08:00
parent d3b3c7e1d6
commit fc9502b16a
1 changed files with 19 additions and 4 deletions

View File

@ -219,7 +219,7 @@ function onViewAll(type) {
url: "/pages/realtimeInfo/rankDetail?type=" + type,
});
} else {
LoginShow.value = true;
// LoginShow.value = true;
}
}
@ -307,14 +307,29 @@ function goSreach() {
onUnmounted(() => {
clearInterval(timer);
});
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
const { aplus_queue } = window;
onMounted(async () => {
initData();
if (!Session.get("token")) {
LoginShow.value = true;
}
// if (!Session.get("token")) {
// LoginShow.value = true;
// }
getLineDataFn();
// token
const { token, phone, ...otherQuery } = route.query;
// token
if (token) {
router.replace({
path: route.path, //
query: otherQuery, //
});
}
Session.set("token", token);
Session.set("userPhone", phone);
aplus_queue.push({
action: "aplus.sendPV",
arguments: [{ is_auto: false }], //