async preLogin({ commit }) {
console.log("预登录");
try {
const univerifyManager = uni.getUniverifyManager();
const res = await univerifyManager.preLogin();
// 处理返回值为数组的情况
const result = JSON.stringify(res);
if (result?.includes("ok")) {
console.log("预登录成功", res);
commit("setOneLoginBottom", true);
} else {
console.log("预登录失败>>>>>>", res);
commit("setOneLogin", true);
commit("setOneLoginBottom", false);
}
} catch (e) {
console.log("预登录失败 --- ", e);
commit("setOneLogin", true);
commit("setOneLoginBottom", false);
}
}
好像预登录不上 打印输出10:46:51.142 预登录失败>>>>>>, undefined at store/module/app.js:29
但是用uni.preLogin() 是成功的
3***@qq.com
那用什么办法解决 鸿蒙登录不上
2025-09-24 21:47
DCloud_UNI_LXH
回复 3***@qq.com: 使用 univerifyManager ,preLogin 后再 login
2025-09-25 10:48