小程序中view-view打开 https://zsk.zlsoft.com 页面,重定向跳转 https://zsk.zlsoft.com/User/Login页面没有触发 bindLoad事件。导致后续逻辑未执行。
bindLoad(e) {
var _a;
let currentUrl = (_a = e.detail.src) == null ? void 0 : _a.toLocaleLowerCase();
this.loadUrl = currentUrl;
console.log("bindLoad->"+currentUrl);
if ((currentUrl.includes(api_common.host + "/user/login") || currentUrl.includes(
"https://sso.zlsoft.com/user/login"
)) && !currentUrl.includes(api_common.host + "/user/loginback")) {
this.openurl = "";
common_vendor.index.setNavigationBarTitle({
title: "中联桥妹"
});
}
}
1. bindload="bindLoad"
2. 去掉methods