refactor(member pages): unify onShow login redirect logic

1. extract common onShow login check to dedicated method redirectTologinOnShowLifecycle
2. add fallback callback for login failure to navigate back on wechat mini program
3. update all page login redirect calls to use the new unified method
4. add debug logs for redirect and auth flow tracing
This commit is contained in:
2026-06-27 18:25:53 +08:00
parent 0b760e41a3
commit 2e535b9d93
19 changed files with 69 additions and 36 deletions

View File

@@ -970,6 +970,7 @@ export default {
* @param {Object} link
*/
diyRedirectTo(link) {
console.log(`-----> diyRedirectTo`, link);
//if (link == null || Object.keys(link).length == 1) return;
if (link.wap_url) {
link.wap_url = decodeEntity(link.wap_url);
@@ -1085,7 +1086,7 @@ export default {
}
}
} else if (link.wap_url) {
} else if (link.wap_url) { // 微页面/内部页面
this.redirectTo(link.wap_url, {...link});
}
},