From 2fbb76c60b8e7d5215c8b0b663a1bbb5bbb981ee Mon Sep 17 00:00:00 2001 From: deploy Date: Sat, 7 Nov 2026 01:08:56 +0000 Subject: [PATCH] =?UTF-8?q?login-gate:=20=E6=B3=A8=E9=87=8A=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20auth/status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- js/login-gate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/login-gate.js b/js/login-gate.js index 20807e9..3658473 100644 --- a/js/login-gate.js +++ b/js/login-gate.js @@ -2,7 +2,7 @@ · 退出登录 ≠ 从没授权过:后端 user_auths.loggedOut 只在点了「退出登录」时置位,重新授权清掉; 从没授权过的新用户不受影响。 · 本机标记 localStorage mmbox.out.v1 = 退出时的 openid(首屏立刻知道,不等接口); - 每次进页面再和服务器(auth/profile 的 loggedOut)对一次,对不上就改标记、重载一次。 + 每次进页面再和服务器(只读接口 auth/status 的 loggedOut,查不到不建记录)对一次,对不上就改标记、重载一次。 · 退出后:首页按访客显示(app.js 里 hashParam 不给 openid);记录、评论、点赞、收藏、投稿、 兑换、改档案这些按钮点了弹「登录后才能使用」,去登录 = 小程序授权页(没有共享库的页面回首页「我的」)。 · 后端同样拦(box_app 返回 401 needLogin),这里只是让用户别白填。