提交 b3870472 编写于 作者: 雪洛's avatar 雪洛

fix: 修正this指向问题

上级 6604d7bf
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
} else { } else {
// 预登录无效,执行预登录 // 预登录无效,执行预登录
this.univerifyManager?.preLogin({ this.univerifyManager?.preLogin({
success() { success: () => {
console.log("pre login success"); console.log("pre login success");
this.login(fullScreen); this.login(fullScreen);
}, },
fail(err : PreLoginFail) { fail: (err : PreLoginFail) => {
console.error("pre login fail => " + JSON.stringify(err)); console.error("pre login fail => " + JSON.stringify(err));
} }
} as PreLoginOptions); } as PreLoginOptions);
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
loginBtnText: "一键登录", loginBtnText: "一键登录",
logoPath: "/static/logo.png" logoPath: "/static/logo.png"
} as UniverifyStyle, } as UniverifyStyle,
success(res : LoginSuccess) { success: (res : LoginSuccess) => {
console.log("login success => " + JSON.stringify(res)); console.log("login success => " + JSON.stringify(res));
// 云函数取号 // 云函数取号
uniCloud.callFunction({ uniCloud.callFunction({
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
title: '取号成功', title: '取号成功',
content: res.result.getJSON("res")?.getString("phoneNumber"), content: res.result.getJSON("res")?.getString("phoneNumber"),
showCancel: false, showCancel: false,
success(_) { success: (_) => {
// 关闭登录页 // 关闭登录页
this.univerifyManager?.close(); this.univerifyManager?.close();
} }
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
this.univerifyManager?.close(); this.univerifyManager?.close();
}); });
}, },
fail(err : LoginFail) { fail: (err : LoginFail) => {
console.error("login fail => " + err); console.error("login fail => " + err);
uni.showToast({ uni.showToast({
title: "登录失败", title: "登录失败",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册