更新眠花糖邮箱登录

This commit is contained in:
wyf
2026-01-26 15:01:57 +08:00
parent dfd9523433
commit 2aedbb3d74
11 changed files with 1220 additions and 388 deletions

View File

@@ -381,7 +381,7 @@
"维修完成": "Repaired", "维修完成": "Repaired",
"已评价": "Rated", "已评价": "Rated",
"报修须知": "Repair Notice", "报修须知": "Repair Notice",
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": " Dear user, thank you for choosing our product. If the device encounters a malfunction during use and requires repair, please first ensure it is properly connected to the controller or network, check whether the settings are correct, and rule out any misuse. If the issue persists, please record the device name, device ID, and a detailed description of the issue so that we can assist you efficiently. You can request service directly through the warranty page in the Smart Cotton Candy App or by calling ", "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": " Dear user, thank you for choosing our product. If the device encounters a malfunction during use and requires repair, please first ensure it is properly connected to the controller or network, check whether the settings are correct, and rule out any misuse. If the issue persists, please record the device name, device ID, and a detailed description of the issue so that we can assist you efficiently. You can request service directly through the warranty page in the Smart Cotton Candy App or by calling ",
" 反馈。": " for help.", " 反馈。": " for help.",
"我要报修": "Request Repair", "我要报修": "Request Repair",
"报修历史": "Repair History", "报修历史": "Repair History",

View File

@@ -382,7 +382,7 @@
"维修完成": "维修完成", "维修完成": "维修完成",
"已评价": "已评价", "已评价": "已评价",
"报修须知": "报修须知", "报修须知": "报修须知",
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打", "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打",
" 反馈。": "反馈。", " 反馈。": "反馈。",
"我要报修": "我要报修", "我要报修": "我要报修",
"报修历史": "报修历史", "报修历史": "报修历史",

View File

@@ -382,7 +382,7 @@
"维修完成": "維修完成", "维修完成": "維修完成",
"已评价": "已評價", "已评价": "已評價",
"报修须知": "報修須知", "报修须知": "報修須知",
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": "尊敬的用戶,感謝您選擇我司產品。在使用過程中,如果設備出現故障需要維修,請首先確認設備是否正確連接控制器或網絡,檢查設置是否正常,排除誤操作問題。若問題依然存在,請記錄下設備名稱、設備編號、和具體故障內容,方便我們快速地為您提供幫助。您可以通過智慧花糖APP保修頁面直接報修或撥打", "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 ": "尊敬的用戶,感謝您選擇我司產品。在使用過程中,如果設備出現故障需要維修,請首先確認設備是否正確連接控制器或網絡,檢查設置是否正常,排除誤操作問題。若問題依然存在,請記錄下設備名稱、設備編號、和具體故障內容,方便我們快速地為您提供幫助。您可以通過智慧花糖APP保修頁面直接報修或撥打",
" 反馈。": "反饋。", " 反馈。": "反饋。",
"我要报修": "我要報修", "我要报修": "我要報修",
"报修历史": "報修歷史", "报修历史": "報修歷史",

Binary file not shown.

Binary file not shown.

View File

@@ -140,6 +140,7 @@ void initServiceAddress() {
if (AppConstants().ent_type == APPPackageType.MHT.code) { if (AppConstants().ent_type == APPPackageType.MHT.code) {
// 眠花糖 // 眠花糖
ServiceConstant.baseHost = "zhmht.swes.com.cn:27020"; ServiceConstant.baseHost = "zhmht.swes.com.cn:27020";
// ServiceConstant.baseHost = "vsbs-test.he-info.cn";
} else if (AppConstants().ent_type == APPPackageType.TH.code) { } else if (AppConstants().ent_type == APPPackageType.TH.code) {
// 太和 // 太和
ServiceConstant.baseHost = "vsbst-api.he-info.com"; ServiceConstant.baseHost = "vsbst-api.he-info.com";
@@ -958,7 +959,7 @@ class MyApp extends StatelessWidget {
const Locale('en', 'US'), // ⚠️ 添加你支持的语言 const Locale('en', 'US'), // ⚠️ 添加你支持的语言
], ],
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: '太和e护', title: getAPPName(),
theme: themeController.currentTheme, theme: themeController.currentTheme,
// home: const MyHomePage(title: '智慧眠花糖 Home Page'), // home: const MyHomePage(title: '智慧眠花糖 Home Page'),
initialRoute: "/mianPageBottomChange", initialRoute: "/mianPageBottomChange",
@@ -1013,4 +1014,19 @@ class MyApp extends StatelessWidget {
} }
}); });
} }
getAPPName() {
switch (AppConstants().ent_type) {
case 1:
return "太和";
case 2:
return "欢睡";
case 3:
return "眠花糖";
case 4:
return "东华智能睡眠";
default:
return "太和e护";
}
}
} }

