更新登录对接

This commit is contained in:
wyf
2025-04-18 18:13:21 +08:00
parent 1765403f21
commit 850c34b408
40 changed files with 2101 additions and 1745 deletions

View File

@@ -8,6 +8,7 @@ import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/person/person_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/pages/person/select_time.dart';
@@ -23,6 +24,7 @@ class _EPageState extends State<PersonPage> {
UserInfoController userInfoController = Get.find();
BlueteethBindController blueteethBindController = Get.find();
PersonController personController = Get.find();
ThemeController themeController = Get.find();
@override
void initState() {
@@ -43,15 +45,15 @@ class _EPageState extends State<PersonPage> {
),
child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar(
backgroundColor: stringToColor("#242835"),
// backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
iconTheme: IconThemeData(
color: themeController.currentColor.sc3,
),
titleSpacing: 0,
// leading: returnIconButtom,
title: Container(
// color: Colors.grey,
width: double.infinity,
height: 180.rpx,
child: Stack(
@@ -62,7 +64,7 @@ class _EPageState extends State<PersonPage> {
'人员资料.标题'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
@@ -80,10 +82,9 @@ class _EPageState extends State<PersonPage> {
onTap: () async {
Get.offAllNamed("/bindDeviceSuccess");
},
colors: [
stringToColor("#45D989"),
stringToColor("#00C1AA"),
themeController.currentColor.sc1,
themeController.currentColor.sc2,
],
child: Container(
width: 100.rpx,
@@ -97,7 +98,7 @@ class _EPageState extends State<PersonPage> {
.titleSmall
.override(
fontFamily: 'Inter Tight',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0.0,
),
),
@@ -145,9 +146,10 @@ class _EPageState extends State<PersonPage> {
labelStyle: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: 'Inter',
letterSpacing: 0.0,
color: Colors.white),
fontFamily: 'Inter',
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
hintText: '人员资料.名字输入提示'.tr,
hintStyle: FlutterFlowTheme.of(context)
.labelMedium
@@ -189,9 +191,10 @@ class _EPageState extends State<PersonPage> {
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Inter',
letterSpacing: 0.0,
color: Colors.white),
fontFamily: 'Inter',
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
textAlign: TextAlign.center,
cursorColor:
FlutterFlowTheme.of(context).primaryText,
@@ -239,7 +242,8 @@ class _EPageState extends State<PersonPage> {
.bodyMedium
.override(
fontFamily: 'Inter',
color: Colors.white,
color: themeController
.currentColor.sc3,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
@@ -270,7 +274,8 @@ class _EPageState extends State<PersonPage> {
.bodyMedium
.override(
fontFamily: 'Inter',
color: Colors.white,
color: themeController
.currentColor.sc3,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
@@ -286,71 +291,6 @@ class _EPageState extends State<PersonPage> {
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
70.rpx, 50.rpx, 70.rpx, 0),
// child: Container(
// width: double.infinity,
// height: 100.rpx,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(50.rpx),
// border: Border.all(
// color: Color(0xFFF3EDED),
// ),
// ),
// child: Align(
// alignment: AlignmentDirectional(0, 0),
// child: Obx(
// () => Container(
// width: double.infinity,
// height:
// MediaQuery.sizeOf(context).height * 0.064,
// decoration: BoxDecoration(),
// child: InkWell(
// onTap: () {
// // 触摸收起键盘
// FocusScope.of(context)
// .requestFocus(FocusNode());
// Future.delayed(
// const Duration(milliseconds: 250), () {
// // 延迟执行的代码
// showDateSelectionDialog(context,
// checkDate:
// personController.model.birthday ??
// DateTime.now(),
// checkChange: (DateTime d) {
// personController.model.birthday = d;
// personController.updateAll();
// print("$d");
// }).then((d) {
// // Timer(Duration.zero, () {
// // FocusScope.of(context).unfocus();
// // });
// });
// });
// },
// child: Container(
// constraints:
// BoxConstraints(minWidth: 200.rpx),
// child: Text(
// personController.model.birthday != null
// ? DateFormat("yyyy年MM月dd日").format(
// personController.model.birthday!)
// : '人员资料.生日输入提示'.tr,
// textAlign: TextAlign.right,
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: Colors.white,
// fontSize: 30.rpx,
// letterSpacing: 0,
// ),
// ),
// ),
// ),
// ),
// ),
// ),
// ),
child: Container(
height: 100.rpx,
decoration: BoxDecoration(
@@ -385,8 +325,8 @@ class _EPageState extends State<PersonPage> {
fontFamily: 'Readex Pro',
color: personController.model.birthday !=
null
? Colors.white
: Colors.grey,
? themeController.currentColor.sc3
: themeController.currentColor.sc4,
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0,
@@ -429,10 +369,10 @@ class _EPageState extends State<PersonPage> {
.labelMedium
.override(
fontFamily: 'Inter',
color: personController.model.birthday !=
color: personController.model.weight !=
null
? Colors.white
: Colors.grey,
? themeController.currentColor.sc3
: themeController.currentColor.sc4,
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
@@ -472,7 +412,7 @@ class _EPageState extends State<PersonPage> {
.override(
fontFamily: 'Inter',
letterSpacing: 0.0,
color: Colors.white,
color: themeController.currentColor.sc3,
),
textAlign: TextAlign.center,
cursorColor:
@@ -580,9 +520,7 @@ class _EPageState extends State<PersonPage> {
}
}
},
// colors: [Colors.white.withOpacity(0.06)], // 背景色
colors: [stringToColor("#242835")], // 背景色
colors: [themeController.currentColor.sc17], // 背景色
child: Container(
width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.135,

View File

@@ -8,7 +8,7 @@ import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
Future showDateSelectionDialog(BuildContext context,
{required DateTime checkDate, Function? checkChange, String title = "生日"}) {
Color checkColor = stringToColor("#D3B684");
ThemeController themeController = Get.find();
List years = [], months = [], days = [];
var days_select = [].obs;
int day_len = 31;
@@ -31,9 +31,7 @@ Future showDateSelectionDialog(BuildContext context,
.day;
days_select.value = days.sublist(0, day_len);
int dayIndex = days.lastIndexOf(checkDate.day);
ThemeController themeController = Get.find();
return showDialog(
// barrierColor: stringToColor("#000320"),
context: context,
barrierDismissible: true, // 点击对话框外部可关闭
builder: (BuildContext context) {
@@ -46,8 +44,7 @@ Future showDateSelectionDialog(BuildContext context,
child: Material(
color: Colors.transparent,
child: Dialog(
backgroundColor: stringToColor("#242835"),
// backgroundColor: Colors.transparent,
backgroundColor: themeController.currentColor.sc17,
insetPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0),
@@ -83,7 +80,7 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: AppConstants()
.normal_text_fontSize),
@@ -98,7 +95,7 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize:
AppConstants().title_text_fontSize),
@@ -111,7 +108,7 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: AppConstants()
.normal_text_fontSize),
@@ -161,7 +158,8 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color:
themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx),
),
@@ -195,7 +193,8 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color:
themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx),
),
@@ -226,7 +225,8 @@ Future showDateSelectionDialog(BuildContext context,
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color:
themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx),
),
@@ -249,6 +249,7 @@ Future showDateSelectionDialog(BuildContext context,
getOnePicker(context, List arr, int checkIndex, Function onSelectedItemChanged,
{bool looping = false}) {
ThemeController themeController = Get.find();
return CupertinoPicker(
key: UniqueKey(),
useMagnifier: false,
@@ -268,19 +269,10 @@ getOnePicker(context, List arr, int checkIndex, Function onSelectedItemChanged,
return Container(
alignment: Alignment.center,
width: 400.rpx,
decoration: BoxDecoration(
// border: Border(
// bottom: index != arr.length
// ? BorderSide(
// color: stringToColor("#8D95B0"),
// )
// : BorderSide.none,
// ),
),
child: Text("${arr[index]}",
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Readex Pro',
color: Colors.white,
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx)),
);