更新东华信息配置
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.
@@ -8,8 +8,8 @@ import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
class AppConstants {
|
||||
// App-related constants
|
||||
|
||||
static const String zhmht_app_version = "SWES_1.2026.1.8";//眠花糖
|
||||
static const String theh_app_version = "1.2601.12";//太和
|
||||
static const String zhmht_app_version = "SWES_1.2026.1.8"; //眠花糖
|
||||
static const String theh_app_version = "1.2601.12"; //太和
|
||||
|
||||
// 1. 纯字符串列表格式
|
||||
static const List<String> integerTimeZones = [
|
||||
@@ -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 +
|
||||
|
||||
@@ -167,11 +167,14 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
UserInfoController userInfoController = Get.find();
|
||||
var data = {
|
||||
"userName": model.phone,
|
||||
"ccode":userInfoController.select_country_code.value,
|
||||
"ccode": userInfoController.select_country_code.value,
|
||||
};
|
||||
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) {
|
||||
@@ -238,11 +241,14 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
var data = {
|
||||
"userName": model.updatePhone,
|
||||
"type": 5,
|
||||
"ccode":userInfoController.select_country_code.value,
|
||||
"ccode": userInfoController.select_country_code.value,
|
||||
};
|
||||
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,130 +987,132 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.136,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 220.rpx,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0, 0, 0, 36.rpx),
|
||||
child: Text(
|
||||
"登录页.其他登录方式".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
if (AppConstants().ent_type == APPPackageType.TH.code)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.136,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 220.rpx,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0, 0, 0, 36.rpx),
|
||||
child: Text(
|
||||
"登录页.其他登录方式".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
var aa =
|
||||
loginController.model.isWeChatNotInstalled;
|
||||
if (isiOS &&
|
||||
(loginController.model.isWeChatNotInstalled !=
|
||||
null &&
|
||||
loginController
|
||||
.model.isWeChatNotInstalled ==
|
||||
true)) return Container();
|
||||
return ClickableContainer(
|
||||
backgroundColor: Colors.white, // 背景色
|
||||
highlightColor: Colors.grey, // 点击水波纹颜色
|
||||
borderRadius: 999.rpx,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () async {
|
||||
if (loginController.model.register_agree ==
|
||||
null ||
|
||||
loginController.model.register_agree !=
|
||||
true) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "登录页.未同意协议".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
return;
|
||||
}
|
||||
await loginController
|
||||
.wxLoginSendAuth(context);
|
||||
},
|
||||
child: Container(
|
||||
width: 91.rpx,
|
||||
height: 91.rpx,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
var aa =
|
||||
loginController.model.isWeChatNotInstalled;
|
||||
if (isiOS &&
|
||||
(loginController
|
||||
.model.isWeChatNotInstalled !=
|
||||
null &&
|
||||
loginController
|
||||
.model.isWeChatNotInstalled ==
|
||||
true)) return Container();
|
||||
return ClickableContainer(
|
||||
backgroundColor: Colors.white, // 背景色
|
||||
highlightColor: Colors.grey, // 点击水波纹颜色
|
||||
borderRadius: 999.rpx,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () async {
|
||||
if (loginController.model.register_agree ==
|
||||
null ||
|
||||
loginController.model.register_agree !=
|
||||
true) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "登录页.未同意协议".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
return;
|
||||
}
|
||||
await loginController
|
||||
.wxLoginSendAuth(context);
|
||||
},
|
||||
child: Container(
|
||||
width: 91.rpx,
|
||||
height: 91.rpx,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.asset(
|
||||
"assets/img/wechat.png",
|
||||
width: 30.rpx,
|
||||
height: 30.rpx,
|
||||
),
|
||||
),
|
||||
child: Image.asset(
|
||||
"assets/img/wechat.png",
|
||||
width: 30.rpx,
|
||||
height: 30.rpx,
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.white,
|
||||
// highlightColor: Colors.grey,
|
||||
// borderRadius: 999.rpx,
|
||||
// padding: EdgeInsets.zero,
|
||||
// onTap: () {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 91.rpx,
|
||||
// height: 91.rpx,
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/tel.png",
|
||||
// width: 30.rpx,
|
||||
// height: 30.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.white,
|
||||
// highlightColor: Colors.grey,
|
||||
// borderRadius: 999.rpx,
|
||||
// padding: EdgeInsets.zero,
|
||||
// onTap: () {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 91.rpx,
|
||||
// height: 91.rpx,
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/google.png",
|
||||
// width: 30.rpx,
|
||||
// height: 30.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
].divide(SizedBox(width: 35.rpx)),
|
||||
),
|
||||
],
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.white,
|
||||
// highlightColor: Colors.grey,
|
||||
// borderRadius: 999.rpx,
|
||||
// padding: EdgeInsets.zero,
|
||||
// onTap: () {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 91.rpx,
|
||||
// height: 91.rpx,
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/tel.png",
|
||||
// width: 30.rpx,
|
||||
// height: 30.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.white,
|
||||
// highlightColor: Colors.grey,
|
||||
// borderRadius: 999.rpx,
|
||||
// padding: EdgeInsets.zero,
|
||||
// onTap: () {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 91.rpx,
|
||||
// height: 91.rpx,
|
||||
// clipBehavior: Clip.antiAlias,
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// child: Image.asset(
|
||||
// "assets/img/google.png",
|
||||
// width: 30.rpx,
|
||||
// height: 30.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
].divide(SizedBox(width: 35.rpx)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -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,110 +457,112 @@ class _MinePageState extends State<MinePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () async {
|
||||
UserInfoController userInfoController =
|
||||
Get.find();
|
||||
if (userInfoController.model.login !=
|
||||
LoginStatus.LOGIN.code) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "必须登录提示".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
Get.toNamed("/loginPage");
|
||||
} else {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: "待开发.提示".tr,
|
||||
// textColor:
|
||||
// themeController.currentColor.sc2,
|
||||
// );
|
||||
String url =
|
||||
"https://mp.weixin.qq.com/s/kwfTxy8d_cDU0j10mZWMgA";
|
||||
String serviceAddress =
|
||||
ServiceConstant.service_address;
|
||||
String serviceName =
|
||||
ServiceConstant.server_service;
|
||||
String serviceApi =
|
||||
ServiceConstant.user_setting;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi";
|
||||
String type = "app_op_desc";
|
||||
String code = "th";
|
||||
if (AppConstants().ent_type ==
|
||||
APPPackageType.TH.code) {
|
||||
code = "th";
|
||||
} else if (AppConstants().ent_type ==
|
||||
APPPackageType.HUANSHUI.code) {
|
||||
code = "hs";
|
||||
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 {
|
||||
UserInfoController userInfoController =
|
||||
Get.find();
|
||||
if (userInfoController.model.login !=
|
||||
LoginStatus.LOGIN.code) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "必须登录提示".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9,
|
||||
);
|
||||
Get.toNamed("/loginPage");
|
||||
} else {
|
||||
code = 'th';
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: "待开发.提示".tr,
|
||||
// textColor:
|
||||
// themeController.currentColor.sc2,
|
||||
// );
|
||||
String url =
|
||||
"https://mp.weixin.qq.com/s/kwfTxy8d_cDU0j10mZWMgA";
|
||||
String serviceAddress =
|
||||
ServiceConstant.service_address;
|
||||
String serviceName =
|
||||
ServiceConstant.server_service;
|
||||
String serviceApi =
|
||||
ServiceConstant.user_setting;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi";
|
||||
String type = "app_op_desc";
|
||||
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) {
|
||||
url = res.data['url'];
|
||||
},
|
||||
);
|
||||
Get.toNamed("/helpPage", arguments: url);
|
||||
}
|
||||
queryUrl =
|
||||
"$queryUrl?type=$type&code=$code";
|
||||
await requestWithLog(
|
||||
logTitle: "查询操作说明",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
url = res.data['url'];
|
||||
},
|
||||
);
|
||||
Get.toNamed("/helpPage", 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: [
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/op_ex.svg',
|
||||
width: 25.rpx,
|
||||
height: 25
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: stringToColor("#00C1AA"),
|
||||
),
|
||||
Text(
|
||||
'我的.操作说明'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
},
|
||||
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: [
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/op_ex.svg',
|
||||
width: 25.rpx,
|
||||
height: 25
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: stringToColor("#00C1AA"),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height:
|
||||
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color:
|
||||
themeController.currentColor.sc3,
|
||||
),
|
||||
],
|
||||
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
|
||||
|
||||
@@ -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,110 +295,115 @@ class _SettingPageState extends State<SettingPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
} 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'];
|
||||
}
|
||||
}
|
||||
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,
|
||||
},
|
||||
);
|
||||
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,
|
||||
),
|
||||
],
|
||||
].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
|
||||
@@ -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,101 +520,105 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 20.rpx, 40.rpx, 20.rpx),
|
||||
child: ClickableContainer(
|
||||
backgroundColor: Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
if (AppConstants().ent_type == 1)
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () async {
|
||||
if (userInfoController.model.user!.bindWx ==
|
||||
null ||
|
||||
userInfoController.model.user!.bindWx ==
|
||||
false) {
|
||||
//微信绑定
|
||||
LoginController loginController =
|
||||
Get.find();
|
||||
await loginController.wxLoginSendAuth(
|
||||
context,
|
||||
login: false);
|
||||
} else {
|
||||
//取消微信绑定
|
||||
// LoginController loginController =
|
||||
// Get.find();
|
||||
// await loginController.wxLoginSendAuth(
|
||||
// context,
|
||||
// login: false);
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "暂不支持微信解绑授权".tr,
|
||||
// textColor:
|
||||
// themeController.currentColor.sc9);
|
||||
// return;
|
||||
showUnbindWxConfirmDialog(context);
|
||||
}
|
||||
},
|
||||
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: [
|
||||
Obx(() {
|
||||
var aa = userInfoController
|
||||
.model.user!.tmpNickName;
|
||||
print(aa);
|
||||
return Text(
|
||||
getTextByUserInfo('wechat'),
|
||||
40.rpx, 20.rpx, 40.rpx, 20.rpx),
|
||||
child: ClickableContainer(
|
||||
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 ==
|
||||
null ||
|
||||
userInfoController
|
||||
.model.user!.bindWx ==
|
||||
false) {
|
||||
//微信绑定
|
||||
LoginController loginController =
|
||||
Get.find();
|
||||
await loginController.wxLoginSendAuth(
|
||||
context,
|
||||
login: false);
|
||||
} else {
|
||||
//取消微信绑定
|
||||
// LoginController loginController =
|
||||
// Get.find();
|
||||
// await loginController.wxLoginSendAuth(
|
||||
// context,
|
||||
// login: false);
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "暂不支持微信解绑授权".tr,
|
||||
// textColor:
|
||||
// themeController.currentColor.sc9);
|
||||
// return;
|
||||
showUnbindWxConfirmDialog(context);
|
||||
}
|
||||
},
|
||||
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: Color(0xFFD9E3EB),
|
||||
color: getColorByUserInfo(
|
||||
'wechat'),
|
||||
fontSize: 26.rpx,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
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)),
|
||||
),
|
||||
],
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Obx(() {
|
||||
var aa = userInfoController
|
||||
.model.user!.tmpNickName;
|
||||
print(aa);
|
||||
return Text(
|
||||
getTextByUserInfo('wechat'),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
// color: Color(0xFFD9E3EB),
|
||||
color: getColorByUserInfo(
|
||||
'wechat'),
|
||||
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)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user