
- 发布:2025-09-29 16:18
- 更新:2025-09-29 16:29
- 阅读:51



l***@163.com (作者) - 前端开发
const univerifyManager = uni.getUniverifyManager()
console.log(univerifyManager )
以下是打印出来的内容:
{
"appId": "__UNI__2F5F9D0",
"GYAppId": "J1uDmdoCJM6QAlCLOyUK2A",
"GyVersion": "GY-HM-1.0.8",
"checked": false,
"preLoginValid": false,
"curPromise": {},
"preLoginSuccess": null,
"GyManager": {},
"config": {
"privacyNavTextSize": 18,
"privacyNavTextColor": "#ffffffff",
"privacyNavColor": "#0086d0",
"privacyNavHeight": 50,
"logoWidth": 80,
"logoHeight": 80,
"logoImgPath": "",
"logoMargin": {
"top": 120
},
"logoAlignRuleOption": {
"middle": {
"anchor": "__container__",
"align": 2
}
},
"numberSize": 20,
"numberColor": "#ff000000",
"numberMargin": {
"top": 30
},
"numberAlignRuleOption": {
"middle": {
"anchor": "__container__",
"align": 2
},
"top": {
"anchor": "gy_login_logo_image",
"align": 3
}
},
"sloganTextColor": "#ff808080",
"sloganTextSize": 14,
"sloganMargin": {
"top": 10
},
"sloganAlignRuleOption": {
"top": {
"anchor": "gy_login_number_text",
"align": 3
},
"middle": {
"anchor": "__container__",
"align": 2
}
},
"loginBtnText": "一键登录",
"loginBtnTextSize": 18,
"loginBtnTextColor": "#ffffffff",
"loginBtnColor": "#FF3973FF",
"loginBtnWidth": "50%",
"loginBtnHeight": 50,
"loginBtnMargin": {},
"loginBtnAlignRuleOption": {
"top": {
"anchor": "__container__",
"align": 2
},
"middle": {
"anchor": "__container__",
"align": 2
}
},
"checkBoxWidth": 16,
"checkBoxHeight": 16,
"checkBoxMargin": {
"left": 20,
"bottom": 20
},
"checkBoxAlignRuleOption": {
"bottom": {
"anchor": "__container__",
"align": 3
},
"left": {
"anchor": "__container__",
"align": 1
}
},
"checkedColor": "#FF3973FF",
"checkBoxShape": 1,
"clauseMargin": {
"left": 5,
"right": 15
},
"clauseAlignRuleOption": {
"left": {
"anchor": "gy_login_clause_checkbox",
"align": 3
},
"top": {
"anchor": "gy_login_clause_checkbox",
"align": 1
},
"right": {
"anchor": "__container__",
"align": 3
}
},
"showPrivacyUncheckedToast": false,
"privacyUnCheckedToastText": "请同意服务条款",
"loginPageComponent": function AuthPageComponent() {},
"clauses": [{
"text": "登录即同意",
"isProtocol": false,
"fontColor": "#ff808080",
"fontSize": 16,
"fontWeight": "normal"
}, {
"text": "&&Clause&&",
"isProtocol": true,
"fontColor": "#3973ff",
"fontSize": 16,
"fontWeight": "normal"
}, {
"text": "并使用本机号码登录",
"isProtocol": false,
"fontColor": "#ff808080",
"fontSize": 16,
"fontWeight": "normal"
}],
"onAuthLoginPageListener": {
"onCheckedChanged": function onCheckedChanged() {},
"onAuthLogin": function onAuthLogin() {}
}
}
}

应该先调用 univerifyManager.preLogin ,并且在 preLogin 的成功回调中调用 login
-
l***@163.com (作者)
univerifyManager.preLogin()
console.log(1,univerifyManager)
univerifyManager.login({
univerifyStyle: {
"fullScreen": true,
"buttons": {
"iconWidth": "45px",
先调preLogin后,下面的console.log都打印不出来了..
2025-09-29 16:35
-