From fded67571ef0fec8ef23c0287a59be220cc20839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 18 Dec 2025 16:51:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 41199c0..4f2b952 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -89,7 +89,7 @@ void main() async { runApp( GetMaterialApp( - locale: Get.locale, // 使用GetX的locale + locale: Locale('zh', 'CN'), // 使用GetX的locale supportedLocales: const [Locale('zh', 'CN')], /// 国际化配置 代理 From 561add7b92dba27e8433ff7cdb0d06a31d0d3727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 18 Dec 2025 17:05:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/setting/setting_page.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages/setting/setting_page.dart b/lib/pages/setting/setting_page.dart index ab07661..92cdf9d 100644 --- a/lib/pages/setting/setting_page.dart +++ b/lib/pages/setting/setting_page.dart @@ -76,7 +76,9 @@ class SettingPage extends StatelessWidget { openAppSettings(); },), TDCell(arrow: true, title: '消息通知', onClick: (cell) { - Get.to(() => NoticePage()); + // Get.to(() => NoticePage()); + + openAppSettings(); }), TDCell(arrow: true, title: '检查更新', onClick: (cell) { // _showUpdateDialog(); From db2793f2a3f27f15c1dd71def8a04d1c9308446a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 18 Dec 2025 17:07:47 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/setting/setting_page.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pages/setting/setting_page.dart b/lib/pages/setting/setting_page.dart index 92cdf9d..0ce39f2 100644 --- a/lib/pages/setting/setting_page.dart +++ b/lib/pages/setting/setting_page.dart @@ -7,6 +7,7 @@ import 'package:dating_touchme_app/pages/setting/deactivate_page.dart'; import 'package:dating_touchme_app/pages/setting/teenager_mode_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:tdesign_flutter/tdesign_flutter.dart'; @@ -62,7 +63,9 @@ class SettingPage extends StatelessWidget { TDCell(arrow: true, title: '黑名单', onClick: (cell) { Get.to(() => BlacklistPage()); }), - TDCell(arrow: true, title: '隐私设置'), + TDCell(arrow: true, title: '隐私设置', onClick: (cell) { + SmartDialog.showToast('功能暂未开放'); + },), TDCell(arrow: true, title: '青少年模式', onClick: (cell) { Get.to(() => TeenagerModePage()); },), @@ -82,7 +85,8 @@ class SettingPage extends StatelessWidget { }), TDCell(arrow: true, title: '检查更新', onClick: (cell) { // _showUpdateDialog(); - controller.checkVersion(); + // controller.checkVersion(); + SmartDialog.showToast('功能暂未开放'); }, noteWidget: Text('当前版本:${controller.version.value}',style: TextStyle(fontSize: 13.w,color: const Color.fromRGBO(117, 98, 249, 1))), ) From 20a628e5d57fb7b24b91f96565677b8d36f1e23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 18 Dec 2025 17:20:06 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/edit_info_page.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/pages/mine/edit_info_page.dart b/lib/pages/mine/edit_info_page.dart index c3a9821..666f479 100644 --- a/lib/pages/mine/edit_info_page.dart +++ b/lib/pages/mine/edit_info_page.dart @@ -461,7 +461,7 @@ class _EditInfoPageState extends State { fontSize: 13.w, fontWeight: FontWeight.w500 ), - ),), + ), hideArrow: true,), Container( margin: EdgeInsets.only(bottom: 3.w), decoration: BoxDecoration( @@ -558,12 +558,15 @@ class _EditInfoPageState extends State { Icon( Icons.keyboard_arrow_right, size: 13.w, - color: const Color.fromRGBO(191, 191, 191, 1) + color: Color.fromRGBO(191, 191, 191, (controller.userData.value?.identityCard != null && controller.userData.value?.identityCard != "") ? 0 : 1) ) ], ) ], ).onTap((){ + if(controller.userData.value?.identityCard != null && controller.userData.value?.identityCard != ""){ + return; + } _showDatePicker(controller); }), ], @@ -1176,7 +1179,8 @@ class SetItem extends StatefulWidget { final String label; final bool showRequired; final Widget child; - const SetItem({super.key, required this.label, this.showRequired = true, required this.child}); + final bool hideArrow; + const SetItem({super.key, required this.label, this.showRequired = true, required this.child, this.hideArrow = false}); @override State createState() => _SetItemState(); @@ -1229,7 +1233,7 @@ class _SetItemState extends State { Icon( Icons.keyboard_arrow_right, size: 13.w, - color: const Color.fromRGBO(191, 191, 191, 1) + color: Color.fromRGBO(191, 191, 191, widget.hideArrow ? 0 : 1) ) ], ), From d6b699f0d22f736d7e705f71b888eeef13cc27e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 18 Dec 2025 17:33:26 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=99=90=E5=88=B6=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E9=87=91=E9=A2=9D2=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/withdraw_page.dart | 42 ++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lib/pages/mine/withdraw_page.dart b/lib/pages/mine/withdraw_page.dart index 1c65dc7..f6265e9 100644 --- a/lib/pages/mine/withdraw_page.dart +++ b/lib/pages/mine/withdraw_page.dart @@ -6,6 +6,7 @@ import 'package:dating_touchme_app/model/mine/bank_card_data.dart'; import 'package:dating_touchme_app/pages/mine/add_bankcard_page.dart'; import 'package:dating_touchme_app/pages/mine/withdraw_history_page.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; @@ -195,7 +196,10 @@ class WithdrawPage extends StatelessWidget { Expanded( child: TextField( controller: controller.withdrawMoneyController.value, - keyboardType: TextInputType.number, + keyboardType: const TextInputType.numberWithOptions(decimal: true), + inputFormatters: [ + DecimalTextInputFormatter(decimalRange: 2), + ], style: TextStyle( fontSize: ScreenUtil().setWidth(22), height: 1 @@ -582,3 +586,39 @@ class WithdrawPage extends StatelessWidget { } } +class DecimalTextInputFormatter extends TextInputFormatter { + DecimalTextInputFormatter({this.decimalRange = 2}); + + final int decimalRange; + + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, + TextEditingValue newValue, + ) { + final text = newValue.text; + + // 允许空 + if (text.isEmpty) return newValue; + + // 只允许数字和小数点 + if (!RegExp(r'^\d*\.?\d*$').hasMatch(text)) { + return oldValue; + } + + // 只允许一个小数点 + if ('.'.allMatches(text).length > 1) { + return oldValue; + } + + // 限制小数位数 + if (text.contains('.')) { + final parts = text.split('.'); + if (parts.length > 1 && parts[1].length > decimalRange) { + return oldValue; + } + } + + return newValue; + } +} \ No newline at end of file