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:
@@ -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});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user