更新沃棣背景适配

This commit is contained in:
wyf
2026-02-10 14:30:16 +08:00
parent 6709bcb446
commit d0ae2a9f76
70 changed files with 877 additions and 744 deletions

View File

@@ -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";
}

View File

@@ -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;
}