This commit is contained in:
wyf
2025-05-24 18:22:20 +08:00
parent 3a3c01b618
commit 104b39b7c3

View File

@@ -184,6 +184,7 @@ class LoginController extends GetControllerEx<LoginModel> {
3、对于iOS应用考虑到iOS应用商店审核指南中的相关规定建议开发者接入微信登录时先检测用户手机是否已安装微信客户端 3、对于iOS应用考虑到iOS应用商店审核指南中的相关规定建议开发者接入微信登录时先检测用户手机是否已安装微信客户端
使用sdk中isWXAppInstalled函数 ),对未安装的用户隐藏微信登录按钮,只提供其他登录方式(比如手机号注册登录、游客登录等) 使用sdk中isWXAppInstalled函数 ),对未安装的用户隐藏微信登录按钮,只提供其他登录方式(比如手机号注册登录、游客登录等)
*/ */
try {
if (isAndroid) { if (isAndroid) {
bool isWeChatInstalled = await fluwx.isWeChatInstalled; bool isWeChatInstalled = await fluwx.isWeChatInstalled;
if (!isWeChatInstalled) { if (!isWeChatInstalled) {
@@ -201,7 +202,12 @@ class LoginController extends GetControllerEx<LoginModel> {
.then((data) { .then((data) {
//返回true表示成功或者false表示失败这边没有意义从login_controller页面构造函数监听中去处理 //返回true表示成功或者false表示失败这边没有意义从login_controller页面构造函数监听中去处理
debugPrint('msg:$data'); debugPrint('msg:$data');
EasyDartModule.logger.error('msg:$data');
}); });
} catch (e) {
debugPrint('msg:$e');
EasyDartModule.logger.error('msg:$e');
}
} }
Future<ApiResponse> loginByWechatCode(String code) async { Future<ApiResponse> loginByWechatCode(String code) async {
@@ -236,8 +242,7 @@ class LoginController extends GetControllerEx<LoginModel> {
bool isWeChatInstalled = await fluwx.isWeChatInstalled; bool isWeChatInstalled = await fluwx.isWeChatInstalled;
if (!isWeChatInstalled) { if (!isWeChatInstalled) {
TopSlideNotification.show(context, TopSlideNotification.show(context,
text: "微信客服提示".tr, text: "微信客服提示".tr, textColor: themeController.currentColor.sc9);
textColor: themeController.currentColor.sc9);
return; return;
} }
TopSlideNotification.show(context, TopSlideNotification.show(context,