View File

@@ -168,8 +168,15 @@ class _MinePageState extends State<NewMinePage> {
Text( Text(
limitText( limitText(
login == 1 login == 1
? userInfoController ? ((userInfoController.model.user
.model.user?.nick_name ?.nick_name ==
null ||
userInfoController.model.user
?.nick_name ==
"")
? '未命名'.tr
: userInfoController
.model.user?.nick_name)
: '未命名'.tr, : '未命名'.tr,
AppConstants() AppConstants()
.text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符 .text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符

View File

@@ -127,7 +127,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
// children: [ // children: [
// TextSpan( // TextSpan(
// text: // text:
// "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 " // "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 "
// .tr, // .tr,
// style: TextStyle( // style: TextStyle(
// color: Color(0XFF929699), // color: Color(0XFF929699),
@@ -179,7 +179,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
children: [ children: [
TextSpan( TextSpan(
text: text:
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 " "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧花糖APP保修页面直接报修或拨打 "
.tr, .tr,
style: TextStyle( style: TextStyle(
color: Color(0XFF929699), color: Color(0XFF929699),

View File

@@ -22,7 +22,8 @@ part 'mht_login_controller.g.dart';
@JsonSerializable() @JsonSerializable()
class LoginModel { class LoginModel {
//版本id //版本id
int? loginStyle = 1; //1.密码登录 2.短信登录(登录类型: 1:手机号/邮箱+验证码 2:微信一键登录 3:手机号+密码) int? loginStyle =
1; //1.密码登录 2.短信登录 3.邮箱登录(登录类型: 1:手机号/邮箱+验证码 2:微信一键登录 3:手机号+密码)
// String? account = '17649984946'; //账户 // String? account = '17649984946'; //账户
// String? account = '13953240733'; //账户 // String? account = '13953240733'; //账户
@@ -35,7 +36,7 @@ class LoginModel {
String? account = ''; //账户 String? account = ''; //账户
String? password = ''; //密码 String? password = ''; //密码
String? phone; //手机号 String? phone; //手机号/邮箱
String? code; //验证码 String? code; //验证码
String? register_code; String? register_code;
@@ -123,6 +124,33 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
account = model.phone!; account = model.phone!;
password = model.code!; password = model.code!;
} }
if (model.loginStyle == 3) {
//账号登录
if (model.phone == null || model.phone!.isEmpty) {
message = '请输入邮箱'.tr;
TopSlideNotification.show(context,
text: message, textColor: stringToColor("#FF7159"));
return message;
}
if (!MyUtils.isValidEmail(model.phone!)) {
message = '请输入正确的邮箱'.tr;
TopSlideNotification.show(context,
text: message, textColor: stringToColor("#FF7159"));
return message;
}
if (model.code == null || model.code!.isEmpty) {
message = '验证码不能为空'.tr;
TopSlideNotification.show(context,
text: message, textColor: stringToColor("#FF7159"));
return message;
}
account = model.phone!;
password = model.code!;
}
if (registerController.model.register_agree == null || if (registerController.model.register_agree == null ||
registerController.model.register_agree != true) { registerController.model.register_agree != true) {
@@ -186,14 +214,52 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
// text: message, textColor: themeController.currentColor.sc9); // text: message, textColor: themeController.currentColor.sc9);
// return message; // return message;
// } // }
if (model.phone == null || model.phone!.isEmpty) { // model.loginStyle;// 2 手机号 3 邮箱
message = "请输入手机号".tr; // if (model.phone == null || model.phone!.isEmpty) {
TopSlideNotification.show(context, // message = "请输入手机号".tr;
text: message, textColor: themeController.currentColor.sc9); // TopSlideNotification.show(context,
return message; // text: message, textColor: themeController.currentColor.sc9);
} // return message;
if (!MyUtils.isValidPhoneNumber(model.phone!)) { // }
message = '请输入正确的手机号'.tr; // if (!MyUtils.isValidPhoneNumber(model.phone!)) {
// message = '请输入正确的手机号'.tr;
// TopSlideNotification.show(context,
// text: message, textColor: themeController.currentColor.sc9);
// return message;
// }
// 2 手机号 3 邮箱
if (model.loginStyle == 2) {
// 短信登录:验证手机号
if (model.phone == null || model.phone!.isEmpty) {
message = "请输入手机号".tr;
TopSlideNotification.show(context,
text: message, textColor: themeController.currentColor.sc9);
return message;
}
if (!MyUtils.isValidPhoneNumber(model.phone!)) {
message = '请输入正确的手机号'.tr;
TopSlideNotification.show(context,
text: message, textColor: themeController.currentColor.sc9);
return message;
}
} else if (model.loginStyle == 3) {
// 邮箱登录:验证邮箱
if (model.phone == null || model.phone!.isEmpty) {
message = "请输入邮箱".tr;
TopSlideNotification.show(context,
text: message, textColor: themeController.currentColor.sc9);
return message;
}
if (!MyUtils.isValidEmail(model.phone!)) {
message = '请输入正确的邮箱地址'.tr;
TopSlideNotification.show(context,
text: message, textColor: themeController.currentColor.sc9);
return message;
}
} else {
// 其他登录类型(如密码登录)
// 根据你的实际需求处理
message = "请选择正确的登录方式".tr;
TopSlideNotification.show(context, TopSlideNotification.show(context,
text: message, textColor: themeController.currentColor.sc9); text: message, textColor: themeController.currentColor.sc9);
return message; return message;

File diff suppressed because it is too large Load Diff

View File

@@ -399,6 +399,22 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.2.4" version: "3.2.4"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
sha256: a7fd703482b391a87d60b6061d04dfdeab07826b96f9abd8f5ed98068acc0074
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.1.2"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2"
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.0.2"
dio: dio:
dependency: transitive dependency: transitive
description: description:
@@ -1336,6 +1352,70 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
open_file:
dependency: "direct main"
description:
name: open_file
sha256: b22decdae85b459eac24aeece48f33845c6f16d278a9c63d75c5355345ca236b
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.5.11"
open_file_android:
dependency: transitive
description:
name: open_file_android
sha256: "58141fcaece2f453a9684509a7275f231ac0e3d6ceb9a5e6de310a7dff9084aa"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.6"
open_file_ios:
dependency: transitive
description:
name: open_file_ios
sha256: a5acd07ba1f304f807a97acbcc489457e1ad0aadff43c467987dd9eef814098f
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
open_file_linux:
dependency: transitive
description:
name: open_file_linux
sha256: d189f799eecbb139c97f8bc7d303f9e720954fa4e0fa1b0b7294767e5f2d7550
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.5"
open_file_mac:
dependency: transitive
description:
name: open_file_mac
sha256: cd293f6750de6438ab2390513c99128ade8c974825d4d8128886d1cda8c64d01
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
open_file_platform_interface:
dependency: transitive
description:
name: open_file_platform_interface
sha256: "101b424ca359632699a7e1213e83d025722ab668b9fd1412338221bf9b0e5757"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
open_file_web:
dependency: transitive
description:
name: open_file_web
sha256: e3dbc9584856283dcb30aef5720558b90f88036360bd078e494ab80a80130c4f
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4"
open_file_windows:
dependency: transitive
description:
name: open_file_windows
sha256: d26c31ddf935a94a1a3aa43a23f4fff8a5ff4eea395fe7a8cb819cf55431c875
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.3"
package_config: package_config:
dependency: transitive dependency: transitive
description: description:
@@ -2245,6 +2325,14 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "5.10.1" version: "5.10.1"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.5"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description: