提交 0eced1f9 编写于 作者: A Anne_LXM

修复 当不满足一键登录时页面回退无法继续登录的问题

上级 8f3761f8
...@@ -94,15 +94,31 @@ ...@@ -94,15 +94,31 @@
onReady() { onReady() {
// 是否优先启动一键登录。即:页面一加载就启动一键登录 // 是否优先启动一键登录。即:页面一加载就启动一键登录
//#ifdef APP-PLUS //#ifdef APP-PLUS
if (this.type == "univerify") { if (config.loginTypes.includes('univerify') && this.type == "univerify") {
uni.preLogin({
provider: 'univerify',
success: () => {
const pages = getCurrentPages(); const pages = getCurrentPages();
currentWebview = pages[pages.length - 1].$getAppWebview(); currentWebview = pages[pages.length - 1].$getAppWebview();
currentWebview.setStyle({ currentWebview.setStyle({
"top": "2000px" // 隐藏当前页面窗体 "top": "2000px" // 隐藏当前页面窗体
}) })
this.type == this.loginTypes[1] // this.type == this.loginTypes[1]
// console.log('开始一键登录'); // console.log('开始一键登录');
this.$refs.uniFabLogin.login_before('univerify') this.$refs.uniFabLogin.login_before('univerify')
},
fail: (err) => {
console.log(err);
if (config.loginTypes.length > 1) {
this.$refs.uniFabLogin.login_before(config.loginTypes[1])
} else {
uni.showModal({
content: err.message,
showCancel: false
});
}
}
})
} }
//#endif //#endif
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册