flat: 支付宝刷脸登录

This commit is contained in:
Apcallover
2025-12-25 10:52:14 +08:00
parent c0c93fffc4
commit e9674fcb40
3 changed files with 15 additions and 24 deletions

View File

@@ -331,7 +331,16 @@ async function handleFaceLogin() {
try {
const authCode = await faceService.startFaceLogin();
console.log('拿到 AuthCode:', authCode);
// 调用后端登录接口...
$api.createRequest('/app/alipay/scanLogin', authCode, 'POST').then((resData) => {
loginSetToken(resData.token).then((resume) => {
if (resume.data.jobTitleId) {
useUserStore().initSeesionId();
uni.reLaunch({
url: '/pages/index/index',
});
}
});
});
} catch (err) {
this.$api.msg(err.message);
}