更新东华信息配置

This commit is contained in:
wyf
2026-01-14 15:09:52 +08:00
parent f929e8c0ff
commit dfd9523433
17 changed files with 507 additions and 430 deletions

BIN
assets/img/donghuaF.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -636,5 +636,7 @@
"升级内容": "Update content", "升级内容": "Update content",
"升级": "Upgrade", "升级": "Upgrade",
"前往AppStore": "Go to AppStore", "前往AppStore": "Go to AppStore",
"下载中...": "Downloading..." "下载中...": "Downloading...",
"欢迎使用东华智能睡眠": "Welcome to use Donghua Smart Sleep",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 Donghua Smart Sleep Center All Rights Reserved"
} }

View File

@@ -636,5 +636,7 @@
"升级内容": "升级内容", "升级内容": "升级内容",
"升级": "升级", "升级": "升级",
"前往AppStore": "前往AppStore", "前往AppStore": "前往AppStore",
"下载中...": "下载中..." "下载中...": "下载中...",
"欢迎使用东华智能睡眠": "欢迎使用东华智能睡眠",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 东华智能睡眠中心 版权所有"
} }

View File

@@ -634,5 +634,7 @@
"升级内容": "升級內容", "升级内容": "升級內容",
"升级": "升級", "升级": "升級",
"前往AppStore": "前往AppStore", "前往AppStore": "前往AppStore",
"下载中...": "下載中..." "下载中...": "下載中...",
"欢迎使用东华智能睡眠": "歡迎使用東華智能睡眠",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": " 版權所有©2020-2030 東華智能睡眠中心"
} }

Binary file not shown.

View File

@@ -90,8 +90,9 @@ class AppConstants {
//系统参数 //系统参数
//运行打包APP模式 //运行打包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.TH.code; //1.默认太和 2.欢睡 3.眠花糖
// int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖 // int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖
int ent_type = APPPackageType.DONGHUA.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华
int text_length = 8; int text_length = 8;
int wifi1 = -45; int wifi1 = -45;
@@ -132,6 +133,15 @@ String getPrivacy(int type) {
return ServiceConstant.policy_url + return ServiceConstant.policy_url +
"/theh" + "/theh" +
"/th_user_policy_$language.html"; "/th_user_policy_$language.html";
} else if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
if (type == 1) {
return ServiceConstant.policy_url +
"/donghua" +
"/th_privacy_policy_$language.html";
}
return ServiceConstant.policy_url +
"/donghua" +
"/th_user_policy_$language.html";
} else { } else {
if (type == 1) { if (type == 1) {
return ServiceConstant.policy_url + return ServiceConstant.policy_url +

View File

@@ -172,6 +172,9 @@ class LoginController extends GetControllerEx<LoginModel> {
if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) { if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) {
data['code'] = "hzhskj"; data['code'] = "hzhskj";
} }
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
data['code'] = "dh";
}
var response = var response =
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data)); await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
if (response != null) { if (response != null) {
@@ -243,6 +246,9 @@ class LoginController extends GetControllerEx<LoginModel> {
if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) { if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) {
data['code'] = "hzhskj"; data['code'] = "hzhskj";
} }
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
data['code'] = "dh";
}
var response = var response =
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data)); await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
if (response != null) { if (response != null) {

View File

@@ -2,6 +2,7 @@ enum APPPackageType {
TH(1, '太和'), TH(1, '太和'),
HUANSHUI(2, '欢睡'), HUANSHUI(2, '欢睡'),
MHT(3, '眠花糖'), MHT(3, '眠花糖'),
DONGHUA(4, '东华'),
; ;
final int code; final int code;

View File

@@ -144,6 +144,8 @@ void initServiceAddress() {
// 太和 // 太和
ServiceConstant.baseHost = "vsbst-api.he-info.com"; ServiceConstant.baseHost = "vsbst-api.he-info.com";
// ServiceConstant.baseHost = "vsbs-test.he-info.cn"; // ServiceConstant.baseHost = "vsbs-test.he-info.cn";
} else if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
ServiceConstant.baseHost = "vsbst-api.he-info.com";
} else { } else {
//默认 //默认
ServiceConstant.baseHost = "vsbst-api.he-info.com"; ServiceConstant.baseHost = "vsbst-api.he-info.com";

View File

@@ -20,6 +20,7 @@ import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/time/countdown_controller.dart'; import 'package:vbvs_app/controller/time/countdown_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/controller/weather/weather_controller.dart'; import 'package:vbvs_app/controller/weather/weather_controller.dart';
import 'package:vbvs_app/enum/APPPackageType.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/person/select_time.dart'; import 'package:vbvs_app/pages/person/select_time.dart';
import 'dart:ui' as ui; import 'dart:ui' as ui;
@@ -214,9 +215,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
child: Align( child: Align(
alignment: AlignmentDirectional(0, 0), alignment: AlignmentDirectional(0, 0),
child: Text( child: Text(
AppConstants().ent_type == 1 getWelcomeText(AppConstants().ent_type),
? '登录页.欢迎使用太和e护'.tr
: "欢迎使用欢睡科技",
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
fontSize: 48.rpx, fontSize: 48.rpx,
@@ -988,6 +987,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
), ),
), ),
), ),
if (AppConstants().ent_type == APPPackageType.TH.code)
Container( Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.sizeOf(context).height * 0.136, height: MediaQuery.sizeOf(context).height * 0.136,
@@ -1019,7 +1019,8 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
var aa = var aa =
loginController.model.isWeChatNotInstalled; loginController.model.isWeChatNotInstalled;
if (isiOS && if (isiOS &&
(loginController.model.isWeChatNotInstalled != (loginController
.model.isWeChatNotInstalled !=
null && null &&
loginController loginController
.model.isWeChatNotInstalled == .model.isWeChatNotInstalled ==
@@ -1295,4 +1296,17 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
}), }),
); );
} }
String getWelcomeText(int entType) {
switch (entType) {
case 1:
return '登录页.欢迎使用太和e护'.tr;
case 2:
return '欢迎使用欢睡科技'.tr;
case 4:
return '欢迎使用东华智能睡眠'.tr;
default:
return '欢迎使用'.tr;
}
}
} }

