fix: 开发模式运行直接进门票列表,不再弹登录页

问题:全新运行(无登录态)时,列表页的登录门槛会把人弹到登录页,
本地开发每次都要手动输手机号,体验差。
改法:requireLogin 在开发模式下无登录态时静默用首个测试手机号假登录,
直接进业务页,不跳登录页;正式流程不变(公众号入口已透明登录,
登录页仅在外链冷启动等无身份场景出现)。
顺手修掉 redirect 参数的双重编码(URL 里难看的 %252F)。
已实测:清空登录态直接打开列表页,URL 停留在 scenic,列表正常渲染。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
xuchao
2026-07-21 14:14:04 +08:00
co-authored by Claude Opus 4.8
parent 73be4f7d73
commit ded90fd423
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
onLoad(options) {
// xuchao: 记录登录前的页面,登录成功后回跳
if (options.redirect) {
this.redirect = decodeURIComponent(options.redirect)
this.redirect = options.redirect
}
// xuchao: 正式流程 —— 公众号网页授权重定向回来时 URL 带 code,用它换用户信息
if (options.code && !config.devMode) {