fix(ns-login): 修复H5页面在微信App中点击登录无反应的问题

This commit is contained in:
2025-12-25 17:45:52 +08:00
parent 2c3786546c
commit b01de93eee
2 changed files with 36 additions and 1 deletions

View File

@@ -209,11 +209,16 @@
// #endif
// #ifdef H5
if (this.$util.isWeiXin()) {
if (this.$util.isWeChatMiniProgram()) {
// 微信小程序环境,使用微信授权登录
let authData = uni.getStorageSync('authInfo');
if (authData) this.authLogin(authData);
else this.getCode();
} else if (this.$util.isWeiXin()) {
// 微信浏览器环境,显示登录页面
this.toLogin();
} else {
// 其他浏览器环境,显示登录页面
this.toLogin();
}
// #endif