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

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

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