View File

@@ -86,10 +86,10 @@ class _FollowPageState extends State<FollowPage> {
// child: widget.webView, // child: widget.webView,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage(AppConstants().ent_type == 1 image: AssetImage(
? 'assets/img/followus.png' getFollowUsImage(AppConstants().ent_type),
: "assets/img/huanshuiF.png"), // 本地图片 ),
fit: BoxFit.cover, // 填满整个 Container fit: BoxFit.cover,
), ),
), ),
), ),
@@ -102,4 +102,15 @@ class _FollowPageState extends State<FollowPage> {
), ),
); );
} }
String getFollowUsImage(int entType) {
final Map<int, String> imageMap = {
1: 'assets/img/followus.png',
2: 'assets/img/huanshuiF.png',
4: 'assets/img/donghuaF.png',
// 后面继续加
};
return imageMap[entType] ?? 'assets/img/followus.png';
}
} }

View File

@@ -565,7 +565,7 @@ class MainPageBottomChange extends GetView<MainPageController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (AppConstants().ent_type == APPPackageType.TH.code) { if (AppConstants().ent_type != APPPackageType.MHT.code) {
Future.delayed(const Duration(milliseconds: 0), () { Future.delayed(const Duration(milliseconds: 0), () {
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog"); String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") { if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {

View File

@@ -457,6 +457,8 @@ class _MinePageState extends State<MinePage> {
), ),
), ),
), ),
if (AppConstants().ent_type ==
APPPackageType.TH.code)
ClickableContainer( ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色 backgroundColor: Colors.transparent, // 容器背景色
highlightColor: themeController highlightColor: themeController
@@ -553,8 +555,8 @@ class _MinePageState extends State<MinePage> {
width: 8.rpx, width: 8.rpx,
height: height:
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
color: color: themeController
themeController.currentColor.sc3, .currentColor.sc3,
), ),
], ],
), ),

View File

