更新ios未安装微信时,隐藏微信图标

This commit is contained in:
wyf
2025-08-30 14:30:19 +08:00
parent f7b11fbb7e
commit ccfbf58d81
18 changed files with 251 additions and 164 deletions

View File

@@ -73,9 +73,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
debugPrint('is wechat installed: $isWeChatInstalled');
if (!isWeChatInstalled) {
// TODO ios未安装微信 隐藏微信一键登录按钮
loginController.model.isWeChatNotInstalled = false;
} else {
loginController.model.isWeChatNotInstalled = true;
} else {
loginController.model.isWeChatNotInstalled = false;
}
loginController.updateAll();
});
@@ -922,41 +922,53 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClickableContainer(
backgroundColor: Colors.white, // 背景色
highlightColor: Colors.grey, // 点击水波纹颜色
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () async {
//loginController.model.isIos == true &&
if (loginController.model.register_agree ==
null ||
loginController.model.register_agree !=
true) {
TopSlideNotification.show(
context,
text: "登录页.未同意协议".tr,
textColor: themeController.currentColor.sc9,
);
return;
}
await loginController.wxLoginSendAuth(context);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
children: [
Obx(() {
var aa =
loginController.model.isWeChatNotInstalled;
if (isiOS &&
(loginController.model.isWeChatNotInstalled !=
null &&
loginController
.model.isWeChatNotInstalled ==
true)) return Container();
return ClickableContainer(
backgroundColor: Colors.white, // 背景色
highlightColor: Colors.grey, // 点击水波纹颜色
borderRadius: 999.rpx,
padding: EdgeInsets.zero,
onTap: () async {
if (loginController.model.register_agree ==
null ||
loginController.model.register_agree !=
true) {
TopSlideNotification.show(
context,
text: "登录页.未同意协议".tr,
textColor:
themeController.currentColor.sc9,
);
return;
}
await loginController
.wxLoginSendAuth(context);
},
child: Container(
width: 91.rpx,
height: 91.rpx,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
"assets/img/wechat.png",
width: 30.rpx,
height: 30.rpx,
),
),
child: Image.asset(
"assets/img/wechat.png",
width: 30.rpx,
height: 30.rpx,
),
),
),
);
}),
// ClickableContainer(
// backgroundColor: Colors.white,
// highlightColor: Colors.grey,