更新页面

This commit is contained in:
wyf
2025-04-16 14:27:10 +08:00
parent 146462b467
commit 1765403f21
58 changed files with 7821 additions and 433 deletions

View File

@@ -7,6 +7,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/controller/login/login_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
@@ -20,6 +21,7 @@ class LoginPage extends StatefulWidget {
class _EPageState extends State<LoginPage> {
GlobalController globalController = Get.find();
UserInfoController userInfoController = Get.find();
LoginController loginController = Get.find();
@override
Widget build(BuildContext context) {
@@ -75,36 +77,6 @@ class _EPageState extends State<LoginPage> {
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
// ClickableContainer(
// backgroundColor: Colors.transparent, // 容器背景色为透明
// highlightColor: Colors.pink, // 点击时背景色也为透明
// padding: EdgeInsets.all(0), // 没有额外的内边距
// onTap: () {
// // 你可以在这里定义点击事件的回调,比如关闭页面等
// print('关闭按钮被点击');
// },
// borderRadius: 0, // 没有圆角
// child: Container(
// // color: Colors.red,
// // width: double.infinity, // 使容器宽度充满父容器
// child: Align(
// alignment:
// AlignmentDirectional(-1, 0), // 左对齐
// child: Padding(
// padding: EdgeInsetsDirectional.fromSTEB(
// 0, 66.rpx, 0, 0),
// child: SvgPicture.asset(
// 'assets/img/icon/close.svg',
// width: 25.rpx,
// height: 25
// .rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
// color: Colors.white, // 这里设置了颜色
// ),
// ),
// ),
// ),
// ),
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
@@ -190,16 +162,20 @@ class _EPageState extends State<LoginPage> {
borderRadius: AppConstants()
.button_container_radius, // 圆角半径
onTap: () {
print('Button pressed ...');
// Get.toNamed("/deviceType");
bool agree = loginController
.model.register_agree!;
if (!agree) {
print('未授权 ...');
} else {
print('已授权 ...');
}
},
colors: [
//todo 颜色
stringToColor("45D989"),
stringToColor("00C1AA")
], // 渐变色是同一个色,也可以根据需要调整
title:
'首页.蓝牙绑定'.tr, // 可选,虽然这个 title 没用,但可以作为调试用
child: Container(
width:
// MediaQuery.sizeOf(context).width * 0.66,
@@ -215,13 +191,6 @@ class _EPageState extends State<LoginPage> {
mainAxisAlignment:
MainAxisAlignment.center,
children: [
// Icon(
// Icons.arrow_back,
// color: FlutterFlowTheme.of(context)
// .primaryText,
// size: 28.rpx,
// ),
Text(
'登录页.本机号码一键登录/注册'.tr,
style: FlutterFlowTheme.of(context)
@@ -242,39 +211,6 @@ class _EPageState extends State<LoginPage> {
),
),
),
// ClickableContainer(
// backgroundColor: Colors.transparent, // 背景色(透明)
// highlightColor: stringToColor(
// "#FF6347"), // 点击时的背景色,可以根据需求设置颜色
// padding: EdgeInsetsDirectional.fromSTEB(
// 0, 32.rpx, 0, 32.rpx), // 内部间距
// onTap: () {
// print('点击了“其他手机号码”'); // 点击后的回调事件
// // 这里可以放置点击后的逻辑,比如导航等
// },
// borderRadius: 0.rpx, // 可选的圆角参数,默认是 20.rpx
// child: Align(
// alignment: AlignmentDirectional(-1, 0),
// child: Container(
// width: double.infinity,
// decoration: BoxDecoration(),
// child: Align(
// alignment: AlignmentDirectional(0, 0),
// child: Text(
// '登录页.其他手机号码'.tr,
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Inter',
// fontSize: 26.rpx,
// letterSpacing: 0.0,
// color: stringToColor("#FFFFFF"),
// ),
// ),
// ),
// ),
// ),
// ),
SizedBox(
height: 20.rpx,
),
@@ -285,6 +221,7 @@ class _EPageState extends State<LoginPage> {
16.rpx, 10.rpx, 16.rpx, 10.rpx),
onTap: () {
print('点击了容器');
Get.toNamed("/otherLoginPage");
},
child: Text(
'登录页.其他手机号码'.tr, // 子组件内容
@@ -306,14 +243,6 @@ class _EPageState extends State<LoginPage> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// SvgPicture.asset(
// 'assets/img/icon/tick.svg',
// width: 30.rpx,
// height: 30.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
// //todo 颜色
// // color: Colors.white,
// color: Colors.white,
// ),
Theme(
data: ThemeData(
checkboxTheme: CheckboxThemeData(
@@ -332,13 +261,13 @@ class _EPageState extends State<LoginPage> {
),
child: Obx(
() => Checkbox(
value: userInfoController
value: loginController
.model.register_agree ??
false,
onChanged: (newValue) async {
userInfoController.model
loginController.model
.register_agree = newValue;
userInfoController.updateAll();
loginController.updateAll();
// 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取
// if (newValue == true) {
// Deviceconfig
@@ -358,7 +287,6 @@ class _EPageState extends State<LoginPage> {
.info,
),
)),
Expanded(
child: Padding(
padding: