更新东华信息配置
This commit is contained in:
BIN
assets/img/donghuaF.png
Normal file
BIN
assets/img/donghuaF.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -636,5 +636,7 @@
|
||||
"升级内容": "Update content",
|
||||
"升级": "Upgrade",
|
||||
"前往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"
|
||||
}
|
||||
@@ -636,5 +636,7 @@
|
||||
"升级内容": "升级内容",
|
||||
"升级": "升级",
|
||||
"前往AppStore": "前往AppStore",
|
||||
"下载中...": "下载中..."
|
||||
"下载中...": "下载中...",
|
||||
"欢迎使用东华智能睡眠": "欢迎使用东华智能睡眠",
|
||||
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 东华智能睡眠中心 版权所有"
|
||||
}
|
||||
@@ -634,5 +634,7 @@
|
||||
"升级内容": "升級內容",
|
||||
"升级": "升級",
|
||||
"前往AppStore": "前往AppStore",
|
||||
"下载中...": "下載中..."
|
||||
"下载中...": "下載中...",
|
||||
"欢迎使用东华智能睡眠": "歡迎使用東華智能睡眠",
|
||||
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": " 版權所有©2020-2030 東華智能睡眠中心"
|
||||
}
|
||||
Binary file not shown.
@@ -90,8 +90,9 @@ class AppConstants {
|
||||
//系统参数
|
||||
//运行打包APP模式
|
||||
// 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.DONGHUA.code; //1.默认太和 2.欢睡 3.眠花糖 4.东华
|
||||
int text_length = 8;
|
||||
|
||||
int wifi1 = -45;
|
||||
@@ -132,6 +133,15 @@ String getPrivacy(int type) {
|
||||
return ServiceConstant.policy_url +
|
||||
"/theh" +
|
||||
"/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 {
|
||||
if (type == 1) {
|
||||
return ServiceConstant.policy_url +
|
||||
|
||||
@@ -172,6 +172,9 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) {
|
||||
data['code'] = "hzhskj";
|
||||
}
|
||||
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
|
||||
data['code'] = "dh";
|
||||
}
|
||||
var response =
|
||||
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
|
||||
if (response != null) {
|
||||
@@ -243,6 +246,9 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
if (AppConstants().ent_type == APPPackageType.HUANSHUI.code) {
|
||||
data['code'] = "hzhskj";
|
||||
}
|
||||
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
|
||||
data['code'] = "dh";
|
||||
}
|
||||
var response =
|
||||
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
|
||||
if (response != null) {
|
||||
|
||||
@@ -2,6 +2,7 @@ enum APPPackageType {
|
||||
TH(1, '太和'),
|
||||
HUANSHUI(2, '欢睡'),
|
||||
MHT(3, '眠花糖'),
|
||||
DONGHUA(4, '东华'),
|
||||
;
|
||||
|
||||
final int code;
|
||||
|
||||
@@ -144,6 +144,8 @@ void initServiceAddress() {
|
||||
// 太和
|
||||
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 {
|
||||
//默认
|
||||
ServiceConstant.baseHost = "vsbst-api.he-info.com";
|
||||
|
||||
@@ -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/user_info_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/pages/person/select_time.dart';
|
||||
import 'dart:ui' as ui;
|
||||
@@ -214,9 +215,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
AppConstants().ent_type == 1
|
||||
? '登录页.欢迎使用太和e护'.tr
|
||||
: "欢迎使用欢睡科技",
|
||||
getWelcomeText(AppConstants().ent_type),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 48.rpx,
|
||||
@@ -988,6 +987,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AppConstants().ent_type == APPPackageType.TH.code)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.136,
|
||||
@@ -1019,7 +1019,8 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
var aa =
|
||||
loginController.model.isWeChatNotInstalled;
|
||||
if (isiOS &&
|
||||
(loginController.model.isWeChatNotInstalled !=
|
||||
(loginController
|
||||
.model.isWeChatNotInstalled !=
|
||||
null &&
|
||||
loginController
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ class _FollowPageState extends State<FollowPage> {
|
||||
// child: widget.webView,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(AppConstants().ent_type == 1
|
||||
? 'assets/img/followus.png'
|
||||
: "assets/img/huanshuiF.png"), // 本地图片
|
||||
fit: BoxFit.cover, // 填满整个 Container
|
||||
image: AssetImage(
|
||||
getFollowUsImage(AppConstants().ent_type),
|
||||
),
|
||||
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';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (AppConstants().ent_type == APPPackageType.TH.code) {
|
||||
if (AppConstants().ent_type != APPPackageType.MHT.code) {
|
||||
Future.delayed(const Duration(milliseconds: 0), () {
|
||||
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
||||
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
||||
|
||||
@@ -457,6 +457,8 @@ class _MinePageState extends State<MinePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AppConstants().ent_type ==
|
||||
APPPackageType.TH.code)
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
@@ -553,8 +555,8 @@ class _MinePageState extends State<MinePage> {
|
||||
width: 8.rpx,
|
||||
height:
|
||||
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color:
|
||||
themeController.currentColor.sc3,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -493,9 +493,12 @@ class VitalWidget extends StatelessWidget {
|
||||
MHTBlueToothController mhtBlueToothController = Get.find();
|
||||
final String id = data['mac'.tr] ?? '--';
|
||||
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)
|
||||
? DateFormat('yyyy-MM-dd HH:mm')
|
||||
.format(DateTime.fromMillisecondsSinceEpoch(timestamp))
|
||||
? DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now())
|
||||
: '--';
|
||||
return ClickableContainer(
|
||||
backgroundColor: Color(0xFF003058),
|
||||
@@ -883,7 +886,6 @@ class VitalWidget extends StatelessWidget {
|
||||
mac: data['mac'],
|
||||
firmwareUrl: firmwareUrl,
|
||||
);
|
||||
|
||||
} catch (e) {
|
||||
print("升级失败: $e");
|
||||
TopSlideNotification.show(context,
|
||||
|
||||
@@ -383,9 +383,10 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
|
||||
],
|
||||
),
|
||||
Text(
|
||||
AppConstants().ent_type == 1
|
||||
? "通用APP消息介绍".tr
|
||||
: "打开“欢睡科技”APP,可以查看消息内容",
|
||||
// AppConstants().ent_type == 1
|
||||
// ? "通用APP消息介绍".tr
|
||||
// : "打开“欢睡科技”APP,可以查看消息内容",
|
||||
"通用APP消息介绍".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
themeController.currentColor.sc4,
|
||||
@@ -492,9 +493,10 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
|
||||
],
|
||||
),
|
||||
Text(
|
||||
AppConstants().ent_type == 1
|
||||
? "通用服务号消息介绍".tr
|
||||
: "无需打开“欢睡科技”APP,关注欢睡智能睡眠研究所服务号后,微信内即可接收消息推送",
|
||||
// AppConstants().ent_type == 1
|
||||
// ? "通用服务号消息介绍".tr
|
||||
// : "无需打开“欢睡科技”APP,关注欢睡智能睡眠研究所服务号后,微信内即可接收消息推送",
|
||||
"通用服务号消息介绍".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
themeController.currentColor.sc4,
|
||||
|
||||
@@ -295,8 +295,11 @@ class _SettingPageState extends State<SettingPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AppConstants().ent_type ==
|
||||
APPPackageType.TH.code)
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
@@ -359,7 +362,8 @@ class _SettingPageState extends State<SettingPage> {
|
||||
},
|
||||
);
|
||||
print('点击了容器');
|
||||
Get.toNamed("/aboutUsPage", arguments: url);
|
||||
Get.toNamed("/aboutUsPage",
|
||||
arguments: url);
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
@@ -389,8 +393,8 @@ class _SettingPageState extends State<SettingPage> {
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height:
|
||||
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
height: 14
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
@@ -399,6 +403,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
@@ -509,6 +514,11 @@ class _SettingPageState extends State<SettingPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AppConstants().ent_type ==
|
||||
APPPackageType.TH.code)
|
||||
SizedBox(
|
||||
height: 100.rpx,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
100.rpx, 360.rpx, 100.rpx, 0),
|
||||
@@ -644,10 +654,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
AppConstants().ent_type == 1
|
||||
? '公司信息'.tr.tr
|
||||
: "Copyright © 2019-2029 合肥眠花糖家具有限责任公司 版权所有"
|
||||
.tr,
|
||||
getCopyrightText(AppConstants().ent_type),
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc4,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,19 +520,23 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (AppConstants().ent_type == 1)
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 20.rpx, 40.rpx, 20.rpx),
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () async {
|
||||
if (userInfoController.model.user!.bindWx ==
|
||||
if (userInfoController
|
||||
.model.user!.bindWx ==
|
||||
null ||
|
||||
userInfoController.model.user!.bindWx ==
|
||||
userInfoController
|
||||
.model.user!.bindWx ==
|
||||
false) {
|
||||
//微信绑定
|
||||
LoginController loginController =
|
||||
|
||||
Reference in New Issue
Block a user