diff --git a/assets/img/wodiF.png b/assets/img/wodiF.png new file mode 100644 index 0000000..a36bf52 Binary files /dev/null and b/assets/img/wodiF.png differ diff --git a/assets/img/wodi_bgImage.png b/assets/img/wodi_bgImage.png new file mode 100644 index 0000000..38eb67c Binary files /dev/null and b/assets/img/wodi_bgImage.png differ diff --git a/assets/img/wodi_bgNoImg.png b/assets/img/wodi_bgNoImg.png new file mode 100644 index 0000000..58cf103 Binary files /dev/null and b/assets/img/wodi_bgNoImg.png differ diff --git a/assets/miniapp/mhtControl_1.0.90.zip b/assets/miniapp/mhtControl_1.0.90.zip index 13204f9..d8279c0 100644 Binary files a/assets/miniapp/mhtControl_1.0.90.zip and b/assets/miniapp/mhtControl_1.0.90.zip differ diff --git a/lib/common/color/ServiceConstant.dart b/lib/common/color/ServiceConstant.dart index ee2384b..6a0f2bd 100644 --- a/lib/common/color/ServiceConstant.dart +++ b/lib/common/color/ServiceConstant.dart @@ -1,10 +1,10 @@ class ServiceConstant { // static const String baseHost = "zhmht.swes.com.cn:27021"; //服务地址 眠花糖测试地址 - static String baseHost = "zhmht.swes.com.cn:27020"; //服务地址 眠花糖正式地址 + static String baseHost = "zhmht.swes.com.cn:27020"; //服务地址 眠花糖正式地址 // static const String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址 // static const String baseHost = "vsbst-api.he-info.com";//服务地址 // static const String service_address = "http://$baseHost"; - static String service_address = "https://$baseHost"; + static String service_address = "https://$baseHost"; static String server_service = "/vsbs_app_server"; //服务名称 @@ -51,17 +51,16 @@ class ServiceConstant { static const String policy_url = "https://vsbst-api.he-info.cn/vsbs_sotrage/privacy-scheme/"; //协议地址 - static const String weather_url = - "/api/weather/info"; //天气信息 - - static const String app_system_push_message = - "/api/user/push/info"; //系统消息推送 + static const String weather_url = "/api/weather/info"; //天气信息 + + static const String app_system_push_message = "/api/user/push/info"; //系统消息推送 static const String bgUrl = "https://vsbst-api.he-info.cn/vsbs_sotrage/background-image/taihe.png"; - static const String localTimeZone = - "/api/city/data/utc/info"; - //todo 检查app更新 - static const String checkAPPVersion = - "/api/app/update/check"; + static const String localTimeZone = "/api/city/data/utc/info"; + //todo 检查app更新 + static const String checkAPPVersion = "/api/app/update/check"; + + //下发wifi控制指令 + static const String sendWifiCommand = "/api/device/cmd/ttd"; } diff --git a/lib/common/color/appConstants.dart b/lib/common/color/appConstants.dart index 8ba1863..106c102 100644 --- a/lib/common/color/appConstants.dart +++ b/lib/common/color/appConstants.dart @@ -89,10 +89,11 @@ class AppConstants { //系统参数 //运行打包APP模式 - // int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖 + int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖 // int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖 // int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖 - int ent_type = APPPackageType.DONGHUA.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华 + // int ent_type = APPPackageType.DONGHUA.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华 + // int ent_type = APPPackageType.HAIER.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华 5.海尔沃棣 int text_length = 8; int wifi1 = -45; @@ -153,3 +154,56 @@ String getPrivacy(int type) { "/th_user_policy_$language.html"; } } + +getBackgroundImage() { + if (AppConstants().ent_type == APPPackageType.HAIER.code) { + return "assets/img/wodi_bgImage.png"; + } + return "assets/img/bgImage.png"; +} + +getBackgroundImageNoImage() { + if (AppConstants().ent_type == APPPackageType.HAIER.code) { + return 'assets/img/wodi_bgNoImg.png'; + // return 'assets/img/bgNoImg.png'; + } + return 'assets/img/bgNoImg.png'; +} + +bool isHaveProvicy() { + int entType = AppConstants().ent_type; + + // 将 int 转换为枚举 + APPPackageType? packageType; + for (var type in APPPackageType.values) { + if (type.code == entType) { + packageType = type; + break; + } + } + + if (packageType == null) { + return false; + } + + return packageType.havePrivay; +} + +bool isHaveBeiAn() { + int entType = AppConstants().ent_type; + + // 将 int 转换为枚举 + APPPackageType? packageType; + for (var type in APPPackageType.values) { + if (type.code == entType) { + packageType = type; + break; + } + } + + if (packageType == null) { + return false; + } + + return packageType.haveBeiAn; +} diff --git a/lib/enum/APPPackageType.dart b/lib/enum/APPPackageType.dart index 5a97b84..f8a5b48 100644 --- a/lib/enum/APPPackageType.dart +++ b/lib/enum/APPPackageType.dart @@ -1,13 +1,15 @@ enum APPPackageType { - TH(1, '太和'), - HUANSHUI(2, '欢睡'), - MHT(3, '眠花糖'), - DONGHUA(4, '东华'), - HAIER(5, '海尔'), + TH(1, '太和',true,true), + HUANSHUI(2, '欢睡',true,true), + MHT(3, '眠花糖',true,true), + DONGHUA(4, '东华',true,true), + HAIER(5, '沃棣',false,false), ; - final int code; - final String description; + final int code;// + final String description;//描述 + final bool havePrivay;//是否有隐私协议和用户协议 + final bool haveBeiAn;//是否备案 - const APPPackageType(this.code, this.description); + const APPPackageType(this.code, this.description,this.havePrivay,this.haveBeiAn); } diff --git a/lib/main.dart b/lib/main.dart index 23a03e9..67f3968 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -141,12 +141,12 @@ Future main() async { void initServiceAddress() { if (AppConstants().ent_type == APPPackageType.MHT.code) { // 眠花糖 - ServiceConstant.baseHost = "zhmht.swes.com.cn:27020"; - // ServiceConstant.baseHost = "vsbs-test.he-info.cn"; + // ServiceConstant.baseHost = "zhmht.swes.com.cn:27020"; + ServiceConstant.baseHost = "vsbs-test.he-info.cn"; } else if (AppConstants().ent_type == APPPackageType.TH.code) { // 太和 - ServiceConstant.baseHost = "vsbst-api.he-info.com"; - // ServiceConstant.baseHost = "vsbs-test.he-info.cn"; + // ServiceConstant.baseHost = "vsbst-api.he-info.com"; + ServiceConstant.baseHost = "vsbs-test.he-info.cn"; } else if (AppConstants().ent_type == APPPackageType.DONGHUA.code) { ServiceConstant.baseHost = "vsbst-api.he-info.com"; } else { diff --git a/lib/pages/device/BodyDeviceWidget.dart b/lib/pages/device/BodyDeviceWidget.dart index 960f335..fe41632 100644 --- a/lib/pages/device/BodyDeviceWidget.dart +++ b/lib/pages/device/BodyDeviceWidget.dart @@ -254,7 +254,7 @@ class _BodyDevicePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), @@ -262,7 +262,7 @@ class _BodyDevicePageState extends State { resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/device/component/MessageSetting.dart b/lib/pages/device/component/MessageSetting.dart index dd7b9fd..fae8363 100644 --- a/lib/pages/device/component/MessageSetting.dart +++ b/lib/pages/device/component/MessageSetting.dart @@ -207,7 +207,7 @@ class _MessageSettingPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/device/component/SingleMessageSetting.dart b/lib/pages/device/component/SingleMessageSetting.dart index c76fa5a..33bdc88 100644 --- a/lib/pages/device/component/SingleMessageSetting.dart +++ b/lib/pages/device/component/SingleMessageSetting.dart @@ -204,7 +204,7 @@ class _MessageSettingPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/device/deviceCopy.dart b/lib/pages/device/deviceCopy.dart index 4d16d31..eb6e6bd 100644 --- a/lib/pages/device/deviceCopy.dart +++ b/lib/pages/device/deviceCopy.dart @@ -365,7 +365,7 @@ class _BodyDevicePageState extends State child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/device/device_detail.dart b/lib/pages/device/device_detail.dart index 07565d5..739550c 100644 --- a/lib/pages/device/device_detail.dart +++ b/lib/pages/device/device_detail.dart @@ -39,7 +39,7 @@ class _DeviceDetailPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/device/instant_body_page.dart b/lib/pages/device/instant_body_page.dart index 2430c01..11b8d22 100644 --- a/lib/pages/device/instant_body_page.dart +++ b/lib/pages/device/instant_body_page.dart @@ -191,7 +191,7 @@ class _InstantBodyPageState extends State child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/device/message_review_page.dart b/lib/pages/device/message_review_page.dart index f6ade05..f4c037f 100644 --- a/lib/pages/device/message_review_page.dart +++ b/lib/pages/device/message_review_page.dart @@ -42,7 +42,7 @@ class _MessageReviewPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/device_bind/THShareDeviceDetailWidget.dart b/lib/pages/device_bind/THShareDeviceDetailWidget.dart index b50e6ff..940932a 100644 --- a/lib/pages/device_bind/THShareDeviceDetailWidget.dart +++ b/lib/pages/device_bind/THShareDeviceDetailWidget.dart @@ -160,9 +160,9 @@ class THShareDeviceDetailWidget extends GetView { return GestureDetector( child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, ), ), diff --git a/lib/pages/device_bind/after/after_device_calibration_person.dart b/lib/pages/device_bind/after/after_device_calibration_person.dart index c5cd376..b9536fd 100644 --- a/lib/pages/device_bind/after/after_device_calibration_person.dart +++ b/lib/pages/device_bind/after/after_device_calibration_person.dart @@ -66,14 +66,14 @@ class _AfterCalibrationPersonPageState child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), diff --git a/lib/pages/device_bind/after/after_update_person_page.dart b/lib/pages/device_bind/after/after_update_person_page.dart index c82e7d7..30c6d85 100644 --- a/lib/pages/device_bind/after/after_update_person_page.dart +++ b/lib/pages/device_bind/after/after_update_person_page.dart @@ -79,14 +79,14 @@ class _AfterUpdatePersonPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/device_bind/after/after_wifi_page_person.dart b/lib/pages/device_bind/after/after_wifi_page_person.dart index c178b0a..25c47db 100644 --- a/lib/pages/device_bind/after/after_wifi_page_person.dart +++ b/lib/pages/device_bind/after/after_wifi_page_person.dart @@ -77,14 +77,14 @@ class _AfterWifiPagePersonState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), titleSpacing: 0, @@ -1145,5 +1145,4 @@ class _AfterWifiPagePersonState extends State { onFailure: (res) {}, ); } - } diff --git a/lib/pages/device_bind/bind_device_success.dart b/lib/pages/device_bind/bind_device_success.dart index 5a3db8f..cb21373 100644 --- a/lib/pages/device_bind/bind_device_success.dart +++ b/lib/pages/device_bind/bind_device_success.dart @@ -41,14 +41,14 @@ class _EPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/device_bind/blueteeth_device_page.dart b/lib/pages/device_bind/blueteeth_device_page.dart index cca8a58..d122ee2 100644 --- a/lib/pages/device_bind/blueteeth_device_page.dart +++ b/lib/pages/device_bind/blueteeth_device_page.dart @@ -357,7 +357,7 @@ class _BlueteethDevicePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -365,7 +365,7 @@ class _BlueteethDevicePageState extends State { backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( iconTheme: IconThemeData(color: themeController.currentColor.sc3), - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, titleSpacing: 0, title: Container( @@ -405,7 +405,7 @@ class _BlueteethDevicePageState extends State { child: Container( width: double.infinity, decoration: BoxDecoration( - color: Color(0xFF242835), + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular(20.rpx), ), child: Align( @@ -429,7 +429,7 @@ class _BlueteethDevicePageState extends State { Container( width: double.infinity, decoration: BoxDecoration( - color: Color(0xFF242835), + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular(20.rpx), ), child: Padding( @@ -544,7 +544,8 @@ class _BlueteethDevicePageState extends State { fontFamily: 'Inter', fontSize: 26.rpx, letterSpacing: 0.0, - color: themeController.currentColor.sc4, + color: themeController + .currentColor.sc4, ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( diff --git a/lib/pages/device_bind/componnet/MessageSetting.dart b/lib/pages/device_bind/componnet/MessageSetting.dart index 500386d..3c456b9 100644 --- a/lib/pages/device_bind/componnet/MessageSetting.dart +++ b/lib/pages/device_bind/componnet/MessageSetting.dart @@ -184,7 +184,7 @@ // child: Container( // decoration: BoxDecoration( // image: DecorationImage( -// image: AssetImage('assets/img/bgNoImg.png'), +// image: AssetImage(getBackgroundImageNoImage()), // fit: BoxFit.fill, // ), // ), diff --git a/lib/pages/device_bind/componnet/bind_dialog.dart b/lib/pages/device_bind/componnet/bind_dialog.dart index 4ad5aeb..b4debb7 100644 --- a/lib/pages/device_bind/componnet/bind_dialog.dart +++ b/lib/pages/device_bind/componnet/bind_dialog.dart @@ -490,7 +490,7 @@ void showConfirmDialog( blurSigma: 3.0, child: Container( decoration: BoxDecoration( - color: themeController.currentColor.sc17, + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular(20.0), ), padding: EdgeInsetsDirectional.fromSTEB(31.rpx, 0, 31.rpx, 0), diff --git a/lib/pages/device_bind/device_calibration.dart b/lib/pages/device_bind/device_calibration.dart index 3b8262b..b3714cc 100644 --- a/lib/pages/device_bind/device_calibration.dart +++ b/lib/pages/device_bind/device_calibration.dart @@ -65,14 +65,14 @@ class _CalibrationPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), diff --git a/lib/pages/device_bind/device_calibration_copy.dart b/lib/pages/device_bind/device_calibration_copy.dart index 8a76d33..c5b4dcb 100644 --- a/lib/pages/device_bind/device_calibration_copy.dart +++ b/lib/pages/device_bind/device_calibration_copy.dart @@ -54,14 +54,14 @@ class _CalibrationPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), diff --git a/lib/pages/device_bind/device_calibration_person.dart b/lib/pages/device_bind/device_calibration_person.dart index 9874a72..44800eb 100644 --- a/lib/pages/device_bind/device_calibration_person.dart +++ b/lib/pages/device_bind/device_calibration_person.dart @@ -64,14 +64,14 @@ class _CalibrationPersonPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), diff --git a/lib/pages/device_bind/device_share_list_page.dart b/lib/pages/device_bind/device_share_list_page.dart index 22683c8..ed603ed 100644 --- a/lib/pages/device_bind/device_share_list_page.dart +++ b/lib/pages/device_bind/device_share_list_page.dart @@ -50,7 +50,7 @@ class _DeviceShareListPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -464,8 +464,10 @@ class _DeviceShareListPageState extends State { ? SingleChildScrollView( child: Column( children: list - .map((item) => - DeviceShareInfoWidget(data: item,device: widget.device,)) + .map((item) => DeviceShareInfoWidget( + data: item, + device: widget.device, + )) .toList() .divide(SizedBox(height: 30.rpx)) .addToEnd(SizedBox(height: 30.rpx)), diff --git a/lib/pages/device_bind/device_share_page.dart b/lib/pages/device_bind/device_share_page.dart index e3c68f8..9621327 100644 --- a/lib/pages/device_bind/device_share_page.dart +++ b/lib/pages/device_bind/device_share_page.dart @@ -44,14 +44,14 @@ class _DeviceSharePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), titleSpacing: 0, diff --git a/lib/pages/device_bind/device_type.dart b/lib/pages/device_bind/device_type.dart index f0b20a8..9484b40 100644 --- a/lib/pages/device_bind/device_type.dart +++ b/lib/pages/device_bind/device_type.dart @@ -299,14 +299,14 @@ class _EPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, // backgroundColor: Colors.transparent, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), @@ -403,7 +403,7 @@ class _EPageState extends State { } } }, - colors: [themeController.currentColor.sc17], // 背景色 + colors: [themeController.currentColor.sc5], // 背景色 child: Container( width: double.infinity, height: MediaQuery.sizeOf(context).height * 0.135, diff --git a/lib/pages/device_bind/device_type_list.dart b/lib/pages/device_bind/device_type_list.dart index e024394..159b74a 100644 --- a/lib/pages/device_bind/device_type_list.dart +++ b/lib/pages/device_bind/device_type_list.dart @@ -1,5 +1,6 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/app_uri_status.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; @@ -49,14 +50,14 @@ class _DeviceTypeListPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, // backgroundColor: Colors.transparent, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), @@ -154,7 +155,7 @@ class _DeviceTypeListPageState extends State { } } }, - colors: [themeController.currentColor.sc17], // 背景色 + colors: [themeController.currentColor.sc5], // 背景色 child: Container( width: double.infinity, height: MediaQuery.sizeOf(context).height * 0.135, diff --git a/lib/pages/device_bind/wifi_page.dart b/lib/pages/device_bind/wifi_page.dart index e8b1bf8..aaa7518 100644 --- a/lib/pages/device_bind/wifi_page.dart +++ b/lib/pages/device_bind/wifi_page.dart @@ -148,14 +148,14 @@ class _WifiPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), titleSpacing: 0, @@ -281,7 +281,8 @@ class _WifiPageState extends State { child: Container( width: double.infinity, decoration: BoxDecoration( - color: Color(0xFF242835), + // color: Color(0xFF242835), + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular(20.rpx), ), child: Column( diff --git a/lib/pages/device_bind/wifi_page_person.dart b/lib/pages/device_bind/wifi_page_person.dart index 094e43d..69d072f 100644 --- a/lib/pages/device_bind/wifi_page_person.dart +++ b/lib/pages/device_bind/wifi_page_person.dart @@ -93,14 +93,14 @@ class _WifiPagePersonState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), titleSpacing: 0, diff --git a/lib/pages/login/LogoutPage.dart b/lib/pages/login/LogoutPage.dart index 2e40ac2..e590d5d 100644 --- a/lib/pages/login/LogoutPage.dart +++ b/lib/pages/login/LogoutPage.dart @@ -23,9 +23,9 @@ class LogoutPage extends GetView { return GestureDetector( // onTap: () => FocusScope.of(context).unfocus(),, child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 9a426af..0a52034 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -91,7 +91,7 @@ class _EPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), // 本地图片 + image: AssetImage(getBackgroundImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/login/other_login.dart b/lib/pages/login/other_login.dart index a4dd850..3000e2c 100644 --- a/lib/pages/login/other_login.dart +++ b/lib/pages/login/other_login.dart @@ -135,7 +135,7 @@ class _OtherLoginPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), // 本地图片 + image: AssetImage(getBackgroundImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -613,7 +613,7 @@ class _OtherLoginPageState extends State { .sc9, ); await DailyLogUtils.writeLog( - "获取验证码成功,${apiResponse}"); + "获取验证码失败,${apiResponse}"); return; } else { TopSlideNotification.show( @@ -624,8 +624,9 @@ class _OtherLoginPageState extends State { .currentColor .sc2, ); + await DailyLogUtils.writeLog( - "获取验证码失败,${apiResponse}"); + "获取验证码成功,${apiResponse}"); } countdownController .countdown diff --git a/lib/pages/main_bottom/e_page copy 2.dart b/lib/pages/main_bottom/e_page copy 2.dart index f5b85df..ab8319f 100644 --- a/lib/pages/main_bottom/e_page copy 2.dart +++ b/lib/pages/main_bottom/e_page copy 2.dart @@ -59,7 +59,7 @@ // final backgroundImage = showNoLoginView // ? 'assets/img/xiaoe.png' // 无设备或无登录时的背景 -// : 'assets/img/bgNoImg.png'; +// : getBackgroundImageNoImage(); // return Stack( // children: [ @@ -257,7 +257,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { ValueNotifier serverError = ValueNotifier(''); RxList deviceList = [].obs; RxString finalUri = RxString(''); - + // 本地服务器相关 HttpServer? _localServer; int _serverPort = 0; @@ -294,7 +294,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { try { isServerStarting.value = true; serverError.value = ''; - + // 1. 从 assets 加载 ZIP 文件 final ByteData zipData; try { @@ -303,48 +303,47 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { serverError.value = '找不到小e资源文件: $e'; return false; } - + final Uint8List zipBytes = zipData.buffer.asUint8List(); - + // 2. 创建临时目录并解压 ZIP _tempExtractDir = await Directory.systemTemp.createTemp('xiaoe_web_'); - final bool extractSuccess = await _extractZipToDirectory(zipBytes, _tempExtractDir!); - + final bool extractSuccess = + await _extractZipToDirectory(zipBytes, _tempExtractDir!); + if (!extractSuccess) { serverError.value = '解压小e资源文件失败'; return false; } - + // 3. 查找入口文件 (index.html) final File? entryFile = await _findEntryFile(_tempExtractDir!); if (entryFile == null) { serverError.value = '找不到入口文件 (index.html)'; return false; } - + // 4. 创建静态文件处理器 final staticHandler = createStaticHandler( _tempExtractDir!.path, defaultDocument: 'index.html', serveFilesOutsidePath: false, ); - + // 5. 添加日志中间件(可选) - final handler = Pipeline() - .addMiddleware(logRequests()) - .addHandler(staticHandler); - + final handler = + Pipeline().addMiddleware(logRequests()).addHandler(staticHandler); + // 6. 启动服务器(端口 0 表示自动分配) _localServer = await io.serve(handler, InternetAddress.loopbackIPv4, 0); _serverPort = _localServer!.port; _localServerUrl = 'http://127.0.0.1:$_serverPort'; - + print('小e本地服务启动成功: $_localServerUrl'); print('资源目录: ${_tempExtractDir!.path}'); - + isServerStarting.value = false; return true; - } catch (e, stackTrace) { serverError.value = '启动本地服务器失败: $e'; print('服务器启动错误: $e\n$stackTrace'); @@ -353,27 +352,28 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { } } - Future _extractZipToDirectory(Uint8List zipBytes, Directory targetDir) async { + Future _extractZipToDirectory( + Uint8List zipBytes, Directory targetDir) async { try { // 解码 ZIP 文件 final Archive archive = ZipDecoder().decodeBytes(zipBytes); - + for (final ArchiveFile file in archive) { final String filename = file.name; - + // 跳过目录条目(它们会通过文件创建自动生成) if (file.isFile) { // 确保目录存在 final String filePath = p.join(targetDir.path, filename); final File outputFile = File(filePath); await outputFile.parent.create(recursive: true); - + // 写入文件内容 final List data = file.content as List; await outputFile.writeAsBytes(data, flush: true); } } - + print('解压完成,文件数量: ${archive.files.length}'); return true; } catch (e, stackTrace) { @@ -391,17 +391,18 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { 'main.html', 'default.html', ]; - + for (final entry in possibleEntries) { final File file = File(p.join(dir.path, entry)); if (await file.exists()) { return file; } } - + // 如果没有找到标准入口,查找任何 .html 文件 try { - final List entities = await dir.list(recursive: false).toList(); + final List entities = + await dir.list(recursive: false).toList(); for (final entity in entities) { if (entity is File && entity.path.toLowerCase().endsWith('.html')) { return entity; @@ -410,7 +411,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { } catch (e) { print('查找入口文件失败: $e'); } - + return null; } @@ -421,7 +422,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { _localServer = null; print('本地服务器已关闭'); } - + // 清理临时目录 if (_tempExtractDir != null && _tempExtractDir!.existsSync()) { try { @@ -442,9 +443,9 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { return LayoutBuilder( builder: (context, bodySize) => GestureDetector( child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), @@ -512,7 +513,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { ), ); } - + return ValueListenableBuilder( valueListenable: serverError, builder: (context, error, child) { @@ -571,7 +572,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { ), ); } - + return Obx(() { if (finalUri.isEmpty) { return Center( @@ -696,12 +697,12 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { // 构建最终 URL String baseUrl = _localServerUrl; String queryParams = '?t=${DateTime.now().millisecondsSinceEpoch}'; - + if (deviceList.isNotEmpty) { String personParam = Uri.encodeComponent(jsonEncode(deviceList)); queryParams += '&person=$personParam'; } - + // 添加语言参数 String? language = ""; // 这里保持你原来的语言逻辑 @@ -720,19 +721,19 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { if (language != null && language.isNotEmpty) { queryParams += '&lang=$language'; } - + finalUri.value = baseUrl + queryParams; print('最终加载 URL: ${finalUri.value}'); - } else { // API 调用失败,使用基础 URL - finalUri.value = '$_localServerUrl?t=${DateTime.now().millisecondsSinceEpoch}'; + finalUri.value = + '$_localServerUrl?t=${DateTime.now().millisecondsSinceEpoch}'; } - } catch (e) { print('获取设备列表失败: $e'); // 出错时仍然加载基础页面 - finalUri.value = '$_localServerUrl?t=${DateTime.now().millisecondsSinceEpoch}'; + finalUri.value = + '$_localServerUrl?t=${DateTime.now().millisecondsSinceEpoch}'; } } -} \ No newline at end of file +} diff --git a/lib/pages/main_bottom/e_page copy.dart b/lib/pages/main_bottom/e_page copy.dart index 3028456..9a1dba0 100644 --- a/lib/pages/main_bottom/e_page copy.dart +++ b/lib/pages/main_bottom/e_page copy.dart @@ -63,7 +63,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), @@ -121,7 +121,7 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { if (deviceList.isEmpty) { return GestureDetector( onTap: () { - NewTopSlideNotification.show( + NewTopSlideNotification.show( text: "请先绑定设备".tr, textColor: themeController.currentColor.sc9, ); diff --git a/lib/pages/main_bottom/e_page.dart b/lib/pages/main_bottom/e_page.dart index 9b9773d..5bfcef3 100644 --- a/lib/pages/main_bottom/e_page.dart +++ b/lib/pages/main_bottom/e_page.dart @@ -233,9 +233,9 @@ class _EPageState extends State with AutomaticKeepAliveClientMixin { return LayoutBuilder( builder: (context, bodySize) => GestureDetector( child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/main_bottom/follow_page.dart b/lib/pages/main_bottom/follow_page.dart index e1e961a..6c02dc7 100644 --- a/lib/pages/main_bottom/follow_page.dart +++ b/lib/pages/main_bottom/follow_page.dart @@ -38,10 +38,16 @@ class _FollowPageState extends State { // fit: BoxFit.contain, // 填满整个 Container // ), // ), + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 + fit: BoxFit.fill, // 填满整个 Container + ), + ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, // backgroundColor: Colors.transparent, automaticallyImplyLeading: false, iconTheme: IconThemeData(color: themeController.currentColor.sc3), @@ -108,6 +114,7 @@ class _FollowPageState extends State { 1: 'assets/img/followus.png', 2: 'assets/img/huanshuiF.png', 4: 'assets/img/donghuaF.png', + 5: 'assets/img/wodiF.png', // 后面继续加 }; diff --git a/lib/pages/main_bottom/help_page.dart b/lib/pages/main_bottom/help_page.dart index 914541c..e3b8ff0 100644 --- a/lib/pages/main_bottom/help_page.dart +++ b/lib/pages/main_bottom/help_page.dart @@ -40,7 +40,7 @@ class _HelpPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/main_bottom/home_page.dart b/lib/pages/main_bottom/home_page.dart index c17db0c..66cee39 100644 --- a/lib/pages/main_bottom/home_page.dart +++ b/lib/pages/main_bottom/home_page.dart @@ -236,7 +236,7 @@ class _HomePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), // 本地图片 + image: AssetImage(getBackgroundImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/main_bottom/main_page_bottom_change copy.dart b/lib/pages/main_bottom/main_page_bottom_change copy.dart index c265bb6..9a493ac 100644 --- a/lib/pages/main_bottom/main_page_bottom_change copy.dart +++ b/lib/pages/main_bottom/main_page_bottom_change copy.dart @@ -259,9 +259,9 @@ class MainPageBottomChange extends GetView { ); } else { return Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), + image: AssetImage(getBackgroundImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/main_bottom/main_page_bottom_change.dart b/lib/pages/main_bottom/main_page_bottom_change.dart index 5343b1a..cb28ced 100644 --- a/lib/pages/main_bottom/main_page_bottom_change.dart +++ b/lib/pages/main_bottom/main_page_bottom_change.dart @@ -565,7 +565,7 @@ class MainPageBottomChange extends GetView { @override Widget build(BuildContext context) { - if (AppConstants().ent_type != APPPackageType.MHT.code) { + if (AppConstants().ent_type != APPPackageType.MHT.code && isShowPrivacyOriginFromTHAPP()) { Future.delayed(const Duration(milliseconds: 0), () { String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog"); if (isShowYingShiDialog == null || isShowYingShiDialog != "true") { @@ -673,9 +673,9 @@ class MainPageBottomChange extends GetView { ); } else { return Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), + image: AssetImage(getBackgroundImage()), fit: BoxFit.fill, ), ), @@ -773,4 +773,15 @@ class MainPageBottomChange extends GetView { return true; } } + + //太和e护衍生app是否显示协议 + bool isShowPrivacyOriginFromTHAPP() { + if (AppConstants().ent_type == APPPackageType.TH.code) { + return true; + } + if (AppConstants().ent_type == APPPackageType.DONGHUA.code) { + return true; + } + return false; + } } diff --git a/lib/pages/main_bottom/message_page.dart b/lib/pages/main_bottom/message_page.dart index 3ed0665..491841a 100644 --- a/lib/pages/main_bottom/message_page.dart +++ b/lib/pages/main_bottom/message_page.dart @@ -101,9 +101,9 @@ class _MessagePageState extends State { builder: (context, boxConstraints) => GestureDetector( // onTap: () => FocusScope.of(context).unfocus(),, child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/main_bottom/message_page_return.dart b/lib/pages/main_bottom/message_page_return.dart index a89eec7..f4ec8da 100644 --- a/lib/pages/main_bottom/message_page_return.dart +++ b/lib/pages/main_bottom/message_page_return.dart @@ -91,9 +91,9 @@ class _MessageReturnPageState extends State { builder: (context, boxConstraints) => GestureDetector( // onTap: () => FocusScope.of(context).unfocus(),, child: Container( - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/main_bottom/mine_page.dart b/lib/pages/main_bottom/mine_page.dart index ec597cd..e89c405 100644 --- a/lib/pages/main_bottom/mine_page.dart +++ b/lib/pages/main_bottom/mine_page.dart @@ -47,7 +47,7 @@ class _MinePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgImage.png'), // 本地图片 + image: AssetImage(getBackgroundImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -307,7 +307,8 @@ class _MinePageState extends State { child: Container( width: double.infinity, decoration: BoxDecoration( - color: Color(0xFF242835), + // color: Color(0xFF242835), + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular( AppConstants().normal_container_radius), ), diff --git a/lib/pages/mh_page/CommonMessageSettingPage.dart b/lib/pages/mh_page/CommonMessageSettingPage.dart index 2101fde..c5c3f39 100644 --- a/lib/pages/mh_page/CommonMessageSettingPage.dart +++ b/lib/pages/mh_page/CommonMessageSettingPage.dart @@ -247,7 +247,7 @@ class _CommonMessageSettingPageState await commonMessageSettingController .updateSleepNotify(val); await commonMessageSettingController - .getAppSleepNotify(); + .getAppSleepNotify(); commonMessageSettingController .updateAll(); }, diff --git a/lib/pages/mh_page/device/controller/mht_bluetooth_controller.dart b/lib/pages/mh_page/device/controller/mht_bluetooth_controller.dart index ff64801..b1c2469 100644 --- a/lib/pages/mh_page/device/controller/mht_bluetooth_controller.dart +++ b/lib/pages/mh_page/device/controller/mht_bluetooth_controller.dart @@ -428,27 +428,29 @@ class MHTBlueToothController extends GetControllerEx { if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" && Base64Tool.decode(commandData['data']).length <= 24) { ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}"); - commandData['wfr'] = false; - //todo 填充蓝牙指令 - String serviceAddress = ServiceConstant.service_address; - String serviceName = ServiceConstant.server_service; - String serviceApi = ServiceConstant.sendWifiCommand; - String queryUrl = "${serviceAddress}${serviceName}${serviceApi}"; - await requestWithLog( - logTitle: "下发wifi控制指令", - method: MyHttpMethod.post, - queryUrl: queryUrl, - data: commandData, - onSuccess: (res) { - ef.log("下发指令成功: ${res.msg}"); - }, - onFailure: (res) { - throw "下发wifi控制指令失败: ${res.msg}"; - }, - ); } else { // ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}"); } + ef.log("全部指令"); + commandData['wfr'] = false; + commandData['type'] = 0; //0 base64数据 1 二进制数据 + String serviceAddress = ServiceConstant.service_address; + String serviceName = ServiceConstant.server_service; + String serviceApi = ServiceConstant.sendWifiCommand; + String queryUrl = "${serviceAddress}${serviceName}${serviceApi}"; + await requestWithLog( + logTitle: "下发wifi控制指令", + method: MyHttpMethod.post, + queryUrl: queryUrl, + data: commandData, + onSuccess: (res) { + ef.log("下发指令成功: ${res.msg}"); + }, + onFailure: (res) { + ef.log("下发指令失败: ${res.msg}"); + throw "下发wifi控制指令失败: ${res.msg}"; + }, + ); } //todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯 diff --git a/lib/pages/mh_page/test/WebviewTestModel.dart b/lib/pages/mh_page/test/WebviewTestModel.dart index e953777..f76ee19 100644 --- a/lib/pages/mh_page/test/WebviewTestModel.dart +++ b/lib/pages/mh_page/test/WebviewTestModel.dart @@ -422,7 +422,9 @@ class WebviewTestController extends GetControllerEx { ef.log("ws =>$x"); if (x == EasywsState.connected) { try { - if (lastSelectDevice != null && lastSelectDevice.isNotEmpty) { + if (lastSelectDevice != null && + lastSelectDevice.isNotEmpty && + lastSelectDevice['mac'] != selectDevice['mac']) { List oldMacList = [ lastSelectDevice['bind_mac_a'], lastSelectDevice['bind_mac_b'], diff --git a/lib/pages/person/person_page.dart b/lib/pages/person/person_page.dart index 0c08ee8..ce8e951 100644 --- a/lib/pages/person/person_page.dart +++ b/lib/pages/person/person_page.dart @@ -81,7 +81,7 @@ class _EPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -89,7 +89,7 @@ class _EPageState extends State { resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -785,7 +785,6 @@ class _EPageState extends State { })), ), ), - Padding( padding: EdgeInsetsDirectional.fromSTEB( 70.rpx, 25.rpx, 70.rpx, 0), diff --git a/lib/pages/person/update_person_page.dart b/lib/pages/person/update_person_page.dart index b9032b8..045164b 100644 --- a/lib/pages/person/update_person_page.dart +++ b/lib/pages/person/update_person_page.dart @@ -69,7 +69,7 @@ class _UpdatePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -77,7 +77,7 @@ class _UpdatePageState extends State { resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -835,7 +835,6 @@ class _UpdatePageState extends State { ), ), ), - Padding( padding: EdgeInsetsDirectional.fromSTEB( 70.rpx, 25.rpx, 70.rpx, 0), diff --git a/lib/pages/policy/user_policy.dart b/lib/pages/policy/user_policy.dart index 6483721..d89ae79 100644 --- a/lib/pages/policy/user_policy.dart +++ b/lib/pages/policy/user_policy.dart @@ -46,7 +46,7 @@ class _UserPrivacyNewPageState extends State { child: Container( // decoration: BoxDecoration( // image: DecorationImage( - // image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + // image: AssetImage(getBackgroundImageNoImage()), // 本地图片 // fit: BoxFit.fill, // 填满整个 Container // ), // ), diff --git a/lib/pages/repair/apply_repair_page.dart b/lib/pages/repair/apply_repair_page.dart index a50f7be..7445769 100644 --- a/lib/pages/repair/apply_repair_page.dart +++ b/lib/pages/repair/apply_repair_page.dart @@ -96,14 +96,14 @@ class _ApplyRepairPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/repair/apply_repair_success.dart b/lib/pages/repair/apply_repair_success.dart index 8f83c33..ed2501b 100644 --- a/lib/pages/repair/apply_repair_success.dart +++ b/lib/pages/repair/apply_repair_success.dart @@ -37,7 +37,7 @@ class _ApplyRepairSuccessState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/repair/component/RepairHistoryInfoWidget.dart b/lib/pages/repair/component/RepairHistoryInfoWidget.dart index ff3f76c..2e5dc86 100644 --- a/lib/pages/repair/component/RepairHistoryInfoWidget.dart +++ b/lib/pages/repair/component/RepairHistoryInfoWidget.dart @@ -162,7 +162,6 @@ class _RepairHistoryInfoWidgetState extends State { style: TextStyle( fontSize: 26.rpx, letterSpacing: 0.0, - color: themeController.currentColor.sc3, ), ), @@ -199,7 +198,6 @@ class _RepairHistoryInfoWidgetState extends State { style: TextStyle( fontSize: 26.rpx, letterSpacing: 0.0, - color: themeController.currentColor.sc3, ), ), diff --git a/lib/pages/repair/repair_detail_page.dart b/lib/pages/repair/repair_detail_page.dart index 907e3df..da6797e 100644 --- a/lib/pages/repair/repair_detail_page.dart +++ b/lib/pages/repair/repair_detail_page.dart @@ -69,14 +69,14 @@ class _RepairDetailPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/repair/repair_list_page.dart b/lib/pages/repair/repair_list_page.dart index a92f270..91f997e 100644 --- a/lib/pages/repair/repair_list_page.dart +++ b/lib/pages/repair/repair_list_page.dart @@ -2,6 +2,7 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:vbvs_app/common/color/ServiceConstant.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/requestWithLog.dart'; @@ -39,14 +40,14 @@ class _RepairListPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/setting/Theme_setting.dart b/lib/pages/setting/Theme_setting.dart index d51f089..ba155be 100644 --- a/lib/pages/setting/Theme_setting.dart +++ b/lib/pages/setting/Theme_setting.dart @@ -38,7 +38,7 @@ class _ThemeSettingState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), diff --git a/lib/pages/setting/common_mesaage_setting.dart b/lib/pages/setting/common_mesaage_setting.dart index 0b276c3..18347a2 100644 --- a/lib/pages/setting/common_mesaage_setting.dart +++ b/lib/pages/setting/common_mesaage_setting.dart @@ -121,14 +121,14 @@ class _CommonMessageSettingPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, diff --git a/lib/pages/setting/language_setting.dart b/lib/pages/setting/language_setting.dart index 00305c2..3a616c3 100644 --- a/lib/pages/setting/language_setting.dart +++ b/lib/pages/setting/language_setting.dart @@ -37,14 +37,14 @@ class _LanguageSettingState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -91,7 +91,7 @@ class _LanguageSettingState extends State { child: Container( width: double.infinity, decoration: BoxDecoration( - color: Color(0xFF242835), + color: themeController.currentColor.sc5, borderRadius: BorderRadius.circular( AppConstants().normal_container_radius), ), diff --git a/lib/pages/sleep_report/new_sleep_report_page.dart b/lib/pages/sleep_report/new_sleep_report_page.dart index 8fbf5bf..a6cd7f6 100644 --- a/lib/pages/sleep_report/new_sleep_report_page.dart +++ b/lib/pages/sleep_report/new_sleep_report_page.dart @@ -149,7 +149,8 @@ class _NewSleepReportPageState extends State { image: (widget.data['backgroundImg'] != null && widget.data['backgroundImg'].toString().isNotEmpty) ? AssetImage(widget.data['backgroundImg']) - : AssetImage('assets/img/bgNoImg.png') as ImageProvider, + : AssetImage(getBackgroundImageNoImage()) + as ImageProvider, fit: BoxFit.fill, ), ), diff --git a/lib/pages/sleep_report/sleep_report_page.dart b/lib/pages/sleep_report/sleep_report_page.dart index 1a98985..1fb68c1 100644 --- a/lib/pages/sleep_report/sleep_report_page.dart +++ b/lib/pages/sleep_report/sleep_report_page.dart @@ -1,6 +1,7 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; @@ -46,7 +47,7 @@ class _SleepReportPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/user/about_us_page.dart b/lib/pages/user/about_us_page.dart index dd9e649..377c764 100644 --- a/lib/pages/user/about_us_page.dart +++ b/lib/pages/user/about_us_page.dart @@ -1,5 +1,6 @@ import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/component/tool/WebViewWidget.dart'; @@ -23,7 +24,7 @@ class _AboutUsPageState extends State { // url: AppConstants().ent_type == 1 // ? "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ" // : "https://mp.weixin.qq.com/s/7BvvprVDqX1eOzM3Lms8dg", - url:widget.url, + url: widget.url, onLoad: () { print('网页载入完毕'); }, @@ -38,7 +39,7 @@ class _AboutUsPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), diff --git a/lib/pages/user/privacy_scheme_page.dart b/lib/pages/user/privacy_scheme_page.dart index 63068ef..9657510 100644 --- a/lib/pages/user/privacy_scheme_page.dart +++ b/lib/pages/user/privacy_scheme_page.dart @@ -41,7 +41,7 @@ class _PrivacySchemePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -93,12 +93,14 @@ class _PrivacySchemePageState extends State { Expanded( child: Obx(() { if (pdfController.localPdfPath.value == null) { - return Center(child:CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation( - themeController.currentColor.sc1, - ), - ),); + return Center( + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + themeController.currentColor.sc1, + ), + ), + ); } else { return PDFView( filePath: pdfController.localPdfPath.value!, diff --git a/lib/pages/user/setting_page.dart b/lib/pages/user/setting_page.dart index 31b1de9..378ac3c 100644 --- a/lib/pages/user/setting_page.dart +++ b/lib/pages/user/setting_page.dart @@ -47,14 +47,15 @@ class _SettingPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满个 Container ), ), child: Scaffold( backgroundColor: Colors.transparent, // 加上这一行 appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + // backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -94,583 +95,628 @@ class _SettingPageState extends State { top: true, child: Padding( padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 25.rpx, 0.rpx, 0), - child: Container( - width: double.infinity, - decoration: BoxDecoration( - color: Color(0xFF242835), - borderRadius: BorderRadius.circular( - AppConstants().normal_container_radius), - ), - child: Padding( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 0, 0.rpx, 0), - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - // ClickableContainer( - // backgroundColor: Colors.transparent, // 容器背景色 - // highlightColor: themeController - // .currentColor.sc21, // 点击时的背景色 - // padding: EdgeInsetsDirectional.fromSTEB( - // 40.rpx, 0.rpx, 40.rpx, 0.rpx), - // onTap: () { - // // TopSlideNotification.show(context, - // // text: "待开发功能".tr); - // Get.toNamed("/themeSetting"); - // }, - // child: Container( - // child: Padding( - // padding: EdgeInsetsDirectional.fromSTEB( - // 0.rpx, 30.rpx, 0.rpx, 30.rpx), - // child: Row( - // mainAxisSize: MainAxisSize.max, - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Row( - // mainAxisSize: MainAxisSize.max, - // children: [ - // Text( - // '设置页.主题模式'.tr, - // style: TextStyle( - // fontFamily: 'Inter', - // color: themeController - // .currentColor.sc3, - // fontSize: AppConstants() - // .title_text_fontSize, - // letterSpacing: 0.0, - // ), - // ), - // ].divide(SizedBox(width: 22.rpx)), - // ), - // Row( - // mainAxisSize: MainAxisSize.max, - // children: [ - // Text( - // '深色'.tr, - // style: TextStyle( - // fontFamily: 'Inter', - // color: Color(0xFFD9E3EB), - // fontSize: 26.rpx, - // letterSpacing: 0.0, - // ), - // ), - // SvgPicture.asset( - // 'assets/img/icon/arrow_right.svg', - // width: 8.rpx, - // height: 15 - // .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 - // color: themeController - // .currentColor.sc3, - // ), - // ].divide(SizedBox(width: 28.rpx)), - // ), - // ], - // ), - // ), - // ), - // ), + 0.rpx, 25.rpx, 0.rpx, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration( + // color: Color(0xFF242835), + color: themeController.currentColor.sc5, + borderRadius: BorderRadius.circular( + AppConstants().normal_container_radius), + ), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 0, 0.rpx, 0), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + // ClickableContainer( + // backgroundColor: Colors.transparent, // 容器背景色 + // highlightColor: themeController + // .currentColor.sc21, // 点击时的背景色 + // padding: EdgeInsetsDirectional.fromSTEB( + // 40.rpx, 0.rpx, 40.rpx, 0.rpx), + // onTap: () { + // // TopSlideNotification.show(context, + // // text: "待开发功能".tr); + // Get.toNamed("/themeSetting"); + // }, + // child: Container( + // child: Padding( + // padding: EdgeInsetsDirectional.fromSTEB( + // 0.rpx, 30.rpx, 0.rpx, 30.rpx), + // child: Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: + // MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Text( + // '设置页.主题模式'.tr, + // style: TextStyle( + // fontFamily: 'Inter', + // color: themeController + // .currentColor.sc3, + // fontSize: AppConstants() + // .title_text_fontSize, + // letterSpacing: 0.0, + // ), + // ), + // ].divide(SizedBox(width: 22.rpx)), + // ), + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Text( + // '深色'.tr, + // style: TextStyle( + // fontFamily: 'Inter', + // color: Color(0xFFD9E3EB), + // fontSize: 26.rpx, + // letterSpacing: 0.0, + // ), + // ), + // SvgPicture.asset( + // 'assets/img/icon/arrow_right.svg', + // width: 8.rpx, + // height: 15 + // .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + // color: themeController + // .currentColor.sc3, + // ), + // ].divide(SizedBox(width: 28.rpx)), + // ), + // ], + // ), + // ), + // ), + // ), - ClickableContainer( - backgroundColor: Colors.transparent, // 容器背景色 - highlightColor: themeController - .currentColor.sc21, // 点击时的背景色 - padding: EdgeInsetsDirectional.fromSTEB( - 40.rpx, 0.rpx, 40.rpx, 0.rpx), - onTap: () { - // TopSlideNotification.show(context, - // text: "待开发功能".tr); - Get.toNamed("/languageSetting"); - }, - child: Container( - child: Padding( + ClickableContainer( + backgroundColor: + Colors.transparent, // 容器背景色 + highlightColor: themeController + .currentColor.sc21, // 点击时的背景色 padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 30.rpx, 0.rpx, 30.rpx), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( + 40.rpx, 0.rpx, 40.rpx, 0.rpx), + onTap: () { + // TopSlideNotification.show(context, + // text: "待开发功能".tr); + Get.toNamed("/languageSetting"); + }, + child: Container( + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB( + 0.rpx, 30.rpx, 0.rpx, 30.rpx), + child: Row( mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Text( - '设置页.选择语言'.tr, - style: TextStyle( - fontFamily: 'Inter', - color: themeController - .currentColor.sc3, - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, - ), - ), - ].divide(SizedBox(width: 22.rpx)), - ), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Obx(() { - return Text( - languageController - .selectLanguage - .value! - .language_name!, - style: TextStyle( - fontFamily: 'Inter', - color: themeController - .currentColor.sc2, - fontSize: 26.rpx, - letterSpacing: 0.0, + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + '设置页.选择语言'.tr, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc3, + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), ), - ); - }), + ].divide( + SizedBox(width: 22.rpx)), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Obx(() { + return Text( + languageController + .selectLanguage + .value! + .language_name!, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc2, + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ); + }), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15 + .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + color: themeController + .currentColor.sc3, + ), + ].divide( + SizedBox(width: 28.rpx)), + ), + ], + ), + ), + ), + ), + ClickableContainer( + backgroundColor: + Colors.transparent, // 容器背景色 + highlightColor: themeController + .currentColor.sc21, // 点击时的背景色 + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 0.rpx, 0.rpx, 0.rpx), + onTap: () { + print('点击了容器'); + Get.toNamed( + "/commonMessageSettingPage"); + }, + child: Container( + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB( + 40.rpx, + 30.rpx, + 40.rpx, + 30.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + '消息通知'.tr, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc3, + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide( + SizedBox(width: 22.rpx)), + ), SvgPicture.asset( 'assets/img/icon/arrow_right.svg', width: 8.rpx, - height: 15 + height: 14 .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 color: themeController .currentColor.sc3, ), - ].divide(SizedBox(width: 28.rpx)), + ], ), - ], - ), - ), - ), - ), - ClickableContainer( - backgroundColor: Colors.transparent, // 容器背景色 - highlightColor: themeController - .currentColor.sc21, // 点击时的背景色 - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 0.rpx, 0.rpx, 0.rpx), - onTap: () { - print('点击了容器'); - Get.toNamed("/commonMessageSettingPage"); - }, - child: Container( - child: Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 40.rpx, 30.rpx, 40.rpx, 30.rpx), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Text( - '消息通知'.tr, - style: TextStyle( - fontFamily: 'Inter', - color: themeController - .currentColor.sc3, - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, - ), - ), - ].divide(SizedBox(width: 22.rpx)), - ), - SvgPicture.asset( - 'assets/img/icon/arrow_right.svg', - width: 8.rpx, - height: - 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 - color: themeController - .currentColor.sc3, - ), - ], - ), - ), - ), - ), - if (AppConstants().ent_type == - APPPackageType.TH.code) - ClickableContainer( - backgroundColor: - Colors.transparent, // 容器背景色 - highlightColor: themeController - .currentColor.sc21, // 点击时的背景色 - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 0.rpx, 0.rpx, 0.rpx), - onTap: () async { - String url = - "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ"; - String serviceAddress = - ServiceConstant.service_address; - String serviceName = - ServiceConstant.server_service; - String serviceApi = - ServiceConstant.user_setting; - String queryUrl = - "$serviceAddress$serviceName$serviceApi"; - String type = "app_about_us"; - String code = "th"; - if (AppConstants().ent_type == - APPPackageType.TH.code) { - code = "th"; - } else if (AppConstants().ent_type == - APPPackageType.HUANSHUI.code) { - code = "hs"; - } else { - code = 'th'; - } - queryUrl = - "$queryUrl?type=$type&code=$code"; - await requestWithLog( - logTitle: "查询操作说明", - method: MyHttpMethod.get, - queryUrl: queryUrl, - onSuccess: (res) { - String? language = "zh_CN"; - if (AppConstants().ent_type == - APPPackageType.MHT.code) { - if (mhLanguageController - .selectLanguage != - null) { - language = mhLanguageController - .selectLanguage - .value! - .language_code; - } - } else { - if (languageController - .selectLanguage != - null) { - language = languageController - .selectLanguage - .value! - .language_code; - } - } - if (language == "zh_CN") { - url = res.data['url']; - } else { - url = res.data['en_url']; - } - }, - ); - print('点击了容器'); - Get.toNamed("/aboutUsPage", - arguments: url); - }, - child: Container( - child: Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 40.rpx, 30.rpx, 40.rpx, 30.rpx), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Text( - '关于我们'.tr, - style: TextStyle( - fontFamily: 'Inter', - color: themeController - .currentColor.sc3, - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, - ), - ), - ].divide(SizedBox(width: 22.rpx)), - ), - SvgPicture.asset( - 'assets/img/icon/arrow_right.svg', - width: 8.rpx, - height: 14 - .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 - color: themeController - .currentColor.sc3, - ), - ], ), ), ), - ), - - ClickableContainer( - backgroundColor: Colors.transparent, // 容器背景色 - highlightColor: themeController - .currentColor.sc21, // 点击时的背景色 - padding: EdgeInsetsDirectional.fromSTEB( - 40.rpx, 0.rpx, 40.rpx, 0.rpx), - onTap: () { - // TopSlideNotification.show(context, - // text: "待开发功能".tr); - // Get.toNamed("/userSchemePage"); - Get.toNamed("/userPolicyPageNew", - arguments: getPrivacy(2)); - }, - child: Container( - child: Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 30.rpx, 0.rpx, 30.rpx), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Text( - '用户协议'.tr, - style: TextStyle( - fontFamily: 'Inter', + if (AppConstants().ent_type == + APPPackageType.TH.code) + ClickableContainer( + backgroundColor: + Colors.transparent, // 容器背景色 + highlightColor: themeController + .currentColor.sc21, // 点击时的背景色 + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 0.rpx, 0.rpx, 0.rpx), + onTap: () async { + String url = + "https://mp.weixin.qq.com/s/IAr4RNBy0hGJXGKyMxe7eQ"; + String serviceAddress = + ServiceConstant.service_address; + String serviceName = + ServiceConstant.server_service; + String serviceApi = + ServiceConstant.user_setting; + String queryUrl = + "$serviceAddress$serviceName$serviceApi"; + String type = "app_about_us"; + String code = "th"; + if (AppConstants().ent_type == + APPPackageType.TH.code) { + code = "th"; + } else if (AppConstants().ent_type == + APPPackageType.HUANSHUI.code) { + code = "hs"; + } else { + code = 'th'; + } + queryUrl = + "$queryUrl?type=$type&code=$code"; + await requestWithLog( + logTitle: "查询操作说明", + method: MyHttpMethod.get, + queryUrl: queryUrl, + onSuccess: (res) { + String? language = "zh_CN"; + if (AppConstants().ent_type == + APPPackageType.MHT.code) { + if (mhLanguageController + .selectLanguage != + null) { + language = + mhLanguageController + .selectLanguage + .value! + .language_code; + } + } else { + if (languageController + .selectLanguage != + null) { + language = languageController + .selectLanguage + .value! + .language_code; + } + } + if (language == "zh_CN") { + url = res.data['url']; + } else { + url = res.data['en_url']; + } + }, + ); + print('点击了容器'); + Get.toNamed("/aboutUsPage", + arguments: url); + }, + child: Container( + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB( + 40.rpx, + 30.rpx, + 40.rpx, + 30.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Row( + mainAxisSize: + MainAxisSize.max, + children: [ + Text( + '关于我们'.tr, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc3, + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide( + SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 14 + .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 color: themeController .currentColor.sc3, - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, ), - ), - ].divide(SizedBox(width: 22.rpx)), + ], + ), ), - SvgPicture.asset( - 'assets/img/icon/arrow_right.svg', - width: 8.rpx, - height: - 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 - color: themeController - .currentColor.sc3, - ), - ], + ), ), - ), - ), - ), - ClickableContainer( - backgroundColor: Colors.transparent, // 容器背景色 - highlightColor: themeController - .currentColor.sc21, // 点击时的背景色 - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 0.rpx, 0.rpx, 0.rpx), - onTap: () { - // TopSlideNotification.show(context, - // text: "待开发功能".tr); - // Get.toNamed("/privacyPage"); - Get.toNamed("/privacyPolicyPageNew", - arguments: getPrivacy(1)); - }, - child: Container( - child: Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 40.rpx, 30.rpx, 40.rpx, 30.rpx), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Text( - '隐私协议'.tr, - style: TextStyle( - fontFamily: 'Inter', + if (isHaveProvicy()) + ClickableContainer( + backgroundColor: + Colors.transparent, // 容器背景色 + highlightColor: themeController + .currentColor.sc21, // 点击时的背景色 + padding: EdgeInsetsDirectional.fromSTEB( + 40.rpx, 0.rpx, 40.rpx, 0.rpx), + onTap: () { + // TopSlideNotification.show(context, + // text: "待开发功能".tr); + // Get.toNamed("/userSchemePage"); + Get.toNamed("/userPolicyPageNew", + arguments: getPrivacy(2)); + }, + child: Container( + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB( + 0.rpx, + 30.rpx, + 0.rpx, + 30.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Row( + mainAxisSize: + MainAxisSize.max, + children: [ + Text( + '用户协议'.tr, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc3, + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide( + SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15 + .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 color: themeController .currentColor.sc3, - fontSize: AppConstants() - .title_text_fontSize, - letterSpacing: 0.0, ), - ), - ].divide(SizedBox(width: 22.rpx)), + ], + ), ), - SvgPicture.asset( - 'assets/img/icon/arrow_right.svg', - width: 8.rpx, - height: - 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 - color: themeController - .currentColor.sc3, - ), - ], + ), ), - ), - ), + if (isHaveProvicy()) + ClickableContainer( + backgroundColor: + Colors.transparent, // 容器背景色 + highlightColor: themeController + .currentColor.sc21, // 点击时的背景色 + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 0.rpx, 0.rpx, 0.rpx), + onTap: () { + // TopSlideNotification.show(context, + // text: "待开发功能".tr); + // Get.toNamed("/privacyPage"); + Get.toNamed("/privacyPolicyPageNew", + arguments: getPrivacy(1)); + }, + child: Container( + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB( + 40.rpx, + 30.rpx, + 40.rpx, + 30.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Row( + mainAxisSize: + MainAxisSize.max, + children: [ + Text( + '隐私协议'.tr, + style: TextStyle( + fontFamily: 'Inter', + color: themeController + .currentColor.sc3, + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide( + SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 14 + .rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + color: themeController + .currentColor.sc3, + ), + ], + ), + ), + ), + ), + ] + .divide(SizedBox(height: 0.rpx)) + .addToStart(SizedBox(height: 30.rpx)) + .addToEnd(SizedBox(height: 30.rpx)), ), - ] - .divide(SizedBox(height: 0.rpx)) - .addToStart(SizedBox(height: 30.rpx)) - .addToEnd(SizedBox(height: 30.rpx)), + ), ), ), - ), + ], ), - if (AppConstants().ent_type == - APPPackageType.TH.code) - SizedBox( - height: 100.rpx, - ), - Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 100.rpx, 360.rpx, 100.rpx, 0), - child: CustomCard( - borderRadius: - AppConstants().button_container_radius, // 圆角半径 - onTap: () { - ApiResponse apiResponse = - userInfoController.logOut(); - TopSlideNotification.show( - context, - text: apiResponse.msg!, - textColor: apiResponse.code == HttpStatusCodes.ok - ? themeController.currentColor.sc2 - : themeController.currentColor.sc9, - ); - if (apiResponse.code == HttpStatusCodes.ok) { - Get.offAllNamed("/mianPageBottomChange"); - } - }, - colors: [ - themeController.currentColor.sc9, - ], // 渐变色是同一个色,也可以根据需要调整 - child: Container( - width: - // MediaQuery.sizeOf(context).width * 0.66, - bodySize.maxWidth, - height: MediaQuery.sizeOf(context).height * 0.055, - constraints: BoxConstraints( - minWidth: 500.rpx, - minHeight: 90.rpx, - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '设置页.退出登录'.tr, - style: TextStyle( - color: themeController.currentColor.sc3, - fontFamily: 'Inter', - fontSize: - AppConstants().normal_text_fontSize, - letterSpacing: 0.0, - ), - ), - ].divide(SizedBox( - width: 17.rpx, - )), - ), - ), - ), - ), - Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 100.rpx, 20.rpx, 100.rpx, 0), - child: CustomCard( - borderRadius: - AppConstants().button_container_radius, // 圆角半径 - onTap: () { - // TopSlideNotification.show( - // context, - // text: "待开发功能".tr, - // ); - Get.toNamed("/deleteAccount"); - }, - colors: [ - Colors.transparent, - ], // 渐变色是同一个色,也可以根据需要调整 - child: Container( - width: - // MediaQuery.sizeOf(context).width * 0.66, - bodySize.maxWidth, - height: MediaQuery.sizeOf(context).height * 0.055, - constraints: BoxConstraints( - minWidth: 500.rpx, - minHeight: 90.rpx, - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - '注销账号'.tr, - style: TextStyle( - color: themeController.currentColor.sc9, - fontFamily: 'Inter', - fontSize: - AppConstants().normal_text_fontSize, - letterSpacing: 0.0, - ), - ), - ].divide(SizedBox( - width: 17.rpx, - )), - ), - ), - ), - ), - Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 100.rpx, 0.rpx, 100.rpx), - child: ClickableContainer( - borderRadius: - AppConstants().button_container_radius, // 圆角半径 - onTap: () {}, - backgroundColor: - Colors.transparent, // 渐变色是同一个色,也可以根据需要调整 - highlightColor: Colors.transparent, + ), + Column( + children: [ + Padding( padding: EdgeInsetsDirectional.fromSTEB( - 0.rpx, 0.rpx, 0.rpx, 0), - child: Container( - width: - // MediaQuery.sizeOf(context).width * 0.66, - bodySize.maxWidth, - // height: MediaQuery.sizeOf(context).height * 0.055, - constraints: BoxConstraints( - minWidth: 500.rpx, - minHeight: 90.rpx, - ), - child: Column( + 100.rpx, 0.rpx, 100.rpx, 0), + child: CustomCard( + borderRadius: + AppConstants().button_container_radius, // 圆角半径 + onTap: () { + ApiResponse apiResponse = + userInfoController.logOut(); + TopSlideNotification.show( + context, + text: apiResponse.msg!, + textColor: + apiResponse.code == HttpStatusCodes.ok + ? themeController.currentColor.sc2 + : themeController.currentColor.sc9, + ); + if (apiResponse.code == HttpStatusCodes.ok) { + Get.offAllNamed("/mianPageBottomChange"); + } + }, + colors: [ + themeController.currentColor.sc9, + ], // 渐变色是同一个色,也可以根据需要调整 + child: Container( + width: + // MediaQuery.sizeOf(context).width * 0.66, + bodySize.maxWidth, + height: MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - 'icp备案号'.tr, + '设置页.退出登录'.tr, style: TextStyle( - color: themeController.currentColor.sc4, + color: themeController.currentColor.sc3, fontFamily: 'Inter', fontSize: - AppConstants().smaller_text_fontSize, - letterSpacing: 0.0, - ), - ), - Text( - getCopyrightText(AppConstants().ent_type), - style: TextStyle( - color: themeController.currentColor.sc4, - fontFamily: 'Inter', - fontSize: - AppConstants().smaller_text_fontSize, + AppConstants().normal_text_fontSize, letterSpacing: 0.0, ), ), ].divide(SizedBox( - height: 4.rpx, - ))), + width: 17.rpx, + )), + ), + ), ), ), - ), - ], - ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 100.rpx, 20.rpx, 100.rpx, 0), + child: CustomCard( + borderRadius: + AppConstants().button_container_radius, // 圆角半径 + onTap: () { + // TopSlideNotification.show( + // context, + // text: "待开发功能".tr, + // ); + Get.toNamed("/deleteAccount"); + }, + colors: [ + Colors.transparent, + ], // 渐变色是同一个色,也可以根据需要调整 + child: Container( + width: + // MediaQuery.sizeOf(context).width * 0.66, + bodySize.maxWidth, + height: MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + '注销账号'.tr, + style: TextStyle( + color: themeController.currentColor.sc9, + fontFamily: 'Inter', + fontSize: + AppConstants().normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + width: 17.rpx, + )), + ), + ), + ), + ), + // if (isHaveBeiAn()) + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 100.rpx, 0.rpx, 100.rpx), + child: ClickableContainer( + borderRadius: + AppConstants().button_container_radius, // 圆角半径 + onTap: () {}, + backgroundColor: + Colors.transparent, // 渐变色是同一个色,也可以根据需要调整 + highlightColor: Colors.transparent, + padding: EdgeInsetsDirectional.fromSTEB( + 0.rpx, 0.rpx, 0.rpx, 0), + child: Container( + width: + // MediaQuery.sizeOf(context).width * 0.66, + bodySize.maxWidth, + // height: MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (isHaveBeiAn()) + Text( + 'icp备案号'.tr, + style: TextStyle( + color: + themeController.currentColor.sc4, + fontFamily: 'Inter', + fontSize: AppConstants() + .smaller_text_fontSize, + letterSpacing: 0.0, + ), + ), + Text( + getCopyrightText(AppConstants().ent_type), + style: TextStyle( + color: themeController.currentColor.sc4, + fontFamily: 'Inter', + fontSize: AppConstants() + .smaller_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + height: 4.rpx, + ))), + ), + ), + ), + ], + ), + ], ), ), ), @@ -732,6 +778,7 @@ class _SettingPageState extends State { 1: '公司信息'.tr, 2: 'Copyright © 2019-2029 合肥眠花糖家具有限责任公司 版权所有'.tr, 4: 'Copyright © 2020-2030 东华智能睡眠中心 版权所有'.tr, + 5: 'Copyright © 2020-2030 青岛沃棣家居有限公司 版权所有'.tr, }; return copyrightMap[entType] ?? '公司信息'.tr; diff --git a/lib/pages/user/update_user_email.dart b/lib/pages/user/update_user_email.dart index e85981f..68fe374 100644 --- a/lib/pages/user/update_user_email.dart +++ b/lib/pages/user/update_user_email.dart @@ -56,14 +56,14 @@ class _UpdateUserEmailPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -193,7 +193,7 @@ class _UpdateUserEmailPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular( AppConstants().normal_container_radius), - color: themeController.currentColor.sc17, + color: themeController.currentColor.sc5, ), child: Column( children: [ diff --git a/lib/pages/user/update_user_page.dart b/lib/pages/user/update_user_page.dart index fb9de21..6495e5b 100644 --- a/lib/pages/user/update_user_page.dart +++ b/lib/pages/user/update_user_page.dart @@ -106,14 +106,14 @@ class _UpdateUserPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -379,7 +379,7 @@ class _UpdateUserPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular( AppConstants().normal_container_radius), - color: themeController.currentColor.sc17, + color: themeController.currentColor.sc5, ), child: Column( children: [ diff --git a/lib/pages/user/update_user_tel.dart b/lib/pages/user/update_user_tel.dart index 2cd5384..dd96470 100644 --- a/lib/pages/user/update_user_tel.dart +++ b/lib/pages/user/update_user_tel.dart @@ -61,14 +61,14 @@ class _UpdateUserTelPageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), + image: AssetImage(getBackgroundImageNoImage()), fit: BoxFit.fill, ), ), child: Scaffold( backgroundColor: Colors.transparent, appBar: AppBar( - backgroundColor: themeController.currentColor.sc17, + backgroundColor: themeController.currentColor.sc5, automaticallyImplyLeading: false, iconTheme: IconThemeData( color: themeController.currentColor.sc3, @@ -198,7 +198,7 @@ class _UpdateUserTelPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular( AppConstants().normal_container_radius), - color: themeController.currentColor.sc17, + color: themeController.currentColor.sc5, ), child: Column( children: [ @@ -268,7 +268,6 @@ class _UpdateUserTelPageState extends State { ); }), ), - SizedBox( height: 30.rpx, child: VerticalDivider( diff --git a/lib/pages/user/user_scheme_page.dart b/lib/pages/user/user_scheme_page.dart index dc31086..802e64c 100644 --- a/lib/pages/user/user_scheme_page.dart +++ b/lib/pages/user/user_scheme_page.dart @@ -45,7 +45,7 @@ class _UserSchemePageState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + image: AssetImage(getBackgroundImageNoImage()), // 本地图片 fit: BoxFit.fill, // 填满整个 Container ), ), @@ -98,12 +98,14 @@ class _UserSchemePageState extends State { Expanded( child: Obx(() { if (pdfController.localPdfPath.value == null) { - return Center(child:CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation( - themeController.currentColor.sc1, - ), - ),); + return Center( + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + themeController.currentColor.sc1, + ), + ), + ); } else { return PDFView( filePath: pdfController.localPdfPath.value!, diff --git a/lib/pages/xiaoe/xiaoe_page.dart b/lib/pages/xiaoe/xiaoe_page.dart index 9275985..56eb702 100644 --- a/lib/pages/xiaoe/xiaoe_page.dart +++ b/lib/pages/xiaoe/xiaoe_page.dart @@ -56,7 +56,7 @@ import 'package:EasyDartModule/EasyDartModule.dart' as edm; // child: Container( // decoration: BoxDecoration( // image: DecorationImage( -// // image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 +// // image: AssetImage(getBackgroundImageNoImage()), // 本地图片 // image: AssetImage('assets/images/new_background.png'), // 本地图片 // fit: BoxFit.fill, // 填满整个 Container // ), @@ -363,8 +363,7 @@ class _XiaoEPageState extends State List rawList = res.data ?? []; List> newList = rawList.map((item) { String mac = item['mac'] ?? ''; - String name = ( - item['name'] != null && + String name = (item['name'] != null && item['name'].toString().trim().isNotEmpty) ? item['name'] + "_$mac" : '未命名'.tr + "_$mac";