@@ -493,9 +493,12 @@ class VitalWidget extends StatelessWidget {
MHTBlueToothController mhtBlueToothController = Get.find(); MHTBlueToothController mhtBlueToothController = Get.find();
final String id = data['mac'.tr] ?? '--'; final String id = data['mac'.tr] ?? '--';
final int? timestamp = data['status']['updateTime']; final int? timestamp = data['status']['updateTime'];
// final String time = (timestamp != null)
// ? DateFormat('yyyy-MM-dd HH:mm')
// .format(DateTime.fromMillisecondsSinceEpoch(timestamp))
// : '--';
final String time = (timestamp != null) final String time = (timestamp != null)
? DateFormat('yyyy-MM-dd HH:mm') ? DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now())
.format(DateTime.fromMillisecondsSinceEpoch(timestamp))
: '--'; : '--';
return ClickableContainer( return ClickableContainer(
backgroundColor: Color(0xFF003058), backgroundColor: Color(0xFF003058),
@@ -883,7 +886,6 @@ class VitalWidget extends StatelessWidget {
mac: data['mac'], mac: data['mac'],
firmwareUrl: firmwareUrl, firmwareUrl: firmwareUrl,
); );
} catch (e) { } catch (e) {
print("升级失败: $e"); print("升级失败: $e");
TopSlideNotification.show(context, TopSlideNotification.show(context,

View File

@@ -383,9 +383,10 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
], ],
), ),
Text( Text(
AppConstants().ent_type == 1 // AppConstants().ent_type == 1
? "通用APP消息介绍".tr // ? "通用APP消息介绍".tr
: "打开“欢睡科技”APP可以查看消息内容", // : "打开“欢睡科技”APP可以查看消息内容",
"通用APP消息介绍".tr,
style: TextStyle( style: TextStyle(
color: color:
themeController.currentColor.sc4, themeController.currentColor.sc4,
@@ -492,9 +493,10 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
], ],
), ),
Text( Text(
AppConstants().ent_type == 1 // AppConstants().ent_type == 1
? "通用服务号消息介绍".tr // ? "通用服务号消息介绍".tr
: "无需打开“欢睡科技”APP关注欢睡智能睡眠研究所服务号后微信内即可接收消息推送", // : "无需打开“欢睡科技”APP关注欢睡智能睡眠研究所服务号后微信内即可接收消息推送",
"通用服务号消息介绍".tr,
style: TextStyle( style: TextStyle(
color: color:
themeController.currentColor.sc4, themeController.currentColor.sc4,

View File

@@ -295,8 +295,11 @@ class _SettingPageState extends State<SettingPage> {
), ),
), ),
), ),
if (AppConstants().ent_type ==
APPPackageType.TH.code)
ClickableContainer( ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色 backgroundColor:
Colors.transparent, // 容器背景色
highlightColor: themeController highlightColor: themeController
.currentColor.sc21, // 点击时的背景色 .currentColor.sc21, // 点击时的背景色
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
@@ -359,7 +362,8 @@ class _SettingPageState extends State<SettingPage> {
}, },
); );
print('点击了容器'); print('点击了容器');
Get.toNamed("/aboutUsPage", arguments: url); Get.toNamed("/aboutUsPage",
arguments: url);
}, },
child: Container( child: Container(
child: Padding( child: Padding(
@@ -389,8 +393,8 @@ class _SettingPageState extends State<SettingPage> {
SvgPicture.asset( SvgPicture.asset(
'assets/img/icon/arrow_right.svg', 'assets/img/icon/arrow_right.svg',
width: 8.rpx, width: 8.rpx,
height: height: 14
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 .rpx, // 如果 SVG 中没有固定颜色,可以这样设置
color: themeController color: themeController
.currentColor.sc3, .currentColor.sc3,
), ),
@@ -399,6 +403,7 @@ class _SettingPageState extends State<SettingPage> {
), ),
), ),
), ),
ClickableContainer( ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色 backgroundColor: Colors.transparent, // 容器背景色
highlightColor: themeController highlightColor: themeController
@@ -509,6 +514,11 @@ class _SettingPageState extends State<SettingPage> {
), ),
), ),
), ),
if (AppConstants().ent_type ==
APPPackageType.TH.code)
SizedBox(
height: 100.rpx,
),
Padding( Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
100.rpx, 360.rpx, 100.rpx, 0), 100.rpx, 360.rpx, 100.rpx, 0),
@@ -644,10 +654,7 @@ class _SettingPageState extends State<SettingPage> {
), ),
), ),
Text( Text(
AppConstants().ent_type == 1 getCopyrightText(AppConstants().ent_type),
? '公司信息'.tr.tr
: "Copyright © 2019-2029 合肥眠花糖家具有限责任公司 版权所有"
.tr,
style: TextStyle( style: TextStyle(
color: themeController.currentColor.sc4, color: themeController.currentColor.sc4,
fontFamily: 'Inter', fontFamily: 'Inter',
@@ -719,4 +726,14 @@ class _SettingPageState extends State<SettingPage> {
), ),
); );
} }
String getCopyrightText(int entType) {
final Map<int, String> copyrightMap = {
1: '公司信息'.tr,
2: 'Copyright © 2019-2029 合肥眠花糖家具有限责任公司 版权所有'.tr,
4: 'Copyright © 2020-2030 东华智能睡眠中心 版权所有'.tr,
};
return copyrightMap[entType] ?? '公司信息'.tr;
}
} }

View File

@@ -520,19 +520,23 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
), ),
), ),
), ),
if (AppConstants().ent_type == 1)
Padding( Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
40.rpx, 20.rpx, 40.rpx, 20.rpx), 40.rpx, 20.rpx, 40.rpx, 20.rpx),
child: ClickableContainer( child: ClickableContainer(
backgroundColor: Colors.transparent, // 容器背景色 backgroundColor:
Colors.transparent, // 容器背景色
highlightColor: themeController highlightColor: themeController
.currentColor.sc21, // 点击时的背景色 .currentColor.sc21, // 点击时的背景色
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
0.rpx, 0.rpx, 0.rpx, 0.rpx), 0.rpx, 0.rpx, 0.rpx, 0.rpx),
onTap: () async { onTap: () async {
if (userInfoController.model.user!.bindWx == if (userInfoController
.model.user!.bindWx ==
null || null ||
userInfoController.model.user!.bindWx == userInfoController
.model.user!.bindWx ==
false) { false) {
//微信绑定 //微信绑定
LoginController loginController = LoginController loginController =