Compare commits

...

10 Commits

Author SHA1 Message Date
wyf
5e6406f7f2 修复眠花糖发送短信验证码失败。(未传客户端代码) 2026-04-08 14:35:42 +08:00
wyf
c392cd8c90 更新扫一扫 2026-04-07 16:29:34 +08:00
wyf
30d7764a10 更新顶部系统状态栏颜色 2026-04-07 14:49:31 +08:00
wyf
0ead6eb952 更新控制页面图标 2026-04-07 09:33:43 +08:00
ca00faad0b 1.更新眠花糖ios控制页空白 2.修复ios首页第一次点击控制无效果 3.修复ios扫描蓝牙的错误提示 2026-04-03 15:07:25 +08:00
wyf
bdeef22130 更新快检报告 2026-04-02 16:02:25 +08:00
wyf
9a431e907e 3.修改睡眠报告文字 正常窦性心律 2026-03-30 14:18:55 +08:00
wyf
3a2956658d 更新眠花糖web升级提示 2026-03-28 16:29:52 +08:00
wyf
446d884ac2 修复部分语言中文 2026-03-27 15:42:52 +08:00
wyf
a1e835ecbc 更新英文语言相关问题。 2026-03-23 15:19:09 +08:00
158 changed files with 4209 additions and 3052 deletions

View File

@@ -9,8 +9,9 @@ allprojects {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
maven { url 'https://developer.huawei.com/repo/'} maven { url 'https://developer.huawei.com/repo/'}
// maven { url "https://repo.jiguang.cn/repository/maven2/" }
google() google()
mavenCentral() // mavenCentral()
flatDir { flatDir {
dirs 'libs' dirs 'libs'
} }

View File

@@ -2,7 +2,9 @@ org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
systemProp.http.proxyHost=pp.it.real.he-info.cn # systemProp.http.proxyHost=pp.it.real.he-info.cn
systemProp.http.proxyPort=7897 # systemProp.http.proxyPort=7897
systemProp.https.proxyHost=pp.it.real.he-info.cn # systemProp.https.proxyHost=pp.it.real.he-info.cn
systemProp.https.proxyPort=7897 # systemProp.https.proxyPort=7897

Binary file not shown.

View File

@@ -1,11 +1,23 @@
# 太和e护 # 太和e护
# storePassword=taihe601 storePassword=taihe601
# keyPassword=taihe601 keyPassword=taihe601
# keyAlias=testalias keyAlias=testalias
# storeFile=test.keystore storeFile=test.keystore
# 眠花糖 # 眠花糖
storePassword=mht@123456 # storePassword=mht@123456
keyPassword=mht@123456 # keyPassword=mht@123456
keyAlias=mianhuatang # keyAlias=mianhuatang
storeFile=AppKeys.jks # storeFile=AppKeys.jks
# 东华
# storePassword=taihe601
# keyPassword=taihe601
# keyAlias=donghua
# storeFile=donghua.jks
# 沃棣
# storePassword=taihe601
# keyPassword=taihe601
# keyAlias=wodi
# storeFile=wodi.jks

View File

@@ -1,9 +1,10 @@
sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\flutter_res\\flutter flutter.sdk=D:\\flutter_res\\flutter
flutter.buildMode=debug flutter.buildMode=release
flutter.versionName=1.0.0 flutter.versionName=1.0.0
flutter.versionCode=1 flutter.versionCode=1
flutter.minSdkVersion=22 flutter.minSdkVersion=22
flutter.targetSdkVersion=35 flutter.targetSdkVersion=35
flutter.compileSdkVersion=35 flutter.compileSdkVersion=35
flutter.ndkVersion=28.0.12433566 flutter.ndkVersion=28.0.12433566
app.type=3

View File

@@ -1,7 +1,7 @@
# 太和版本信息 # 太和版本信息(未提交)
# flutter.android.versionName=2.0.5 flutter.android.versionName=2.0.8
# flutter.android.versionCode=11 flutter.android.versionCode=14
# 智慧眠花糖版本信息【最新,提交商店】 # 智慧眠花糖版本信息【最新,提交商店】
flutter.android.versionName=2.0.9 # flutter.android.versionName=2.0.11
flutter.android.versionCode=13 # flutter.android.versionCode=17

View File

@@ -1,4 +1,4 @@
[ [
"assets/miniapp/mhtControl_1.0.90.zip", "assets/miniapp/mhtControl_1.0.94.zip",
"assets/xiaoe/xiaoe_1.0.0.zip" "assets/xiaoe/xiaoe_1.0.0.zip"
] ]

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.98 25.68"><defs><style>.cls-1{fill:#161b28;}</style></defs><title>资源 407 </title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M30.16,0H2.68C1.19,0,0,.92,0,2.05V23.53a2.49,2.49,0,0,0,2.72,2.13H30.37A2.39,2.39,0,0,0,33,23.53V2.05c0-1.13-1.27-2-2.84-2ZM10.86,4.79A2.72,2.72,0,1,1,8.15,7.51h0A2.72,2.72,0,0,1,10.86,4.79Zm16.81,17.8H5.36c-.87,0-1-.5-.46-1.09l4.79-5A1.82,1.82,0,0,1,12,16.24l3.52,2.49a1.68,1.68,0,0,0,2.23-.29l8.16-9.9c.54-.65,1.07-.5,1.19.31L29,21.14a1.26,1.26,0,0,1-1.06,1.44.79.79,0,0,1-.22,0Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.29 34.59"><defs><style>.cls-1{fill:#161b28;}</style></defs><title>资源 406 </title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M18.81,13.19H6.49L.26,4.78A1.26,1.26,0,0,1,0,4V1.29A1.29,1.29,0,0,1,1.29,0H24a1.29,1.29,0,0,1,1.29,1.29V4a1.25,1.25,0,0,1-.25.77l-6.23,8.42ZM6.49,15.35v18a1.25,1.25,0,0,0,1.25,1.25h9.82a1.25,1.25,0,0,0,1.25-1.25v-18Zm6.16,8a1.19,1.19,0,0,1-1.19-1.19V18.49a1.19,1.19,0,0,1,2.38,0v3.67A1.19,1.19,0,0,1,12.65,23.35Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 571 B

View File

@@ -185,10 +185,10 @@
"搜索": "Search", "搜索": "Search",
"我的e护": "Mine", "我的e护": "Mine",
"云关爱": "Cloud", "云关爱": "Cloud",
"设备ID": "Device ID", "设备ID": "ID",
"更新时间": "Update time", "更新时间": "Update time",
"设备来源": "Device source", "设备来源": "Device source",
"设备状态": "Device status", "设备状态": "Status",
"人员资料": "User information", "人员资料": "User information",
"实时体征": "Real-time vitals", "实时体征": "Real-time vitals",
"消息回看": "Message review", "消息回看": "Message review",
@@ -214,7 +214,7 @@
"标题": "Real-time Vitals", "标题": "Real-time Vitals",
"姓名": "Name", "姓名": "Name",
"年龄": "Age", "年龄": "Age",
"设备ID": "Device ID", "设备ID": "ID",
"体重": "Weight", "体重": "Weight",
"提示": "Tip: For real-time vital analysis, the user should lie on the designated bed with the device functioning normally. Keep still for 10-30 seconds to display real-time vital data." "提示": "Tip: For real-time vital analysis, the user should lie on the designated bed with the device functioning normally. Keep still for 10-30 seconds to display real-time vital data."
}, },
@@ -642,7 +642,7 @@
"开始快检": "Start Quick Check", "开始快检": "Start Quick Check",
"健康等级:": "Health Level", "健康等级:": "Health Level",
"快检得分:": "Quick Check Score ", "快检得分:": "Quick Check Score ",
"设备ID": "Device ID", "设备ID": "ID",
"快检时间:": "Quick Check Time", "快检时间:": "Quick Check Time",
"终止": "Stop", "终止": "Stop",
"性别": "Gender", "性别": "Gender",
@@ -653,8 +653,21 @@
"快检中...": "Quick Checking...", "快检中...": "Quick Checking...",
"体验异常结束": "Abnormal experience ended", "体验异常结束": "Abnormal experience ended",
"是否确认结束?": "Are you sure to end?", "是否确认结束?": "Are you sure to end?",
"蓝牙未开启": "Bluetooth Off",
"请保持身体静止": "Please stay still",
"请先打开蓝牙在进行设备扫描": "Enable Bluetooth first",
"重新校准": "Recalibrate",
"选择时区": "Select Time Zone",
"请求成功": "Request Successful",
"设备校准完成": "Calibration Complete",
"请校准人员保持在床状态": "Please stay on bed",
"请校准人员暂时离开床铺": "Please leave the bed",
"快检报告": "Quick Check Report",
"暂未绑定": "Not Bound",
"用户取消授权": "User Canceled",
"获得位置信息,连接附近的蓝牙设备": "Obtain location information, connect to nearby Bluetooth devices",
"当前设备已离线,无法快检!": "The current device is offline and cannot be checked!", "当前设备已离线,无法快检!": "The current device is offline and cannot be checked!",
"设备正在快检中,请稍后再试!": "The device is currently checking, please try again later!", "设备正在快检中,请稍后再试!": "The device is currently checking, please try again later!",
"使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "Usage Instructions:When using the Health Quick Check function, the user only needs to lie flat or sit above the vital signs sensor while it is operating normally, remain still, and then tap **“Start Quick Check.”", "使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "Usage Instructions:When using the Health Quick Check function, the user only needs to lie flat or sit above the vital signs sensor while it is operating normally, remain still, and then tap **“Start Quick Check.”",
"注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。": "Note:This report is generated based on physiological waveform data such as heart rate and respiration, analyzed using an AI algorithm model. The results are for reference only. Sections of the report showing no abnormal data do not necessarily indicate the absence of potential health risks. If you feel unwell, please seek medical attention promptly.", "注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。": "Note:This report is generated based on physiological waveform data such as heart rate and respiration, analyzed using an AI algorithm model. The results are for reference only. Sections of the report showing no abnormal data do not necessarily indicate the absence of potential health risks. If you feel unwell, please seek medical attention promptly.",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 Donghua Smart Sleep Center All Rights Reserved" "Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 Donghua Smart Sleep Center All Rights Reserved"

View File

@@ -556,7 +556,7 @@
"微信用户": "微信用户", "微信用户": "微信用户",
"其他设备正在绑定中,是否终止其他设备绑定?": "其他设备正在绑定中,是否终止其他设备绑定?", "其他设备正在绑定中,是否终止其他设备绑定?": "其他设备正在绑定中,是否终止其他设备绑定?",
"图形参考": "图像参考", "图形参考": "图像参考",
"正常心率窦性图": "正常心率窦性", "正常心率窦性图": "正常窦性心率",
"窦性心律不齐图": "窦性心律不齐", "窦性心律不齐图": "窦性心律不齐",
"持续性房颤图": "持续性房颤", "持续性房颤图": "持续性房颤",
"阵法性房颤图": "阵法性房颤", "阵法性房颤图": "阵法性房颤",
@@ -652,10 +652,22 @@
"快检时间:": "快检时间:", "快检时间:": "快检时间:",
"快检中...": "快检中...", "快检中...": "快检中...",
"体验异常结束": "体验异常结束", "体验异常结束": "体验异常结束",
"蓝牙未开启": "蓝牙未开启",
"当前设备已离线,无法快检!": "当前设备已离线,无法快检!", "当前设备已离线,无法快检!": "当前设备已离线,无法快检!",
"设备正在快检中,请稍后再试!": "设备正在快检中,请稍后再试!", "设备正在快检中,请稍后再试!": "设备正在快检中,请稍后再试!",
"是否确认结束?": "是否确认结束?", "是否确认结束?": "是否确认结束?",
"请保持身体静止": "请保持身体静止",
"请先打开蓝牙在进行设备扫描": "请先打开蓝牙在进行设备扫描",
"重新校准": "重新校准",
"选择时区": "选择时区",
"设备校准完成": "设备校准完成",
"请校准人员保持在床状态": "请校准人员保持在床状态",
"请校准人员暂时离开床铺": "请校准人员暂时离开床铺",
"请求成功": "请求成功",
"快检报告": "快检报告",
"暂未绑定": "暂未绑定",
"获得位置信息,连接附近的蓝牙设备": "获得位置信息,连接附近的蓝牙设备",
"使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。", "使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。",
"注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。":"注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。", "注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。": "注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 东华智能睡眠中心 版权所有" "Copyright © 2020-2030 东华智能睡眠中心 版权所有": "Copyright © 2020-2030 东华智能睡眠中心 版权所有"
} }

View File

@@ -551,7 +551,7 @@
"其他设备正在绑定中,是否终止其他设备绑定?": "其他設備正在綁定中,是否終止其他設備綁定?", "其他设备正在绑定中,是否终止其他设备绑定?": "其他設備正在綁定中,是否終止其他設備綁定?",
"未配置网络提示": "當前設備未進行網路配置,是否確認跳過網路配置?", "未配置网络提示": "當前設備未進行網路配置,是否確認跳過網路配置?",
"图形参考": "圖形參考", "图形参考": "圖形參考",
"正常心率窦性图": "正常心率竇性圖", "正常心率窦性图": "正常竇性心率圖",
"窦性心律不齐图": "竇性心律不齊圖", "窦性心律不齐图": "竇性心律不齊圖",
"持续性房颤图": "持續性房顫圖", "持续性房颤图": "持續性房顫圖",
"阵法性房颤图": "陣法性房顫圖", "阵法性房颤图": "陣法性房顫圖",
@@ -651,8 +651,20 @@
"快检中...": "快檢中...", "快检中...": "快檢中...",
"体验异常结束": "體驗異常結束", "体验异常结束": "體驗異常結束",
"是否确认结束?": "是否確認結束?", "是否确认结束?": "是否確認結束?",
"蓝牙未开启": "藍牙未開啟",
"设备校准完成": "設備校準完成",
"重新校准": "重新校準",
"请求成功": "請求成功",
"选择时区": "選擇時區",
"请校准人员保持在床状态": "請校準人員保持在床狀態",
"请校准人员暂时离开床铺": "請校準人員暫時離開床鋪",
"请保持身体静止": "請保持身體靜止",
"快检报告": "快檢報告",
"暂未绑定": "暫未綁定",
"获得位置信息,连接附近的蓝牙设备": "獲得位置信息,連接附近的藍牙設備",
"当前设备已离线,无法快检!": "當前設備已離線,無法快檢! ", "当前设备已离线,无法快检!": "當前設備已離線,無法快檢! ",
"设备正在快检中,请稍后再试!": "當前設備正在快檢中,請稍後再試!", "设备正在快检中,请稍后再试!": "當前設備正在快檢中,請稍後再試!",
"请先打开蓝牙在进行设备扫描": "請先打開藍牙在進行設備掃描",
"注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。": "注意本頁報告基於心率、呼吸等體徵波形數據通過AI算法模型分析完成其結果僅供參考其中報告未見數據異常部分並不表示沒有潛在的疾病風險如有不適請即時就医。", "注本页报告是基于心率、呼吸等体征波形数据通过AI算法模型分析完成其结果仅供参考其中报告未见数据异常部分并不代表没有潜在性的疾病风险如有不适请及时就医。": "注意本頁報告基於心率、呼吸等體徵波形數據通過AI算法模型分析完成其結果僅供參考其中報告未見數據異常部分並不表示沒有潛在的疾病風險如有不適請即時就医。",
"使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "使用方式:人员使用健康快检功能時,只需平躺或坐在正常運行中的體徵传感器传感器上方,保持靜止,然後點擊“啟動快檢”,待進度條完成,即可得出快檢報告。", "使用方式:人员使用健康快检功能时,只需平躺或坐在正常运行中的体征传感器传感器上方,保持静止,然后点击“启动快检”,待进度条完成,即可得出快检报告。": "使用方式:人员使用健康快检功能時,只需平躺或坐在正常運行中的體徵传感器传感器上方,保持靜止,然後點擊“啟動快檢”,待進度條完成,即可得出快檢報告。",
"Copyright © 2020-2030 东华智能睡眠中心 版权所有": " 版權所有©2020-2030 東華智能睡眠中心" "Copyright © 2020-2030 东华智能睡眠中心 版权所有": " 版權所有©2020-2030 東華智能睡眠中心"

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,7 @@
class ServiceConstant { class ServiceConstant {
// static const String baseHost = "zhmht.swes.com.cn:27021"; //服务地址 眠花糖测试地址 // 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 String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址
// static const String baseHost = "vsbst-api.he-info.com";//服务地址 // static const String baseHost = "vsbst-api.he-info.com";//服务地址
// static const String service_address = "http://$baseHost"; // static const String service_address = "http://$baseHost";
static String service_address = "https://$baseHost"; static String service_address = "https://$baseHost";

View File

@@ -8,8 +8,8 @@ import 'package:vbvs_app/enum/APPPackageType.dart';
class AppConstants { class AppConstants {
// App-related constants // App-related constants
static const String zhmht_app_version = "SWES_1.2026.3.12"; //眠花糖 static const String zhmht_app_version = "SWES_1.2026.04.07"; //眠花糖
static const String theh_app_version = "1.2603.11"; //太和 static const String theh_app_version = "1.2604.07"; //太和
// 1. 纯字符串列表格式 // 1. 纯字符串列表格式
static const List<String> integerTimeZones = [ static const List<String> integerTimeZones = [

View File

@@ -80,12 +80,14 @@ Future<ApiResponse> requestWithLog({
onSuccess?.call(apiResponse); onSuccess?.call(apiResponse);
} else { } else {
apiResponse.msg = responseData['msg'] ?? errorMsg; apiResponse.msg = responseData['msg'] ?? errorMsg;
EasyDartModule.logger
.error("$logTitle ${responseData['msg'] ?? errorMsg}");
onFailure?.call(apiResponse); onFailure?.call(apiResponse);
} }
return apiResponse; return apiResponse;
} else { } else {
apiResponse = ApiResponse(code: -1, msg: "失败".tr); apiResponse = ApiResponse(code: -1, msg: "失败".tr);
EasyDartModule.logger.error("$logTitle 失败");
onFailure?.call(apiResponse); onFailure?.call(apiResponse);
return apiResponse; return apiResponse;
} }

View File

@@ -667,6 +667,7 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
height: 200.rpx, height: 200.rpx,
child: Center( child: Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
strokeWidth: 2,
color: themeController.currentColor.sc1, color: themeController.currentColor.sc1,
), ),
), ),

View File

@@ -229,7 +229,7 @@ class BlueteethBindController extends GetControllerEx<BlueteethBindModel> {
String serviceApi = ServiceConstant.device_bind; String serviceApi = ServiceConstant.device_bind;
String queryUrl = "$serviceAddress$serviceName$serviceApi"; String queryUrl = "$serviceAddress$serviceName$serviceApi";
String? language = ""; String? language = "";
if (AppConstants().ent_type == APPPackageType.MHT.code) { if (AppConstants().ent_type == APPPackageType.MHT.code) {
if (mhLanguageController.selectLanguage != null) { if (mhLanguageController.selectLanguage != null) {
language = mhLanguageController.selectLanguage.value!.language_code; language = mhLanguageController.selectLanguage.value!.language_code;
} }
@@ -291,7 +291,7 @@ class BlueteethBindController extends GetControllerEx<BlueteethBindModel> {
String serviceApi = ServiceConstant.device_bind; String serviceApi = ServiceConstant.device_bind;
String queryUrl = "$serviceAddress$serviceName$serviceApi"; String queryUrl = "$serviceAddress$serviceName$serviceApi";
String? language = ""; String? language = "";
if (AppConstants().ent_type == APPPackageType.MHT.code) { if (AppConstants().ent_type == APPPackageType.MHT.code) {
if (mhLanguageController.selectLanguage != null) { if (mhLanguageController.selectLanguage != null) {
language = mhLanguageController.selectLanguage.value!.language_code; language = mhLanguageController.selectLanguage.value!.language_code;
} }

View File

@@ -54,6 +54,9 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
RxBool own = false.obs; //体验id RxBool own = false.obs; //体验id
RxString errmsg = "".obs; RxString errmsg = "".obs;
RxBool qcListLoading = true.obs; RxBool qcListLoading = true.obs;
RxBool qcDetailLoading = true.obs; // 详情加载状态专门用于id不为空时的加载
int _requestSequence = 0;
Future<ApiResponse> getDeviceType() async { Future<ApiResponse> getDeviceType() async {
ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr); ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr);
@@ -103,32 +106,44 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
} }
Future<bool> checkReportStatus(String mac) async { Future<bool> checkReportStatus(String mac) async {
String serviceAddress = ServiceConstant.qc_service_address;
String serviceApi = ServiceConstant.checkQuickStatus;
String queryUrl = "$serviceAddress$serviceApi?mac=${mac}";
bool flag = false; bool flag = false;
await requestWithLog( try {
logTitle: "查询快检状态", String serviceAddress = ServiceConstant.qc_service_address;
method: MyHttpMethod.get, String serviceApi = ServiceConstant.checkQuickStatus;
queryUrl: queryUrl, String queryUrl = "$serviceAddress$serviceApi?mac=${mac}";
onSuccess: (res) { await requestWithLog(
flag = res.data['status'] != 200; logTitle: "查询快检状态",
experience_status.value = res.data['status']; method: MyHttpMethod.get,
experience_percent.value = res.data['per'] ?? 0; queryUrl: queryUrl,
experience_id.value = res.data['id'] ?? ""; onSuccess: (res) {
own.value = res.data['own'] ?? false; flag = res.data['status'] != 200;
updateAll(); experience_status.value = res.data['status'];
}, experience_percent.value = res.data['per'] ?? 0;
onFailure: (res) { experience_id.value = res.data['id'] ?? "";
flag = false; own.value = res.data['own'] ?? false;
experience_status.value = -1; updateAll();
}, },
); onFailure: (res) {
flag = false;
experience_status.value = -1;
},
);
} catch (e) {
print("查询快检状态出错: $e");
}
return flag; return flag;
} }
Future<bool> getCheckHistory({required String mac, String? id}) async { Future<bool> getCheckHistory({required String mac, String? id}) async {
qcListLoading.value = true; // 生成新的序列号
final currentSeq = ++_requestSequence;
if (id == null || id.isEmpty) {
qcListLoading.value = true;
} else {
qcDetailLoading.value = true;
currentCq.value = {};
}
String serviceAddress = ServiceConstant.qc_service_address; String serviceAddress = ServiceConstant.qc_service_address;
String serviceApi = ServiceConstant.getCheckHistory; String serviceApi = ServiceConstant.getCheckHistory;
String queryUrl = "$serviceAddress$serviceApi"; String queryUrl = "$serviceAddress$serviceApi";
@@ -155,6 +170,11 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
method: MyHttpMethod.get, method: MyHttpMethod.get,
queryUrl: queryUrl, queryUrl: queryUrl,
onSuccess: (res) { onSuccess: (res) {
if (_requestSequence != currentSeq) {
print('⚠️ 忽略过期请求 #$currentSeq,当前最新是 #$_requestSequence');
return;
}
flag = true; flag = true;
// 判断返回数据类型 // 判断返回数据类型
if (res.data is List) { if (res.data is List) {
@@ -164,15 +184,30 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
// 如果是Map赋值给currentCq // 如果是Map赋值给currentCq
currentCq.value = res.data as Map<String, dynamic>; currentCq.value = res.data as Map<String, dynamic>;
} }
qcListLoading.value = false; if (id == null || id.isEmpty) {
qcListLoading.value = false;
} else {
qcDetailLoading.value = false;
}
// qcListLoading.value = false;
updateAll(); updateAll();
}, },
onFailure: (res) { onFailure: (res) {
if (_requestSequence != currentSeq) {
print('⚠️ 忽略过期失败回调 #$currentSeq');
return;
}
flag = false; flag = false;
qcListLoading.value = false; if (id == null || id.isEmpty) {
qcListLoading.value = false;
} else {
qcDetailLoading.value = false;
}
currentCq.value = {}; currentCq.value = {};
NewTopSlideNotification.show( NewTopSlideNotification.show(
text: "数据加载失败", textColor: themeController.currentColor.sc9); text: "数据加载失败", textColor: themeController.currentColor.sc9);
EasyDartModule.logger.error("快检报告数据加载失败-->${res.msg ?? '服务器错误'}");
}, },
); );
return flag; return flag;
@@ -268,6 +303,9 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
flag = true; flag = true;
}, },
onFailure: (res) { onFailure: (res) {
NewTopSlideNotification.show(
text:res.msg ?? "请求失败".tr,
textColor: themeController.currentColor.sc9);
flag = false; flag = false;
}, },
); );

View File

@@ -175,6 +175,9 @@ class LoginController extends GetControllerEx<LoginModel> {
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) { if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
data['code'] = "dh"; data['code'] = "dh";
} }
if (AppConstants().ent_type == APPPackageType.TH.code) {
data['code'] = "theh";
}
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) {
@@ -248,6 +251,9 @@ class LoginController extends GetControllerEx<LoginModel> {
} }
if (AppConstants().ent_type == APPPackageType.DONGHUA.code) { if (AppConstants().ent_type == APPPackageType.DONGHUA.code) {
data['code'] = "dh"; data['code'] = "dh";
}
if (AppConstants().ent_type == APPPackageType.TH.code) {
data['code'] = "theh";
} }
var response = var response =
await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data)); await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));

View File

@@ -50,7 +50,7 @@ class FindPasswordController extends GetControllerEx<FindPasswordModel> {
String serviceName = ServiceConstant.server_service; String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.send_code; String serviceApi = ServiceConstant.send_code;
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}"; String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
var data = {"userName": model.phone, "type": 2}; var data = {"userName": model.phone, "type": 2, "code": "mht"};
await requestWithLog( await requestWithLog(
logTitle: "忘记密码请求验证码", logTitle: "忘记密码请求验证码",
method: MyHttpMethod.post, method: MyHttpMethod.post,

View File

@@ -49,12 +49,11 @@ class AppLanguage extends Translations {
// } // }
// } // }
Future<void> loadLanguage(String languageCode, Future<void> loadLanguage(String languageCode, {int project = 1}) async {
{int project = 1}) async {
try { try {
final jsonString; final jsonString;
// 加载 JSON 文件 // 加载 JSON 文件
if (project ==APPPackageType.TH.code ) { if (project == APPPackageType.TH.code) {
jsonString = jsonString =
await rootBundle.loadString('assets/langs/$languageCode.json'); await rootBundle.loadString('assets/langs/$languageCode.json');
} else if (project == APPPackageType.MHT.code) { } else if (project == APPPackageType.MHT.code) {
@@ -115,6 +114,6 @@ class AppLanguage extends Translations {
} }
bool isChinese() { bool isChinese() {
return _currentLanguageCode == "zh_CN"||_currentLanguageCode == "zh_TW"; return _currentLanguageCode == "zh_CN" || _currentLanguageCode == "zh_TW";
} }
} }

View File

@@ -141,8 +141,8 @@ Future<void> main() async {
void initServiceAddress() { void initServiceAddress() {
if (AppConstants().ent_type == APPPackageType.MHT.code) { if (AppConstants().ent_type == APPPackageType.MHT.code) {
// 眠花糖 // 眠花糖
// ServiceConstant.baseHost = "zhmht.swes.com.cn:27020"; ServiceConstant.baseHost = "zhmht.swes.com.cn:27020";
ServiceConstant.baseHost = "vsbs-test.he-info.cn"; // ServiceConstant.baseHost = "vsbs-test.he-info.cn";
} else if (AppConstants().ent_type == APPPackageType.TH.code) { } else if (AppConstants().ent_type == APPPackageType.TH.code) {
// 太和 // 太和
// ServiceConstant.baseHost = "vsbst-api.he-info.com"; // ServiceConstant.baseHost = "vsbst-api.he-info.com";
@@ -697,7 +697,8 @@ void initEasyDartModule() {
try { try {
EasyDartModule.init( EasyDartModule.init(
loggerConfig: LoggerConfig( loggerConfig: LoggerConfig(
host: "https://zhmht.swes.com.cn:27020/vsbs_log", serviceName: "眠花糖在线2026-03-03"), host: "https://zhmht.swes.com.cn:27020/vsbs_log",
serviceName: "智慧眠花糖2026-04-07"),
webSocketConfig: webSocketConfig:
WebSocketConfig(ServiceConstant.webSocketService, (data) { WebSocketConfig(ServiceConstant.webSocketService, (data) {
// 接收到服务消息 // 接收到服务消息

View File

@@ -1,6 +1,8 @@
import 'dart:async'; import 'dart:async';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -88,10 +90,40 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
themeController.currentColor.sc16.withOpacity(0.1), themeController.currentColor.sc16.withOpacity(0.1),
borderRadius: 0.rpx, borderRadius: 0.rpx,
onTap: () { onTap: () {
_hidePopup(); _popupEntry?.remove();
_popupEntry = null;
// TopSlideNotification.show(
// context,
// text: "待开发功能".tr,
// );
Get.toNamed("/qrView");
},
child: Container(
width: double.infinity,
child: Center(
child: Text(
'扫一扫.标题'.tr,
style: TextStyle(
fontSize: AppConstants().normal_text_fontSize,
color: themeController.currentColor.sc3,
),
),
),
),
),
SizedBox(height: 35.rpx),
ClickableContainer(
padding: EdgeInsets.symmetric(vertical: 10.rpx),
backgroundColor: Colors.transparent,
highlightColor:
themeController.currentColor.sc16.withOpacity(0.1),
borderRadius: 0.rpx,
onTap: () {
_popupEntry?.remove();
_popupEntry = null;
BlueteethBindController blueteethBindController = BlueteethBindController blueteethBindController =
Get.find(); Get.find();
blueteethBindController.returnPage = 1; blueteethBindController.returnPage = 0;
Get.toNamed("/deviceType"); Get.toNamed("/deviceType");
}, },
child: Container( child: Container(
@@ -262,6 +294,11 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -113,7 +113,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
final menuWidth = _calculateMaxMenuItemWidth(allTexts, textStyle); final menuWidth = _calculateMaxMenuItemWidth(allTexts, textStyle);
popupWidth = menuWidth; popupWidth = menuWidth;
// 计算弹窗需要的实际高度(估算) // 计算弹窗需要的实际高度(估算)
final estimatedItemHeight = 66.rpx; // 每个菜单项的估算高度 // final estimatedItemHeight = 66.rpx; // 每个菜单项的估算高度
final estimatedItemHeight = 100.rpx; // 每个菜单项的估算高度
//todo 更新菜单项,需要在此添加数量 //todo 更新菜单项,需要在此添加数量
// final itemCount = // final itemCount =
// widget.device['bind_type'] == BindType.active.code ? 9 : 5; // widget.device['bind_type'] == BindType.active.code ? 9 : 5;
@@ -151,7 +152,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
// 确保弹窗不会超出屏幕边界 // 确保弹窗不会超出屏幕边界
popupTop = math.max(paddingOffset, popupTop); popupTop = math.max(paddingOffset, popupTop);
actualPopupHeight = actualPopupHeight =
math.min(actualPopupHeight, screenHeight * 0.7); // 限制最大高度为屏幕的70% math.min(actualPopupHeight, screenHeight * 1); // 限制最大高度为屏幕的70%
// 计算左侧位置,确保不会超出屏幕右侧 // 计算左侧位置,确保不会超出屏幕右侧
double popupLeft = position.dx + size.width - popupWidth; double popupLeft = position.dx + size.width - popupWidth;
@@ -699,7 +700,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
maxWidth: MediaQuery.sizeOf(context).width * 0.6, maxWidth: MediaQuery.sizeOf(context).width * 0.6,
), ),
child: Text( child: Text(
'${(widget.device['person']?['name'] as String?)?.isNotEmpty == true ? widget.device['person']!['name'] : '体征测设备'.tr}', '${(widget.device['person']?['name'] as String?)?.isNotEmpty == true ? widget.device['person']!['name'] : '体征测设备'.tr}',
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
fontSize: 30.rpx, fontSize: 30.rpx,

View File

@@ -8,6 +8,7 @@ import 'package:vbvs_app/controller/device/device_share_controller.dart';
import 'package:vbvs_app/controller/device/device_type_controller.dart'; import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/message/message_controller.dart'; import 'package:vbvs_app/controller/message/message_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
class HealthReportCardWidget extends StatefulWidget { class HealthReportCardWidget extends StatefulWidget {
final data; final data;
@@ -93,18 +94,28 @@ class _HealthReportCardWidgetState extends State<HealthReportCardWidget> {
_formatTime(reportData['create_time']), _formatTime(reportData['create_time']),
onViewTap: () async { onViewTap: () async {
// 查看按钮点击事件 // 查看按钮点击事件
edm.EasyDartModule.logger.info("快检报告查看按钮点击");
String ID = reportData['id']; String ID = reportData['id'];
DeviceTypeController deviceTypeController = DeviceTypeController deviceTypeController =
Get.find(); Get.find();
await deviceTypeController.getCheckHistory(id: ID,mac: reportData['mac']); Map data = {
if (deviceTypeController.currentCq.value == null || 'id': ID,
deviceTypeController.currentCq.value.isEmpty) { 'mac': reportData['mac'],
NewTopSlideNotification.show( };
text: "未找到快检报告".tr, // await deviceTypeController.getCheckHistory(
textColor: themeController.currentColor.sc9); // id: ID, mac: reportData['mac']);
return; // if (Get.currentRoute != '/healthExperienceHistory')
} // return;
_onViewReport(deviceTypeController.currentCq.value); // if (deviceTypeController.currentCq.value == null ||
// deviceTypeController.currentCq.value.isEmpty) {
// NewTopSlideNotification.show(
// text: "未找到快检报告".tr,
// textColor: themeController.currentColor.sc9);
// return;
// }
// _onViewReport(deviceTypeController.currentCq.value);
Get.toNamed('/healthQuickCheckReportPage',
arguments: data);
}, },
), ),
], ],
@@ -215,7 +226,11 @@ class _HealthReportCardWidgetState extends State<HealthReportCardWidget> {
// 可以根据需要跳转到报告详情页面 // 可以根据需要跳转到报告详情页面
print('查看报告: ${reportData['_id']}'); print('查看报告: ${reportData['_id']}');
// 示例Get.to(() => ReportDetailPage(reportId: reportData['_id'])); // 示例Get.to(() => ReportDetailPage(reportId: reportData['_id']));
Get.toNamed('/healthQuickCheckReportPage', arguments: reportData); try {
Get.toNamed('/healthQuickCheckReportPage', arguments: reportData);
} catch (e) {
edm.EasyDartModule.logger.error("快检报告页面加载失败---?${e.toString()}");
}
} }
// 格式化时间戳 // 格式化时间戳

View File

@@ -17,6 +17,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/message/common_message_setting_controller.dart'; import 'package:vbvs_app/controller/message/common_message_setting_controller.dart';
import 'package:vbvs_app/controller/message/message_setting_controller.dart'; import 'package:vbvs_app/controller/message/message_setting_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:flutter/services.dart';
//消息总配置 //消息总配置
class MessageSettingPage extends StatefulWidget { class MessageSettingPage extends StatefulWidget {
@@ -214,6 +215,11 @@ class _MessageSettingPageState extends State<MessageSettingPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/ServiceConstant.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -211,6 +212,11 @@ class _MessageSettingPageState extends State<SingleMessageSetting> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -0,0 +1,92 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'package:flutter/services.dart';
class SpeedControlledGif extends StatefulWidget {
final String assetPath;
final double speedFactor;
final BoxFit? fit;
/// [speedFactor] 播放速度倍数默认1.0
/// 大于1表示加速播放小于1表示减速播放
const SpeedControlledGif(
this.assetPath, {
Key? key,
this.speedFactor = 1.0,
this.fit,
}) : super(key: key);
@override
_SpeedControlledGifState createState() => _SpeedControlledGifState();
}
class _SpeedControlledGifState extends State<SpeedControlledGif> {
ui.Codec? _codec;
ui.FrameInfo? _currentFrame;
Timer? _timer;
bool _isDisposed = false;
@override
void initState() {
super.initState();
_loadGif();
}
Future<void> _loadGif() async {
final data = await rootBundle.load(widget.assetPath);
_codec = await ui.instantiateImageCodec(data.buffer.asUint8List());
if (_isDisposed) return;
_showNextFrame();
}
Future<void> _showNextFrame() async {
if (_isDisposed || _codec == null) return;
_currentFrame = await _codec!.getNextFrame();
if (_isDisposed) return;
if (mounted) {
setState(() {});
}
// 取当前帧持续时间,单位毫秒
final baseDuration = _currentFrame?.duration.inMilliseconds ?? 100;
// 限制最小帧间隔,防止刷新过快
const minFrameDuration = 50;
// 计算实际播放帧间隔speedFactor越大速度越快
final adjustedDuration = (baseDuration / widget.speedFactor)
.round()
.clamp(minFrameDuration, 10000);
_timer = Timer(Duration(milliseconds: adjustedDuration), _showNextFrame);
}
@override
void dispose() {
_isDisposed = true;
_timer?.cancel();
_codec?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (_currentFrame == null) {
// 加载中或无帧时显示空容器或占位
return Container();
}
return RawImage(
image: _currentFrame!.image,
fit: widget.fit,
);
}
}

View File

@@ -0,0 +1,63 @@
import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
DeviceTypeController deviceTypeController = Get.find();
String getGenderText(dynamic gender) {
var genderMap = {
'1': ''.tr,
'2': ''.tr,
};
String genderStr = gender.toString().trim();
return genderMap[genderStr] ?? '-'.tr;
}
// 显示解绑确认对话框
void showCancelConfirmDialog(BuildContext context, personInfo) {
showConfirmDialog(
context,
Container(),
"是否确认结束?".tr,
onConfirm: () async {
bool opRes = await deviceTypeController.qcCheckControl(personInfo, 2);
if (!opRes) {
return;
}
deviceTypeController.experience_status.value = 404;
deviceTypeController.updateAll();
},
onCancel: () {},
);
}
String calculateAge(String birthdayStr) {
try {
// 解析生日字符串 (格式: yyyy/MM/dd)
List<String> parts = birthdayStr.trim().split('/');
if (parts.length != 3) return '-'.tr;
int year = int.parse(parts[0]);
int month = int.parse(parts[1]);
int day = int.parse(parts[2]);
DateTime birthDate = DateTime(year, month, day);
DateTime today = DateTime.now();
// 计算年龄
int age = today.year - birthDate.year;
// 如果今年还没过生日年龄减1
if (today.month < birthDate.month ||
(today.month == birthDate.month && today.day < birthDate.day)) {
age--;
}
return age.toString();
} catch (e) {
return '-'.tr;
}
}

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -372,6 +373,11 @@ class _BodyDevicePageState extends State<BodyDeviceWidgetCopy>
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -10,6 +10,7 @@ import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:flutter/services.dart';
class DeviceDetailPage extends StatefulWidget { class DeviceDetailPage extends StatefulWidget {
var device; var device;
@@ -46,6 +47,11 @@ class _DeviceDetailPageState extends State<DeviceDetailPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,10 @@ import 'package:vbvs_app/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/controller/device/device_type_controller.dart'; import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/message/message_review_controller.dart'; import 'package:vbvs_app/controller/message/message_review_controller.dart';
import 'package:vbvs_app/pages/device/component/HealthReportCard.dart'; import 'package:vbvs_app/pages/device/component/HealthReportCard.dart';
import 'package:flutter/services.dart';
class HealthExperienceHistory extends StatefulWidget { class HealthExperienceHistory extends StatefulWidget {
var data; //1.绑定时 2.绑定后 var data;
HealthExperienceHistory({super.key, required this.data}); HealthExperienceHistory({super.key, required this.data});
@override @override
@@ -54,6 +55,11 @@ class _HealthExperienceHistoryState extends State<HealthExperienceHistory> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -203,6 +203,11 @@ class _InstantBodyPageState extends State<InstantBodyPage>
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),

View File

@@ -11,6 +11,7 @@ import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/controller/message/message_review_controller.dart'; import 'package:vbvs_app/controller/message/message_review_controller.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/device/component/ReviewMessageWidgetWidget.dart'; import 'package:vbvs_app/pages/device/component/ReviewMessageWidgetWidget.dart';
import 'package:flutter/services.dart';
class MessageReviewPage extends StatefulWidget { class MessageReviewPage extends StatefulWidget {
var data; //1.绑定时 2.绑定后 var data; //1.绑定时 2.绑定后
@@ -49,6 +50,11 @@ class _MessageReviewPageState extends State<MessageReviewPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -1,5 +1,6 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:img_picker/img_picker.dart'; import 'package:img_picker/img_picker.dart';
import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:vbvs_app/common/color/app_uri_status.dart'; import 'package:vbvs_app/common/color/app_uri_status.dart';
@@ -9,6 +10,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class MobileScannerTestPage extends StatefulWidget { class MobileScannerTestPage extends StatefulWidget {
const MobileScannerTestPage({Key? key}) : super(key: key); const MobileScannerTestPage({Key? key}) : super(key: key);
@@ -21,6 +23,7 @@ class _MobileScannerTestPageState extends State<MobileScannerTestPage>
with TickerProviderStateMixin { with TickerProviderStateMixin {
String? scannedText; String? scannedText;
bool isScanning = true; bool isScanning = true;
bool isTorchOn = false;
late AnimationController _controller; late AnimationController _controller;
late Animation<double> _animation; late Animation<double> _animation;
@@ -86,7 +89,6 @@ class _MobileScannerTestPageState extends State<MobileScannerTestPage>
}, },
onCancel: () { onCancel: () {
print('用户点击了取消'); print('用户点击了取消');
// 执行取消后的处理逻辑
}, },
); );
} }
@@ -100,11 +102,33 @@ class _MobileScannerTestPageState extends State<MobileScannerTestPage>
} }
} }
void _toggleTorch() async {
await _scannerController.toggleTorch();
setState(() {
isTorchOn = !isTorchOn;
});
}
Future<void> _pickImageFromGallery() async {
final picker = ImagePicker();
final pickedFile = await picker.pickImage(source: ImageSource.gallery);
if (pickedFile != null) {
final bytes = await pickedFile.readAsBytes();
final image = await decodeImageFromList(bytes);
// 处理相册图片扫码逻辑
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light,
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
@@ -133,122 +157,145 @@ class _MobileScannerTestPageState extends State<MobileScannerTestPage>
), ),
centerTitle: false, centerTitle: false,
), ),
body: Container( body: Stack(
child: Column( children: [
children: [ // 扫描区域(全屏)
Expanded( MobileScanner(
child: Stack( controller: _scannerController,
children: [ onDetect: _onDetect,
MobileScanner( ),
controller: _scannerController,
onDetect: _onDetect, // 扫描框和提示(顶部)- 使用 Positioned 更精确
), Positioned(
Align( top: 0,
alignment: Alignment.topCenter, // 使扫描框位于顶部居中 left: 0,
child: Column( right: 0,
mainAxisSize: MainAxisSize.min, child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.only(top: 219.rpx),
child: SizedBox(
width: scanAreaSize,
height: scanAreaSize,
child: Stack(
children: [ children: [
Padding( Container(
padding: EdgeInsets.only(top: 219.rpx), // 向上移动扫描框 decoration: BoxDecoration(
child: SizedBox( color: themeController.currentColor.sc5,
width: scanAreaSize,
height: scanAreaSize,
child: Stack(
children: [
Container(
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
),
),
AnimatedBuilder(
animation: _animation,
builder: (context, child) {
return Positioned(
top: scanAreaSize * _animation.value,
left: 0,
right: 0,
child: Container(
height: 2,
color: themeController.currentColor.sc2,
),
);
},
),
],
),
), ),
), ),
SizedBox(height: 31.rpx), AnimatedBuilder(
Text( animation: _animation,
'扫一扫.提示'.tr, builder: (context, child) {
style: TextStyle( return Positioned(
color: themeController.currentColor.sc2, top: scanAreaSize * _animation.value,
fontSize: 26.rpx, left: 0,
), right: 0,
child: Container(
height: 1.rpx,
color: themeController.currentColor.sc2,
),
);
},
), ),
], ],
), ),
), ),
], ),
), SizedBox(height: 31.rpx),
Text(
'扫一扫.提示'.tr,
style: TextStyle(
color: themeController.currentColor.sc2,
fontSize: 26.rpx,
),
),
],
), ),
Padding( ),
padding: EdgeInsets.fromLTRB(0, 0, 0, 83.rpx),
child: Row( // 底部按钮区域 - 使用 Positioned 固定在底部
mainAxisAlignment: MainAxisAlignment.center, Positioned(
children: [ bottom: 83.rpx,
GestureDetector( left: 0,
onTap: () async { right: 0,
final picker = ImagePicker(); child: Row(
final pickedFile = mainAxisAlignment: MainAxisAlignment.center,
await picker.pickImage(source: ImageSource.gallery); children: [
if (pickedFile != null) { GestureDetector(
final bytes = await pickedFile.readAsBytes(); onTap: _pickImageFromGallery,
final image = await decodeImageFromList(bytes); child: Column(
} children: [
}, Container(
child: Column( width: 91.rpx,
children: [ height: 91.rpx,
Icon(Icons.photo, decoration: BoxDecoration(
color: themeController.currentColor.sc2, borderRadius: BorderRadius.circular(50.rpx),
size: 60.rpx), color: stringToColor("#242835"),
SizedBox(height: 10.rpx), ),
Text( child: Center(
'扫一扫.相册'.tr, child: SvgPicture.asset(
style: TextStyle( width: 34.rpx,
color: themeController.currentColor.sc2, height: 26.rpx,
fontSize: 24.rpx, 'assets/img/icon/album.svg',
fit: BoxFit.cover,
color: themeController.currentColor.sc3,
), ),
), ),
], ),
), SizedBox(height: 10.rpx),
Text(
'扫一扫.相册'.tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: 24.rpx,
),
),
],
), ),
SizedBox(width: 80.rpx), ),
GestureDetector( SizedBox(width: 170.rpx),
onTap: () { GestureDetector(
_scannerController.toggleTorch(); onTap: _toggleTorch,
}, child: Column(
child: Column( children: [
children: [ Container(
Icon(Icons.flashlight_on, width: 91.rpx,
color: themeController.currentColor.sc2, height: 91.rpx,
size: 60.rpx), decoration: BoxDecoration(
SizedBox(height: 10.rpx), borderRadius: BorderRadius.circular(50.rpx),
Text( color: isTorchOn
'扫一扫.手电筒'.tr, ? themeController.currentColor.sc3
style: TextStyle( : stringToColor("#242835"),
color: themeController.currentColor.sc2, ),
fontSize: 24.rpx, child: Center(
child: SvgPicture.asset(
width: 26.rpx,
height: 36.rpx,
'assets/img/icon/light.svg',
fit: BoxFit.cover,
color: isTorchOn
? stringToColor("#242835")
: themeController.currentColor.sc3,
), ),
), ),
], ),
), SizedBox(height: 10.rpx),
Text(
'扫一扫.手电筒'.tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize: 24.rpx,
),
),
],
), ),
], ),
), ],
), ),
], ),
), ],
), ),
); );
} }

View File

@@ -1,4 +1,3 @@
import 'package:ef/base/widget/flutterflow/FlutterFlowTheme.dart';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/ServiceConstant.dart';
@@ -12,6 +11,7 @@ import 'package:vbvs_app/controller/device/body_device_controller.dart';
import 'package:vbvs_app/controller/device/device_share_list_controller.dart'; import 'package:vbvs_app/controller/device/device_share_list_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart'; import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
import 'package:flutter/services.dart';
class THShareDeviceDetailWidget extends GetView { class THShareDeviceDetailWidget extends GetView {
final scaffoldKey = GlobalKey<ScaffoldState>(); final scaffoldKey = GlobalKey<ScaffoldState>();
@@ -160,7 +160,7 @@ class THShareDeviceDetailWidget extends GetView {
return GestureDetector( return GestureDetector(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage(getBackgroundImageNoImage()), // 本地图片 image: AssetImage(getBackgroundImageNoImage()), // 本地图片
fit: BoxFit.fill, fit: BoxFit.fill,
@@ -170,6 +170,11 @@ class THShareDeviceDetailWidget extends GetView {
key: scaffoldKey, key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -17,6 +17,7 @@ import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
import 'package:vbvs_app/controller/person/person_controller.dart'; import 'package:vbvs_app/controller/person/person_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart'; import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class AfterCalibrationPersonPage extends StatefulWidget { class AfterCalibrationPersonPage extends StatefulWidget {
AfterCalibrationPersonPage({super.key}); AfterCalibrationPersonPage({super.key});
@@ -73,6 +74,11 @@ class _AfterCalibrationPersonPageState
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:
@@ -543,19 +549,19 @@ class _AfterCalibrationPersonPageState
), ),
// 床头文字 // 床头文字
Positioned( Align(
top: 23.rpx, alignment:
left: (MediaQuery.sizeOf(context) Alignment.topCenter, // 顶部居中
.width * child: Padding(
0.65) / padding: EdgeInsets.only(
2 - top: 23.rpx), // 距离顶部的距离
26.rpx, child: Text(
child: Text( '床头'.tr,
'床头'.tr, style: TextStyle(
style: TextStyle( fontSize: 26.rpx,
fontSize: 26.rpx, color: themeController
color: themeController .currentColor.sc4,
.currentColor.sc4, ),
), ),
), ),
), ),

View File

@@ -86,6 +86,11 @@ class _AfterUpdatePersonPageState extends State<AfterUpdatePersonPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -25,6 +25,7 @@ import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart'; import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm; import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:flutter/services.dart';
class AfterWifiPagePerson extends StatefulWidget { class AfterWifiPagePerson extends StatefulWidget {
var type; var type;
@@ -84,6 +85,11 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
@@ -736,6 +742,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
.currentColor.sc9, .currentColor.sc9,
); );
}); });
await initWifiStatusAndWifiList();
} else { } else {
blueteethBindController.netType.value = blueteethBindController.netType.value =
1; 1;

View File

@@ -14,6 +14,8 @@ import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/person/person_controller.dart'; import 'package:vbvs_app/controller/person/person_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:flutter/services.dart';
class BindDeviceSuccess extends StatefulWidget { class BindDeviceSuccess extends StatefulWidget {
const BindDeviceSuccess({super.key}); const BindDeviceSuccess({super.key});
@@ -48,6 +50,11 @@ class _EPageState extends State<BindDeviceSuccess> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -22,6 +22,7 @@ import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/pages/common/selectDialog.dart'; import 'package:vbvs_app/pages/common/selectDialog.dart';
import 'package:vbvs_app/pages/device_bind/componnet/SingleBlueteethDeviceCompoentWidget.dart'; import 'package:vbvs_app/pages/device_bind/componnet/SingleBlueteethDeviceCompoentWidget.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class BlueteethDevicePage extends StatefulWidget { class BlueteethDevicePage extends StatefulWidget {
int tid = -1; int tid = -1;
@@ -61,7 +62,7 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
Get.find<BlueteethBindController>().startStatusPolling(); Get.find<BlueteethBindController>().startStatusPolling();
blueteethBindController.search.value = ""; blueteethBindController.search.value = "";
blueteethBindController.currentDeviceMac?.value = ""; blueteethBindController.currentDeviceMac?.value = "";
BluetoothHelper.listenBluetoothState((isOn) { BluetoothHelper.listenBluetoothState((isOn) async {
blueteethBindController.model.bluetooth = isOn; blueteethBindController.model.bluetooth = isOn;
if (isOn) { if (isOn) {
isScanning = false; isScanning = false;
@@ -69,13 +70,17 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
} }
blueteethBindController.updateAll(); blueteethBindController.updateAll();
if (!isOn && !_isDialogShowing) { if (!isOn && !_isDialogShowing) {
_isDialogShowing = true; await Future.delayed(Duration(seconds: 2));
blueteethBindController.model.devicelist = []; bool isReallyOn = await FlutterBluePlus.isOn;
blueteethBindController.model.betDevicelist = []; if (!isReallyOn) {
blueteethBindController.updateAll(); _isDialogShowing = true;
_showBluetoothNotEnabledDialog().then((_) { blueteethBindController.model.devicelist = [];
_isDialogShowing = false; blueteethBindController.model.betDevicelist = [];
}); blueteethBindController.updateAll();
_showBluetoothNotEnabledDialog().then((_) {
_isDialogShowing = false;
});
}
} }
}); });
} }
@@ -364,6 +369,11 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -191,6 +191,11 @@
// child: Scaffold( // child: Scaffold(
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
// appBar: AppBar( // appBar: AppBar(
// systemOverlayStyle: SystemUiOverlayStyle(
// statusBarColor: Colors.transparent, // 状态栏背景色
// statusBarIconBrightness: Brightness.light, // 图标颜色Android
// statusBarBrightness: Brightness.light, // 图标颜色iOS
// ),
// backgroundColor: themeController.currentColor.sc17, // backgroundColor: themeController.currentColor.sc17,
// automaticallyImplyLeading: false, // automaticallyImplyLeading: false,
// iconTheme: IconThemeData( // iconTheme: IconThemeData(

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/device_calibration_controller.dart'; import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart'; import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class CalibrationPage extends StatefulWidget { class CalibrationPage extends StatefulWidget {
int? type; //1.绑定时 2.绑定后 int? type; //1.绑定时 2.绑定后
@@ -72,6 +73,11 @@ class _CalibrationPageState extends State<CalibrationPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:
@@ -420,19 +426,19 @@ class _CalibrationPageState extends State<CalibrationPage> {
), ),
// 床头文字 // 床头文字
Positioned( Align(
top: 23.rpx, alignment:
left: (MediaQuery.sizeOf(context) Alignment.topCenter, // 顶部居中
.width * child: Padding(
0.65) / padding: EdgeInsets.only(
2 - top: 23.rpx), // 距离顶部的距离
26.rpx, child: Text(
child: Text( '床头'.tr,
'床头'.tr, style: TextStyle(
style: TextStyle( fontSize: 26.rpx,
fontSize: 26.rpx, color: themeController
color: themeController .currentColor.sc4,
.currentColor.sc4, ),
), ),
), ),
), ),

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/device_calibration_controller.dart'; import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
import 'package:vbvs_app/pages/common/selectDialog.dart'; import 'package:vbvs_app/pages/common/selectDialog.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class CalibrationPage extends StatefulWidget { class CalibrationPage extends StatefulWidget {
int? type; //1.绑定时 2.绑定后 int? type; //1.绑定时 2.绑定后
@@ -61,6 +62,11 @@ class _CalibrationPageState extends State<CalibrationPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/device_calibration_controller.dart'; import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart'; import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class CalibrationPersonPage extends StatefulWidget { class CalibrationPersonPage extends StatefulWidget {
int? type; //1.绑定时 2.绑定后 int? type; //1.绑定时 2.绑定后
@@ -71,6 +72,11 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:
@@ -414,19 +420,36 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
), ),
// 床头文字 // 床头文字
Positioned( // Positioned(
top: 23.rpx, // top: 23.rpx,
left: (MediaQuery.sizeOf(context) // left: (MediaQuery.sizeOf(context)
.width * // .width *
0.65) / // 0.65) /
2 - // 2 -
26.rpx, // 26.rpx,
child: Text( // child: Text(
'床头'.tr, // '床头'.tr,
style: TextStyle( // style: TextStyle(
fontSize: 26.rpx, // fontSize: 26.rpx,
color: themeController // color: themeController
.currentColor.sc4, // .currentColor.sc4,
// ),
// ),
// ),
// 床头文字 - 自动居中版本
Align(
alignment:
Alignment.topCenter, // 顶部居中
child: Padding(
padding: EdgeInsets.only(
top: 23.rpx), // 距离顶部的距离
child: Text(
'床头'.tr,
style: TextStyle(
fontSize: 26.rpx,
color: themeController
.currentColor.sc4,
),
), ),
), ),
), ),

View File

@@ -13,6 +13,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/device/device_share_list_controller.dart'; import 'package:vbvs_app/controller/device/device_share_list_controller.dart';
import 'package:vbvs_app/pages/device_bind/componnet/DeviceShareInfoWidget.dart'; import 'package:vbvs_app/pages/device_bind/componnet/DeviceShareInfoWidget.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class DeviceShareListPage extends StatefulWidget { class DeviceShareListPage extends StatefulWidget {
String device = ""; String device = "";
@@ -57,6 +58,11 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -51,6 +51,11 @@ class _DeviceSharePageState extends State<DeviceSharePage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),

View File

@@ -14,6 +14,7 @@ import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:flutter/services.dart';
class DeviceTypePage extends StatefulWidget { class DeviceTypePage extends StatefulWidget {
int type = 0; //0绑定设备 1.查询我的设备 int type = 0; //0绑定设备 1.查询我的设备
@@ -306,6 +307,11 @@ class _EPageState extends State<DeviceTypePage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -1,5 +1,7 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/color/app_uri_status.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/FitTool.dart';
@@ -57,6 +59,11 @@ class _DeviceTypeListPageState extends State<DeviceTypeListPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -25,6 +25,7 @@ import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart'; import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm; import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:flutter/services.dart';
class WifiPage extends StatefulWidget { class WifiPage extends StatefulWidget {
var type; //为空,首次绑定 不为空,从设备列表进入 var type; //为空,首次绑定 不为空,从设备列表进入
@@ -155,6 +156,11 @@ class _WifiPageState extends State<WifiPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
@@ -798,11 +804,6 @@ class _WifiPageState extends State<WifiPage> {
arguments: 1); arguments: 1);
}); });
} else if (aa == 'unknown') { } else if (aa == 'unknown') {
// TopSlideNotification.show(
// context,
// text: "获取设备网络类型失败".tr,
// textColor: themeController.currentColor.sc9,
// );
blueteethBindController blueteethBindController
.netType.value = 3; .netType.value = 3;
blueteethBindController.updateAll(); blueteethBindController.updateAll();
@@ -1185,162 +1186,6 @@ class _WifiPageState extends State<WifiPage> {
} }
} }
// Future<void> dealWifi(String mac) async {
// final blueteethBindController = Get.find<BlueteethBindController>();
// final themeController = Get.find<ThemeController>();
// // 显示加载对话框
// // showLoadingDialog(Get.context!, title: "连接中...".tr);
// // 设置超时定时器
// Timer? timeoutTimer;
// bool isConnected = false;
// try {
// // 开始扫描蓝牙设备
// await FlutterBluePlus.startScan(timeout: Duration(seconds: 10));
// // 设置超时20秒
// timeoutTimer = Timer(Duration(seconds: 20), () {
// try {
// if (!isConnected) {
// blueteethBindController.blueConnectFlag.value = 1;
// blueteethBindController.updateAll();
// // Navigator.of(context).pop(); // 先关闭 dialog
// WidgetsBinding.instance.addPostFrameCallback((_) {
// TopSlideNotification.show(
// context,
// text: "设备连接超时,请重试".tr,
// textColor: themeController.currentColor.sc9,
// );
// });
// FlutterBluePlus.stopScan();
// }
// } catch (e) {
// print(e);
// }
// });
// // 监听扫描结果
// StreamSubscription<List<ScanResult>>? scanSubscription;
// scanSubscription = FlutterBluePlus.scanResults.listen((results) async {
// // 过滤出符合条件的设备
// ScanResult? targetDevice;
// for (var r in results) {
// if (r.advertisementData.manufacturerData.containsKey(0xFFED)) {
// List<int> rawData = r.advertisementData.manufacturerData[0xFFED]!;
// BleDeviceData deviceData = parseBleData(rawData);
// String deviceMac =
// deviceData.deviceId.replaceAll(':', '').toLowerCase();
// if (deviceMac == mac.toLowerCase()) {
// targetDevice = r;
// break;
// }
// }
// }
// if (targetDevice != null && !isConnected) {
// isConnected = true;
// FlutterBluePlus.stopScan();
// scanSubscription?.cancel();
// timeoutTimer?.cancel();
// try {
// // 连接设备
// // await targetDevice.device.connect();
// THapp bledevice = THapp(device: targetDevice.device);
// await bledevice.device.connect();
// var res2 = bledevice.isConnected;
// if (res2) {
// // Navigator.pop(context);
// blueteethBindController.blueConnectFlag.value = 2;
// TopSlideNotification.show(
// context,
// text: "蓝牙绑定.连接成功".tr,
// textColor: themeController.currentColor.sc2,
// );
// blueteethBindController.currentDevice = bledevice;
// if (lisObj != null) {
// lisObj!.cancel();
// }
// var aa;
// lisObj = blueteethBindController.currentDevice!.statusStream
// .listen((onData) async {
// if (onData.status == BleEventType.recvLineLog) {
// final line = onData.val;
// print("[bleee]:" + line);
// }
// if (onData.status == BleEventType.ready) {
// aa = await getDeviceNetVersion(
// blueteethBindController.currentDevice!, 0);
// if (aa == "4g") {
// // TopSlideNotification.show(
// // Get.context!,
// // text: "4g设备配置wifi提示".tr,
// // textColor: themeController.currentColor.sc9,
// // );
// updateDeviceBindStatus(
// blueteethBindController.currentDeviceMac!.value);
// WidgetsBinding.instance.addPostFrameCallback((_) {
// TopSlideNotification.show(
// context,
// text: "4g设备配置wifi提示".tr,
// textColor: themeController.currentColor.sc9,
// );
// Get.back();
// });
// return;
// } else if (aa == 'unknown') {
// blueteethBindController.netType.value = 3;
// blueteethBindController.updateAll();
// WidgetsBinding.instance.addPostFrameCallback((_) {
// TopSlideNotification.show(
// context,
// text: "获取设备网络类型失败".tr,
// textColor: themeController.currentColor.sc9,
// );
// });
// } else {
// await initWifiStatusAndWifiList();
// }
// }
// });
// } else {
// // Navigator.pop(context);
// TopSlideNotification.show(
// context,
// text: "蓝牙绑定.连接失败".tr,
// textColor: themeController.currentColor.sc9,
// );
// }
// } catch (e) {
// // Navigator.of(Get.context!).pop(); // 关闭加载对话框
// TopSlideNotification.show(
// Get.context!,
// text: "设备连接失败".tr,
// textColor: themeController.currentColor.sc9,
// );
// }
// }
// });
// // 等待扫描完成
// await Future.delayed(Duration(seconds: 20));
// } catch (e) {
// timeoutTimer?.cancel();
// Navigator.of(Get.context!).pop(); // 关闭加载对话框
// TopSlideNotification.show(
// Get.context!,
// text: "扫描过程中发生错误".tr,
// textColor: themeController.currentColor.sc9,
// );
// } finally {
// timeoutTimer?.cancel();
// await FlutterBluePlus.stopScan();
// }
// }
Future<void> dealWifi(String mac, Future<void> dealWifi(String mac,
{bool needTip = true, bool needSuccess = false}) async { {bool needTip = true, bool needSuccess = false}) async {
if (dealing) { if (dealing) {

View File

@@ -25,6 +25,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/model/BleDeviceData.dart'; import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart'; import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:flutter/services.dart';
class WifiPagePerson extends StatefulWidget { class WifiPagePerson extends StatefulWidget {
var type; var type;
@@ -100,6 +101,11 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),

View File

@@ -31,6 +31,11 @@ class LogoutPage extends GetView {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),

View File

@@ -21,9 +21,11 @@ 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/enum/APPPackageType.dart';
import 'package:vbvs_app/main.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;
import 'package:flutter/services.dart';
class OtherLoginPage extends StatefulWidget { class OtherLoginPage extends StatefulWidget {
const OtherLoginPage({super.key}); const OtherLoginPage({super.key});
@@ -143,6 +145,11 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
// backgroundColor: themeController.currentColor.sc17, // backgroundColor: themeController.currentColor.sc17,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
@@ -710,7 +717,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
themeController.currentColor.sc9, themeController.currentColor.sc9,
); );
} else { } else {
// await dealBindProcess(); await dealBindProcess();
CountdownController countdownController = CountdownController countdownController =
Get.find(); Get.find();
countdownController.countdown.value = 0; countdownController.countdown.value = 0;

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/mh_page/user/controller/bind_tel_controller.dart'; import 'package:vbvs_app/pages/mh_page/user/controller/bind_tel_controller.dart';
import 'package:vbvs_app/pages/person/select_time.dart'; import 'package:vbvs_app/pages/person/select_time.dart';
import 'package:flutter/services.dart';
class THBindTelWidget extends GetView<AuthBindTelController> { class THBindTelWidget extends GetView<AuthBindTelController> {
BoxConstraints? bodysize; BoxConstraints? bodysize;
@@ -45,6 +46,11 @@ class THBindTelWidget extends GetView<AuthBindTelController> {
key: scaffoldKey, key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),

View File

@@ -17,6 +17,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/enum/APPPackageType.dart'; import 'package:vbvs_app/enum/APPPackageType.dart';
import 'package:vbvs_app/enum/LoginStatus.dart'; import 'package:vbvs_app/enum/LoginStatus.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:flutter/services.dart';
//在线使用 //在线使用
class EPage extends StatefulWidget { class EPage extends StatefulWidget {
@@ -70,6 +71,11 @@ class _EPageState extends State<EPage> with AutomaticKeepAliveClientMixin {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),

View File

@@ -233,7 +233,7 @@ class _EPageState extends State<EPage> with AutomaticKeepAliveClientMixin {
return LayoutBuilder( return LayoutBuilder(
builder: (context, bodySize) => GestureDetector( builder: (context, bodySize) => GestureDetector(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage(getBackgroundImageNoImage()), image: AssetImage(getBackgroundImageNoImage()),
fit: BoxFit.fill, fit: BoxFit.fill,
@@ -242,6 +242,11 @@ class _EPageState extends State<EPage> with AutomaticKeepAliveClientMixin {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),

View File

@@ -4,6 +4,7 @@ import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/WebViewWidget.dart'; import 'package:vbvs_app/component/tool/WebViewWidget.dart';
import 'package:flutter/services.dart';
class FollowPage extends StatefulWidget { class FollowPage extends StatefulWidget {
late MyWebView webView; late MyWebView webView;
@@ -47,6 +48,11 @@ class _FollowPageState extends State<FollowPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc5, backgroundColor: themeController.currentColor.sc5,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -4,6 +4,7 @@ import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/WebViewWidget.dart'; import 'package:vbvs_app/component/tool/WebViewWidget.dart';
import 'package:flutter/services.dart';
class HelpPage extends StatefulWidget { class HelpPage extends StatefulWidget {
String url; String url;
@@ -47,6 +48,11 @@ class _HelpPageState extends State<HelpPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -94,35 +94,35 @@ class _HomePageState extends State<HomePage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 11.rpx), SizedBox(height: 11.rpx),
// ClickableContainer( ClickableContainer(
// padding: EdgeInsets.symmetric(vertical: 10.rpx), padding: EdgeInsets.symmetric(vertical: 10.rpx),
// backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
// highlightColor: highlightColor:
// themeController.currentColor.sc16.withOpacity(0.1), themeController.currentColor.sc16.withOpacity(0.1),
// borderRadius: 0.rpx, borderRadius: 0.rpx,
// onTap: () { onTap: () {
// _popupEntry?.remove(); _popupEntry?.remove();
// _popupEntry = null; _popupEntry = null;
// TopSlideNotification.show( // TopSlideNotification.show(
// context, // context,
// text: "待开发功能".tr, // text: "待开发功能".tr,
// ); // );
// }, Get.toNamed("/qrView");
// child: Container( },
// width: double.infinity, child: Container(
// child: Center( width: double.infinity,
// child: Text( child: Center(
// '扫一扫.标题'.tr, child: Text(
// style: TextStyle( '扫一扫.标题'.tr,
// fontSize: AppConstants().normal_text_fontSize, style: TextStyle(
// color: themeController.currentColor.sc3, fontSize: AppConstants().normal_text_fontSize,
// ), color: themeController.currentColor.sc3,
// ), ),
// ), ),
// ), ),
// ), ),
// SizedBox(height: 35.rpx), ),
SizedBox(height: 35.rpx),
ClickableContainer( ClickableContainer(
padding: EdgeInsets.symmetric(vertical: 10.rpx), padding: EdgeInsets.symmetric(vertical: 10.rpx),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@@ -585,23 +585,23 @@ class _HomePageState extends State<HomePage> {
borderRadius: AppConstants() borderRadius: AppConstants()
.button_container_radius, // 圆角半径 .button_container_radius, // 圆角半径
onTap: () { onTap: () {
// Get.toNamed("/qrView"); Get.toNamed("/qrView");
if (userInfoController.model.login == // if (userInfoController.model.login ==
LoginStatus.LOGIN.code) { // LoginStatus.LOGIN.code) {
// Get.toNamed("/deviceType"); // // Get.toNamed("/deviceType");
TopSlideNotification.show( // TopSlideNotification.show(
context, // context,
text: "待开发功能".tr, // text: "待开发功能".tr,
); // );
} else { // } else {
TopSlideNotification.show( // TopSlideNotification.show(
context, // context,
text: "必须登录提示".tr, // text: "必须登录提示".tr,
textColor: themeController // textColor: themeController
.currentColor.sc9, // .currentColor.sc9,
); // );
Get.toNamed("/loginPage"); // Get.toNamed("/loginPage");
} // }
}, },
colors: [ colors: [
// 渐变色 // 渐变色
@@ -1042,6 +1042,7 @@ class _HomePageState extends State<HomePage> {
return Expanded( return Expanded(
child: Center( child: Center(
child: CircularProgressIndicator( child: CircularProgressIndicator(
strokeWidth: 2,
color: themeController.currentColor.sc1, color: themeController.currentColor.sc1,
)), )),
// child: Column( // child: Column(
@@ -1355,8 +1356,12 @@ class _HomePageState extends State<HomePage> {
method: MyHttpMethod.put, method: MyHttpMethod.put,
queryUrl: queryUrl, queryUrl: queryUrl,
data: data, data: data,
onSuccess: (res) {}, onSuccess: (res) {
onFailure: (res) {}, ef.log("更新绑定流程成功");
},
onFailure: (res) {
ef.log("更新绑定流程失败");
},
); );
}, },
onFailure: (res) {}, onFailure: (res) {},

View File

@@ -101,7 +101,7 @@ class _MessagePageState extends State<MessagePage> {
builder: (context, boxConstraints) => GestureDetector( builder: (context, boxConstraints) => GestureDetector(
// onTap: () => FocusScope.of(context).unfocus(),, // onTap: () => FocusScope.of(context).unfocus(),,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage(getBackgroundImageNoImage()), image: AssetImage(getBackgroundImageNoImage()),
fit: BoxFit.fill, fit: BoxFit.fill,
@@ -109,6 +109,11 @@ class _MessagePageState extends State<MessagePage> {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
// backgroundColor: themeController.currentColor.sc17, // backgroundColor: themeController.currentColor.sc17,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -91,7 +91,7 @@ class _MessageReturnPageState extends State<MessageReturnPage> {
builder: (context, boxConstraints) => GestureDetector( builder: (context, boxConstraints) => GestureDetector(
// onTap: () => FocusScope.of(context).unfocus(),, // onTap: () => FocusScope.of(context).unfocus(),,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage(getBackgroundImageNoImage()), image: AssetImage(getBackgroundImageNoImage()),
fit: BoxFit.fill, fit: BoxFit.fill,
@@ -99,6 +99,11 @@ class _MessageReturnPageState extends State<MessageReturnPage> {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17, backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -537,8 +537,6 @@ class XiaoeController extends GetControllerEx<XiaoeModel> {
ef.log('开始运行小e Web应用...'); ef.log('开始运行小e Web应用...');
await web.runApp('xiaoe').then((x) { await web.runApp('xiaoe').then((x) {
ef.log('web.runApp 执行完成,结果: $x'); ef.log('web.runApp 执行完成,结果: $x');
ready.value = true; ready.value = true;
@@ -751,6 +749,7 @@ class XiaoeView extends GetComponent<XiaoeController> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
CircularProgressIndicator( CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
Colors.white), Colors.white),
), ),

View File

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:flutter/services.dart';
class BackMovementPage extends StatefulWidget { class BackMovementPage extends StatefulWidget {
const BackMovementPage({super.key}); const BackMovementPage({super.key});
@@ -28,6 +29,11 @@ class _BackMovementPageState extends State<BackMovementPage> {
child: Container( child: Container(
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: const Color(0xFF011C33), // 统一背景色 backgroundColor: const Color(0xFF011C33), // 统一背景色
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
@@ -209,7 +215,7 @@ class _BackMovementPageState extends State<BackMovementPage> {
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
), ),
), ),
child: Text('恢复到默认设置'.tr), child: Text('恢复到默认设置'.tr),
), ),
), ),
], ],

View File

@@ -2,17 +2,15 @@ import 'dart:async';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutter/services.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/ServiceConstant.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/common/util/requestWithLog.dart'; import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/base/GradientSwitch.dart'; import 'package:vbvs_app/component/base/GradientSwitch.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/message/common_message_setting_controller.dart'; import 'package:vbvs_app/controller/message/common_message_setting_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
class MHTCommonMessageSettingPage extends StatefulWidget { class MHTCommonMessageSettingPage extends StatefulWidget {
MHTCommonMessageSettingPage({super.key}); MHTCommonMessageSettingPage({super.key});
@@ -130,6 +128,11 @@ class _CommonMessageSettingPageState
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -4,6 +4,7 @@ import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:flutter/services.dart';
class HomeDeviceType extends StatefulWidget { class HomeDeviceType extends StatefulWidget {
HomeDeviceType({super.key}); HomeDeviceType({super.key});
@@ -35,6 +36,11 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),

View File

@@ -13,6 +13,7 @@ import 'package:vbvs_app/language/AppLanguage.dart';
import 'package:vbvs_app/pages/device_bind/componnet/FancyCircleCheckbox.dart'; import 'package:vbvs_app/pages/device_bind/componnet/FancyCircleCheckbox.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart'; import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
import 'package:flutter/services.dart';
class LanguagePage extends StatefulWidget { class LanguagePage extends StatefulWidget {
const LanguagePage({super.key}); const LanguagePage({super.key});
@@ -44,6 +45,11 @@ class _LanguagePageState extends State<LanguagePage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -1,4 +1,5 @@
import 'dart:ui'; import 'dart:ui';
import 'dart:io'; // 添加这个导入
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -22,6 +23,18 @@ class _MattressControlPageState extends State<MattressControlPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// 如果是 iOS 平台,使用 PopScope 禁用左滑返回
if (Platform.isIOS) {
return PopScope(
canPop: false, // 禁用返回手势
child: buildContent(),
);
}
return buildContent();
}
// 将原有的 build 内容提取到这个方法中
Widget buildContent() {
return LayoutBuilder( return LayoutBuilder(
builder: (context, bodySize) => GestureDetector( builder: (context, bodySize) => GestureDetector(
child: Obx(() { child: Obx(() {

View File

@@ -50,6 +50,11 @@ class ShareDeviceDetailWidget extends GetView {
key: scaffoldKey, key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
@@ -397,7 +402,6 @@ class ShareDeviceDetailWidget extends GetView {
], ],
), ),
)) ))
]), ]),
), ),
Padding( Padding(
@@ -429,7 +433,6 @@ class ShareDeviceDetailWidget extends GetView {
data['info'][5]['uid'], data['info'][5]['uid'],
data['mac'.tr], data['mac'.tr],
context); context);
}, },
colors: const [ colors: const [
Color(0xFFFCFCFC), Color(0xFFFCFCFC),

View File

@@ -25,6 +25,7 @@ import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/mht_blueteeth_device_page.dart'; import 'package:vbvs_app/pages/mh_page/device/mht_blueteeth_device_page.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:flutter/services.dart';
class VitalSignsSensorPage extends StatefulWidget { class VitalSignsSensorPage extends StatefulWidget {
Map data; Map data;
@@ -82,6 +83,11 @@ class _VitalSignsSensorState extends State<VitalSignsSensorPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -4,6 +4,7 @@ import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/WebViewWidget.dart'; import 'package:vbvs_app/component/tool/WebViewWidget.dart';
import 'package:flutter/services.dart';
class MhAboutUsPage extends StatefulWidget { class MhAboutUsPage extends StatefulWidget {
late MyWebView webView; late MyWebView webView;
@@ -55,6 +56,11 @@ class _MhAboutUsPageState extends State<MhAboutUsPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -1,14 +1,13 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/color/appFontsize.dart'; import 'package:vbvs_app/common/color/appFontsize.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart'; import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
import 'package:vbvs_app/pages/mh_page/address_module_widget.dart'; import 'package:vbvs_app/pages/mh_page/address_module_widget.dart';
class AddressListPage extends GetView<AddressListController> { class AddressListPage extends GetView<AddressListController> {
@@ -35,6 +34,11 @@ class AddressListPage extends GetView<AddressListController> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),

View File

@@ -10,6 +10,7 @@ import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:flutter/services.dart';
class ApplyRepairSuccess extends StatefulWidget { class ApplyRepairSuccess extends StatefulWidget {
const ApplyRepairSuccess({super.key}); const ApplyRepairSuccess({super.key});
@@ -44,6 +45,11 @@ class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -1,5 +1,6 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/ServiceConstant.dart'; import 'package:vbvs_app/common/color/ServiceConstant.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -14,9 +15,7 @@ import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/apply_repair_controller.dart'; import 'package:vbvs_app/controller/mh_controller/apply_repair_controller.dart';
import 'package:vbvs_app/controller/mh_controller/repair_list_controller.dart'; import 'package:vbvs_app/controller/mh_controller/repair_list_controller.dart';
import 'package:vbvs_app/controller/repair/repair_controller.dart';
import 'package:vbvs_app/model/api_response.dart'; import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/mh_page/applyRepair/apply_repair_success.dart';
class ApplyRepairPage extends GetView<ApplyRepairController> { class ApplyRepairPage extends GetView<ApplyRepairController> {
final scaffoldKey = GlobalKey<ScaffoldState>(); final scaffoldKey = GlobalKey<ScaffoldState>();
@@ -58,6 +57,11 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
resizeToAvoidBottomInset: true, // 自动调整页面避免被键盘遮挡 resizeToAvoidBottomInset: true, // 自动调整页面避免被键盘遮挡
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -1,6 +1,6 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
@@ -8,12 +8,10 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart'; import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
import 'package:vbvs_app/model/api_response.dart';
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/device.dart'; import 'package:vbvs_app/pages/mh_page/device/device.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart'; import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
import 'dart:ui' as ui;
class BluetoothPage extends StatefulWidget { class BluetoothPage extends StatefulWidget {
final Map data; final Map data;
@@ -51,6 +49,11 @@ class _BluetoothPageState extends State<BluetoothPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -1,11 +1,11 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/color/appFontsize.dart'; import 'package:vbvs_app/common/color/appFontsize.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/base/THFlutterFlowDropDown.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart'; import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart'; import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
@@ -42,6 +42,11 @@ class BookInfoPage extends GetView<BookInfoController> {
// key: scaffoldKey, // key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),

View File

@@ -1,7 +1,7 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appColors.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
@@ -36,6 +36,11 @@ class BookSuccessPage extends GetView {
// key: scaffoldKey, // key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),

View File

@@ -35,6 +35,11 @@ class DeletedAccountPage extends GetView {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),

View File

@@ -301,9 +301,11 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
data: data, data: data,
onSuccess: (res) { onSuccess: (res) {
resFlag = true; resFlag = true;
EasyDartModule.logger.info("更新睡眠习惯成功: ${res.msg}");
}, },
onFailure: (res) { onFailure: (res) {
resFlag = false; resFlag = false;
EasyDartModule.logger.info("更新睡眠习惯失败: ${res.msg}");
}, },
); );
return resFlag; return resFlag;
@@ -432,47 +434,122 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
} }
//下发wifi指令 //下发wifi指令
sendCommand(Map<String, dynamic> commandData) async { // sendCommand(Map<String, dynamic> commandData) async {
// if (commandData == null || commandData.isEmpty) {
// throw "指令数据不能为空";
// }
// if (commandData['data'] == "FFFFFFFF00031000010014FD") {
// return;
// }
// ef.log("下发指令内容为: ${commandData['data']}");
// commandData['data'] = Base64Tool.encode(commandData['data']);
// if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" &&
// Base64Tool.decode(commandData['data']).length <= 24) {
// ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
// } else {
// // ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
// }
// ef.log("全部指令");
// ef.log("wifi指令控制下发时间-->${DateTime.now()}");
// commandData['wfr'] = true; //是否等待响应 true: 等待 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}");
// EasyDartModule.logger.info("下发wifi控制指令成功: $res");
// },
// onFailure: (res) {
// ef.log("下发指令失败: ${res.msg}");
// EasyDartModule.logger.info("下发wifi控制指令失败: $res");
// throw "下发wifi控制指令失败: ${res.msg}";
// },
// );
// await Future.delayed(Duration(milliseconds: 100));
// }
//下发wifi指令
Future<void> sendCommand(Map<String, dynamic> commandData,
{int maxRetryCount = 3}) async {
if (commandData == null || commandData.isEmpty) { if (commandData == null || commandData.isEmpty) {
throw "指令数据不能为空"; throw Exception("指令数据不能为空");
} }
if (commandData['data'] == "FFFFFFFF00031000010014FD") { if (commandData['data'] == "FFFFFFFF00031000010014FD") {
return; return;
} }
ef.log("下发指令内容为: ${commandData['data']}");
// ef.log("下发指令内容为: ${commandData['data']}");
commandData['data'] = Base64Tool.encode(commandData['data']); commandData['data'] = Base64Tool.encode(commandData['data']);
if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" && if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" &&
Base64Tool.decode(commandData['data']).length <= 24) { Base64Tool.decode(commandData['data']).length <= 24) {
ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
} else {
// ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}"); // ef.log("下发指令: ${Base64Tool.decode(commandData['data'])}");
} }
ef.log("全部指令"); ef.log("全部指令");
ef.log("wifi指令控制下发时间-->${DateTime.now()}"); EasyDartModule.logger.info(
commandData['wfr'] = false; "设备mac${commandData['mac']}" + "wifi指令控制下发时间-->${DateTime.now()}");
commandData['wfr'] = true; //是否等待响应 true: 等待 false:不等待(默认)
commandData['type'] = 0; //0 base64数据 1 二进制数据 commandData['type'] = 0; //0 base64数据 1 二进制数据
String serviceAddress = ServiceConstant.service_address; String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service; String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.sendWifiCommand; String serviceApi = ServiceConstant.sendWifiCommand;
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}"; String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
await requestWithLog(
logTitle: "下发wifi控制指令",
method: MyHttpMethod.post,
queryUrl: queryUrl,
data: commandData,
onSuccess: (res) {
ef.log("下发指令成功: ${res.msg}");
EasyDartModule.logger.info("下发wifi控制指令成功: $res");
},
onFailure: (res) {
ef.log("下发指令失败: ${res.msg}");
EasyDartModule.logger.info("下发wifi控制指令失败: $res");
throw "下发wifi控制指令失败: ${res.msg}";
},
);
await Future.delayed(Duration(milliseconds: 100));
}
int retryCount = 0;
bool success = false;
dynamic lastError;
while (retryCount < maxRetryCount && !success) {
try {
if (retryCount > 0) {
ef.log("$retryCount 次重试下发wifi控制指令");
await Future.delayed(
Duration(milliseconds: 500 * retryCount)); // 递增延迟
}
ef.log("下发指令时间: ");
await requestWithLog(
logTitle:
"下发wifi控制指令${retryCount > 0 ? '(重试 $retryCount/$maxRetryCount)' : ''}",
method: MyHttpMethod.post,
queryUrl: queryUrl,
data: commandData,
onSuccess: (res) {
ef.log("下发指令成功: ${res.msg}");
EasyDartModule.logger.info("下发wifi控制指令成功: $res");
success = true;
},
onFailure: (res) {
ef.log("下发指令失败: ${res.msg}");
EasyDartModule.logger.info("下发wifi控制指令失败: $res");
lastError = "下发wifi控制指令失败: ${res.msg}";
throw Exception(lastError); // 抛出异常触发重试
},
);
await Future.delayed(Duration(milliseconds: 100));
} catch (e) {
lastError = e;
retryCount++;
if (retryCount >= maxRetryCount) {
ef.log("下发wifi控制指令失败已重试 $maxRetryCount");
EasyDartModule.logger.info("下发wifi控制指令失败已重试 $maxRetryCount 次: $e");
DailyLogUtils.writeLog("下发wifi控制指令失败已重试 $maxRetryCount 次: $e");
throw Exception("下发wifi控制指令失败已重试 $maxRetryCount 次: ${e.toString()}");
} else {
ef.log("下发wifi控制指令失败准备第 $retryCount 次重试");
}
}
}
}
//todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯 //todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯
} }
@@ -492,641 +569,3 @@ void safeShowNotification(String msg) {
// print("TopSlideNotification 显示异常: $e\n$stack"); // print("TopSlideNotification 显示异常: $e\n$stack");
} }
} }
// import 'dart:async';
// import 'dart:convert';
// import 'package:EasyDartModule/EasyDartModule.dart';
// import 'package:easydevice/src/app/thapp.dart';
// import 'package:ef/ef.dart';
// import 'package:flutter/src/widgets/framework.dart';
// import 'package:json_annotation/json_annotation.dart';
// import 'package:vbvs_app/common/color/ServiceConstant.dart';
// import 'package:vbvs_app/common/color/app_uri_status.dart';
// import 'package:vbvs_app/common/util/DailyLogUtils.dart';
// import 'package:vbvs_app/common/util/FirmwareVersionService.dart';
// import 'package:vbvs_app/common/util/MyUtils.dart';
// import 'package:vbvs_app/common/util/base64Tool.dart';
// import 'package:vbvs_app/common/util/requestWithLog.dart';
// import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
// import 'package:vbvs_app/model/api_response.dart';
// import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
// import 'package:vbvs_app/pages/mh_page/user/controller/mht_register_controller.dart';
// part 'mht_bluetooth_controller.g.dart';
// @JsonSerializable()
// class MHTBlueToothModel {
// bool? bluetooth = false; //蓝牙开关
// double? singal = -100;
// @JsonKey(ignore: true)
// List<BlueToothDataModel>? blueRawData = []; //蓝牙原始数据
// @JsonKey(ignore: true)
// List<BlueToothDataModel>? deviceDataStatus; //已经请求过状态的数据
// int? read = 0;
// int? deviceType; //绑定设备类型
// bool wifiPassShow = false;
// String? wifiPass;
// MHTBlueToothModel();
// static MHTBlueToothModel fromJson(Map<String, dynamic> json) =>
// _$MHTBlueToothModelFromJson(json);
// Map<String, dynamic> toJson() => _$MHTBlueToothModelToJson(this);
// }
// class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
// MHTBlueToothController() {
// attr = GetModel(MHTBlueToothModel()).obs;
// }
// Timer? _statusTimer;
// MHTRegisterController registerController = Get.find();
// RxString search = "".obs;
// RxString currentDeviceMac = "".obs; //当前正在绑定的设备用来显示loading
// THapp? currentDevice; //当前连接的设备
// BlueToothDataModel? currentFullDevice; //当前连接的设备
// RxInt blueConnectFlag = 0.obs; //当前蓝牙连接状态 0.正在连接 1.未连接 2.已连接
// RxBool bluetoothStatus = false.obs; //蓝牙开启状态
// RxInt connectStatus = 0.obs; //当前wifi连接状态 0未连接 1已连接
// RxInt netType = 0.obs; //当前网络类型 0.正在检测 1.wifi 2.4g设备 3.未知
// RxInt wifiConnectStatus = 1.obs; //获取wifi状态 0.正在检测 1.已检测完
// RxMap selectWifi = {}.obs; //正在连接wifi信息
// int returnPage = 0; //0返回首页 1.返回设备列表
// RxInt wifiStatus = 0.obs; //wifi连接状态 0未连接 1已连接
// RxList wifiList = [].obs;
// RxMap connect_wifi = {}.obs;
// RxString? cid = "".obs;
// RxBool isScanning = false.obs;
// RxMap<String, Map> localUpgradeMac = <String, Map>{}.obs; //mac 进度
// String? currentUpgradeVersion; //最新版本号
// String? currentUpgradeName; //最新固件名
// String? currentUpgradeUrl; //最新固件下载地址
// List<FirmwareVersionInfo> firmwareList = []; //固件版本列表
// RxBool allSelect = false.obs; //升级是否全选
// RxBool autoUpgrade = false.obs; //是否自动升级
// // wifi下发指令队列相关
// final List<Map<String, dynamic>> _commandQueue = []; // 指令队列
// bool _isSendingCommand = false; // 是否正在发送指令
// Timer? _commandTimeoutTimer; // 指令超时定时器
// int _currentRetryCount = 0; // 当前重试次数
// Map<String, dynamic>? _currentCommand; // 当前正在发送的指令
// // 最大重试次数
// static const int _maxRetryCount = 3;
// // 超时时间(秒)
// static const int _commandTimeoutSeconds = 10;
// void startStatusPolling() {
// updateDeviceStatus().then((res) {
// if (res.code == HttpStatusCodes.ok) {
// updateAll();
// } else {
// safeShowNotification(res.msg ?? "获取设备状态异常".tr);
// EasyDartModule.logger.info("获取设备状态异常: $res");
// DailyLogUtils.writeLog("获取设备状态异常: $res");
// }
// });
// if (_statusTimer == null) {
// _statusTimer = Timer.periodic(Duration(seconds: 2), (timer) {
// updateDeviceStatus().then((res) {
// if (res.code == HttpStatusCodes.ok) {
// updateAll();
// } else {
// safeShowNotification(res.msg ?? "获取设备状态异常".tr);
// EasyDartModule.logger.info("获取设备状态异常: $res");
// DailyLogUtils.writeLog("获取设备状态异常: $res");
// }
// }).catchError((e, stack) {
// print("updateDeviceStatus 执行异常: $e\n$stack");
// safeShowNotification("设备状态请求失败".tr);
// EasyDartModule.logger.info("设备状态异常: $e");
// DailyLogUtils.writeLog("设备状态异常: $e");
// });
// });
// }
// }
// void stopStatusPolling() {
// _statusTimer?.cancel();
// _statusTimer = null;
// }
// var shouldScan = true.obs;
// void pauseScanning() {
// shouldScan.value = false;
// update();
// }
// // 恢复扫描
// void resumeScanning() {
// shouldScan.value = true;
// update();
// }
// Future<ApiResponse> updateDeviceStatus() async {
// try {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.get_bluetooth_device_status;
// String queryUrl = "$serviceAddress$serviceName$serviceApi";
// if (model.blueRawData != null && model.blueRawData!.isNotEmpty) {
// final macParams = model.blueRawData!
// .map((device) =>
// "mac=${Uri.encodeQueryComponent(device.mac!.replaceAll(':', ''))}")
// .join("&");
// if (queryUrl.contains('?')) {
// queryUrl += '&$macParams';
// } else {
// queryUrl += '?$macParams';
// }
// String? language = "";
// if (mhLanguageController.selectLanguage != null) {
// language = mhLanguageController.selectLanguage.value!.language_code;
// }
// if (language != null && language.isNotEmpty) {
// if (queryUrl.contains("?")) {
// queryUrl += "&lang=$language";
// } else {
// queryUrl += "?lang=$language";
// }
// }
// var response = await EasyDartModule.dio.get(queryUrl);
// var responseData =
// response.data is String ? jsonDecode(response.data) : response.data;
// ApiResponse res =
// ApiResponse.fromJson(responseData, (object) => object);
// if (res.code != HttpStatusCodes.ok) return res;
// if (response.data['data'] != null && response.data['data'] is List) {
// List<dynamic> responseList = response.data['data'];
// // 新建一个 Map便于快速通过 mac 查找返回的设备状态
// final Map<String, dynamic> responseMap = {
// for (var item in responseList)
// item['mac'.tr].toString().toUpperCase(): item
// };
// // 遍历 blueRawData更新 bind 状态
// for (var device in model.blueRawData!) {
// final macKey = device.mac!.replaceAll(':', '').toUpperCase();
// if (responseMap.containsKey(macKey)) {
// var item = responseMap[macKey];
// // 更新 device 绑定状态等信息
// device.bind = item['bind'] ?? device.bind;
// device.mac = item['bindMac'] ?? device.mac;
// }
// }
// model.deviceDataStatus =
// List<BlueToothDataModel>.from(model.blueRawData!);
// } else {
// model.deviceDataStatus = [];
// }
// updateAll();
// return res;
// } else {
// model.deviceDataStatus = [];
// return ApiResponse(code: 1, msg: "".tr);
// }
// } catch (e) {
// print("获取设备状态异常: $e");
// EasyDartModule.logger.info("获取设备状态异常: $e");
// DailyLogUtils.writeLog("获取设备状态异常: $e");
// return ApiResponse(code: -1, msg: "请求失败".tr);
// }
// return ApiResponse(code: -1, msg: "未知错误".tr);
// }
// bindDeviceAndMAC(BlueToothDataModel bleDevice, BuildContext context) async {
// try {
// if ((bleDevice.macA == null || bleDevice.macA.isEmpty) &&
// (bleDevice.macB == null || bleDevice.macB.isEmpty)) {
// TopSlideNotification.show(context,
// text: "传感器mac读取失败".tr, textColor: themeController.currentColor.sc9);
// currentDeviceMac.value = "";
// return;
// }
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.device_bind;
// String queryUrl = "$serviceAddress$serviceName$serviceApi";
// var data = {
// "deviceType": model.deviceType,
// "mac".tr: bleDevice.mac,
// "macA": bleDevice.macA,
// if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
// "macB": bleDevice.macB,
// if (bleDevice.name != null && bleDevice.name!.isNotEmpty)
// 'param': {
// 'name': bleDevice.name,
// },
// };
// EasyDartModule.logger.info("绑定传感器数据: $data");
// var response =
// await EasyDartModule.dio.post(queryUrl, data: jsonEncode(data));
// if (response != null) {
// var responseData =
// response.data is String ? jsonDecode(response.data) : response.data;
// ApiResponse res =
// ApiResponse.fromJson(responseData, (object) => object);
// MyUtils.formatResponse(res, "绑定成功".tr, "绑定成功".tr);
// if (res.code == HttpStatusCodes.ok) {
// // PersonController personController = Get.find();
// // personController.currentPersonId.value = res.data['id'];
// //todo 绑定成功需要返回传感器id
// currentDeviceMac.value = "";
// if (res.data != null) {
// if (currentFullDevice != null) {
// currentFullDevice!.macAID = res.data['macA'];
// currentFullDevice!.macBID = res.data['macB'];
// currentFullDevice!.deviceID = res.data['id'];
// }
// }
// return res;
// } else {
// return res;
// }
// } else {
// return ApiResponse(code: -1, msg: "服务器失败".tr);
// }
// } catch (e) {
// EasyDartModule.logger.info("绑定异常: $e");
// DailyLogUtils.writeLog("蓝牙绑定: $e");
// }
// return ApiResponse(code: -1, msg: "未知错误".tr);
// }
// Future<bool> saveHabitData(sleepData) async {
// bool resFlag = false;
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_habit_${sleepData['mac']}";
// String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
// var data = {
// "type": type,
// "mac".tr: sleepData['mac'.tr],
// "time": DateTime.now().millisecondsSinceEpoch,
// "data": sleepData,
// };
// await requestWithLog(
// logTitle: "更新睡眠习惯".tr,
// method: MyHttpMethod.put,
// queryUrl: queryUrl,
// data: data,
// onSuccess: (res) {
// resFlag = true;
// },
// onFailure: (res) {
// resFlag = false;
// },
// );
// return resFlag;
// }
// Future<Map> loadHabitDataApi(String mac, {int time = 3}) async {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_habit_${mac}";
// String queryUrl =
// "${serviceAddress}${serviceName}${serviceApi}?type=${type}";
// // 使用 Future 来等待异步操作完成
// Map<String, dynamic> result = {};
// await requestWithLog(
// logTitle: "更新睡眠习惯".tr,
// method: MyHttpMethod.get,
// queryUrl: queryUrl,
// onSuccess: (res) {
// ef.log("加载睡眠习惯成功: ${res.data}");
// result = res.data; // 将返回的数据存入 result
// },
// onFailure: (res) {
// ef.log("加载睡眠习惯失败: ${res.msg}");
// result = {}; // 如果失败,可以返回空的 Map
// },
// );
// return result; // 在 requestWithLog 完成之后返回 result
// }
// saveJiYiData(sleepData) async {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_jiyi_${sleepData['mac']}";
// String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
// var data = {
// "type": type,
// "mac": sleepData['mac'],
// "time": DateTime.now().millisecondsSinceEpoch,
// "data": sleepData,
// };
// await requestWithLog(
// logTitle: "更新睡眠记忆",
// method: MyHttpMethod.put,
// queryUrl: queryUrl,
// data: data,
// );
// }
// loadJiYiData(String mac, {int time = 3}) async {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_jiyi_${mac}";
// String queryUrl =
// "${serviceAddress}${serviceName}${serviceApi}?type=${type}";
// // 使用 Future 来等待异步操作完成
// Map<String, dynamic> result = {};
// await requestWithLog(
// logTitle: "更新记忆",
// method: MyHttpMethod.get,
// queryUrl: queryUrl,
// onSuccess: (res) {
// ef.log("加载记忆成功: ${res.data}");
// result = res.data; // 将返回的数据存入 result
// },
// onFailure: (res) {
// ef.log("加载记忆失败: ${res.msg}");
// result = {}; // 如果失败,可以返回空的 Map
// },
// );
// return result; // 在 requestWithLog 完成之后返回 result
// }
// saveMattressTimeData(sleepData) async {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_new_time_${sleepData['mac']}";
// String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
// var data = {
// "type": type,
// "mac": sleepData['mac'],
// "time": DateTime.now().millisecondsSinceEpoch,
// "data": sleepData,
// };
// await requestWithLog(
// logTitle: "更新新版倒计时",
// method: MyHttpMethod.put,
// queryUrl: queryUrl,
// data: data,
// );
// }
// loadMattressTimeData(String mac, {int time = 3}) async {
// String serviceAddress = ServiceConstant.service_address;
// String serviceName = ServiceConstant.server_service;
// String serviceApi = ServiceConstant.user_setting;
// String type = "sleep_new_time_${mac}";
// String queryUrl =
// "${serviceAddress}${serviceName}${serviceApi}?type=${type}";
// // 使用 Future 来等待异步操作完成
// Map<String, dynamic> result = {};
// await requestWithLog(
// logTitle: "更新新版倒计时",
// method: MyHttpMethod.get,
// queryUrl: queryUrl,
// onSuccess: (res) {
// ef.log("更新新版倒计时成功: ${res.data}");
// result = res.data; // 将返回的数据存入 result
// },
// onFailure: (res) {
// ef.log("更新新版倒计时失败: ${res.msg}");
// result = {}; // 如果失败,可以返回空的 Map
// },
// );
// return result; // 在 requestWithLog 完成之后返回 result
// }
// // 修改后的下发wifi指令方法带队列、重试和超时机制
// void sendCommand(Map<String, dynamic> commandData) {
// if (commandData == null || commandData.isEmpty) {
// throw "指令数据不能为空";
// }
// // 忽略特定的空指令
// if (commandData['data'] == "FFFFFFFF00031000010014FD") {
// return;
// }
// // 将指令添加到队列
// _commandQueue.add(commandData);
// ef.log("指令已加入队列,当前队列长度: ${_commandQueue.length}");
// // 如果没有正在发送的指令,开始处理队列
// if (!_isSendingCommand) {
// _processNextCommand();
// }
// }
// // 处理下一条指令
// void _processNextCommand() {
// if (_commandQueue.isEmpty) {
// _isSendingCommand = false;
// _currentCommand = null;
// return;
// }
// _isSendingCommand = true;
// _currentRetryCount = 0;
// _currentCommand = _commandQueue.removeAt(0);
// _sendCommandWithRetry();
// }
// // 带重试机制的指令发送
// void _sendCommandWithRetry() {
// if (_currentCommand == null) return;
// ef.log(
// "开始发送指令,第 ${_currentRetryCount + 1} 次尝试,指令内容: ${_currentCommand!['data']}");
// // 设置超时定时器
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = Timer(Duration(seconds: _commandTimeoutSeconds), () {
// _handleCommandTimeout();
// });
// // 复制指令数据,避免修改原始数据
// Map<String, dynamic> commandToSend = Map.from(_currentCommand!);
// // 调用原有的发送逻辑
// _executeSendCommand(commandToSend);
// }
// // 执行实际的指令发送
// void _executeSendCommand(Map<String, dynamic> commandData) async {
// ef.log("下发指令内容为: ${commandData['data']}");
// // Base64编码处理
// commandData['data'] = Base64Tool.encode(commandData['data']);
// // 调试日志
// if (Base64Tool.decode(commandData['data']) != "FFFFFFFF00031000010014FD" &&
// Base64Tool.decode(commandData['data']).length <= 24) {
// 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}";
// ef.log("wifi指令控制下发时间-->${DateTime.now()}");
// try {
// await requestWithLog(
// logTitle: "下发wifi控制指令",
// method: MyHttpMethod.post,
// queryUrl: queryUrl,
// data: commandData,
// onSuccess: (res) {
// // 取消超时定时器
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = null;
// ef.log("下发指令成功: ${res.msg}");
// EasyDartModule.logger.info("下发wifi控制指令成功: $res");
// // 指令发送成功,但还需要等待设备回复
// // 注意:需要在收到设备回复时调用 onCommandResponse(true)
// // 如果设备回复通过其他方式通知,则在这里不处理,等待回调
// },
// onFailure: (res) {
// // 取消超时定时器
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = null;
// ef.log("下发指令失败: ${res.msg}");
// EasyDartModule.logger.info("下发wifi指令控制失败: ${res.msg}");
// // 处理失败,进行重试
// _handleCommandFailure("下发指令失败: ${res.msg}");
// },
// );
// } catch (e) {
// // 捕获未知异常
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = null;
// ef.log("下发指令异常: $e");
// EasyDartModule.logger.info("下发wifi控制指令异常: $e");
// _handleCommandFailure("下发指令异常: $e");
// }
// }
// // 处理指令超时
// void _handleCommandTimeout() {
// ef.log("指令发送超时");
// EasyDartModule.logger.info("指令发送超时");
// _commandTimeoutTimer = null;
// _handleCommandFailure("指令发送超时");
// }
// // 处理指令失败(重试逻辑)
// void _handleCommandFailure(String error) {
// _currentRetryCount++;
// if (_currentRetryCount < _maxRetryCount) {
// // 未达到最大重试次数,继续重试
// ef.log("指令失败,准备第 ${_currentRetryCount + 1} 次重试,失败原因: $error");
// _sendCommandWithRetry();
// } else {
// // 已达到最大重试次数,放弃当前指令,处理下一条
// ef.log("指令重试已达最大次数,放弃当前指令,失败原因: $error");
// EasyDartModule.logger.info("指令发送失败,已重试 $_maxRetryCount 次: $error");
// // 可以在这里显示错误通知
// safeShowNotification("指令发送失败: $error");
// // 继续处理下一条指令
// _processNextCommand();
// }
// }
// // 设备回复回调(需要在收到设备回复时调用此方法)
// void onCommandResponse(bool success, {String? error}) {
// if (!_isSendingCommand || _currentCommand == null) {
// ef.log("收到设备回复,但当前没有正在发送的指令");
// return;
// }
// // 取消超时定时器
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = null;
// if (success) {
// ef.log("设备回复成功,继续发送下一条指令");
// // 指令成功,重置重试计数,处理下一条
// _currentRetryCount = 0;
// _processNextCommand();
// } else {
// ef.log("设备回复失败: $error");
// // 设备回复失败,按失败处理(进行重试)
// _handleCommandFailure(error ?? "设备回复失败");
// }
// }
// // 清空指令队列(可用于页面退出时)
// void clearCommandQueue() {
// _commandQueue.clear();
// _commandTimeoutTimer?.cancel();
// _commandTimeoutTimer = null;
// _isSendingCommand = false;
// _currentCommand = null;
// _currentRetryCount = 0;
// ef.log("指令队列已清空");
// }
// //todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯
// }
// void safeShowNotification(String msg) {
// try {
// final ctx = Get.context;
// if (ctx != null && ctx.mounted) {
// TopSlideNotification.show(
// ctx,
// text: msg,
// textColor: themeController.currentColor.sc9,
// );
// } else {
// print("TopSlideNotification 未显示context 不可用或未挂载".tr);
// }
// } catch (e, stack) {
// // print("TopSlideNotification 显示异常: $e\n$stack");
// }
// }

View File

@@ -1,16 +1,14 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.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/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart'; import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart'; import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart'; import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/model/api_response.dart';
class DeviceMaintain extends StatefulWidget { class DeviceMaintain extends StatefulWidget {
@override @override
@@ -40,6 +38,11 @@ class _DeviceMaintainState extends State<DeviceMaintain> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
titleSpacing: 0, titleSpacing: 0,

View File

@@ -1,5 +1,6 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
@@ -10,13 +11,9 @@ import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/CustomCard.dart'; import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
import 'package:vbvs_app/controller/device/body_device_controller.dart';
import 'package:vbvs_app/controller/home/home_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/person/person_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart'; import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
@@ -53,6 +50,11 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -1,5 +1,6 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:vbvs_app/common/color/app_uri_status.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/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
@@ -61,6 +62,11 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, // 加上这一行 backgroundColor: Colors.transparent, // 加上这一行
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
// backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -23,6 +23,7 @@ import 'package:vbvs_app/pages/mh_page/device/component/DeviceComponentWidget.da
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:vbvs_app/pages/mh_page/searchWidget.dart'; import 'package:vbvs_app/pages/mh_page/searchWidget.dart';
import 'package:flutter/services.dart';
class MHTBlueteethDevicePage extends StatefulWidget { class MHTBlueteethDevicePage extends StatefulWidget {
var deviceType; var deviceType;
@@ -63,18 +64,22 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
mhtBlueToothController.startStatusPolling(); mhtBlueToothController.startStatusPolling();
mhtBlueToothController.search.value = ""; mhtBlueToothController.search.value = "";
mhtBlueToothController.currentDeviceMac?.value = ""; mhtBlueToothController.currentDeviceMac?.value = "";
BluetoothHelper.listenBluetoothState((isOn) { BluetoothHelper.listenBluetoothState((isOn) async {
mhtBlueToothController.model.bluetooth = isOn; mhtBlueToothController.model.bluetooth = isOn;
mhtBlueToothController.updateAll(); mhtBlueToothController.updateAll();
if (!isOn && !_isDialogShowing) { if (!isOn && !_isDialogShowing) {
_isDialogShowing = true; await Future.delayed(Duration(seconds: 2));
mhtBlueToothController.model.blueRawData = []; bool isReallyOn = await FlutterBluePlus.isOn;
mhtBlueToothController.model.deviceDataStatus = []; if (!isReallyOn) {
mhtBlueToothController.updateAll(); _isDialogShowing = true;
_showBluetoothNotEnabledDialog().then((_) { mhtBlueToothController.model.blueRawData = [];
_isDialogShowing = false; mhtBlueToothController.model.deviceDataStatus = [];
}); mhtBlueToothController.updateAll();
_showBluetoothNotEnabledDialog().then((_) {
_isDialogShowing = false;
});
}
} }
}); });
} }
@@ -400,6 +405,11 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.d
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart'; import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:flutter/services.dart';
class MHTCalibrationPageCopy extends StatefulWidget { class MHTCalibrationPageCopy extends StatefulWidget {
MHTCalibrationPageCopy({super.key}); MHTCalibrationPageCopy({super.key});
@@ -75,6 +76,11 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:

View File

@@ -18,6 +18,7 @@ import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:flutter/services.dart';
class MHTCalibrationPage extends StatefulWidget { class MHTCalibrationPage extends StatefulWidget {
BlueToothDataModel deviceInfo; BlueToothDataModel deviceInfo;
@@ -86,6 +87,11 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/pages/device_bind/componnet/CalibrationProgressWidget.d
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart'; import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/component/mht_device_calibration_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:flutter/services.dart';
class MHTCalibrationAfterPage extends StatefulWidget { class MHTCalibrationAfterPage extends StatefulWidget {
var deviceInfo; var deviceInfo;
@@ -90,6 +91,11 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: iconTheme:

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controlle
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart'; import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
import 'package:vbvs_app/pages/person/select_city.dart'; import 'package:vbvs_app/pages/person/select_city.dart';
import 'package:vbvs_app/pages/person/select_disease.dart'; // 导入疾病选择 import 'package:vbvs_app/pages/person/select_disease.dart'; // 导入疾病选择
import 'package:flutter/services.dart';
//保存人员信息 //保存人员信息
class MHTPeopleInfoPage extends StatefulWidget { class MHTPeopleInfoPage extends StatefulWidget {
@@ -299,6 +300,11 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
elevation: 0, elevation: 0,
surfaceTintColor: Colors.transparent, surfaceTintColor: Colors.transparent,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,

View File

@@ -27,6 +27,7 @@ import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm; import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:flutter/services.dart';
class MHTWifiPage extends StatefulWidget { class MHTWifiPage extends StatefulWidget {
BlueToothDataModel deviceInfo; BlueToothDataModel deviceInfo;
@@ -152,6 +153,11 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
@@ -1254,6 +1260,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
text: "获取设备网络类型失败".tr, text: "获取设备网络类型失败".tr,
textColor: themeController.currentColor.sc9, textColor: themeController.currentColor.sc9,
); );
await initWifiStatusAndWifiList(needSuccess: needSuccess);
} else { } else {
blueteethBindController.netType.value = 1; blueteethBindController.netType.value = 1;
blueteethBindController.updateAll(); blueteethBindController.updateAll();

View File

@@ -24,6 +24,7 @@ import 'package:vbvs_app/model/BleDeviceData.dart';
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart'; import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart'; import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm; import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:flutter/services.dart';
class MHTWifiAfterPage extends StatefulWidget { class MHTWifiAfterPage extends StatefulWidget {
var deviceInfo; var deviceInfo;
@@ -133,6 +134,11 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
@@ -1212,6 +1218,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
text: "获取设备网络类型失败".tr, text: "获取设备网络类型失败".tr,
textColor: themeController.currentColor.sc9, textColor: themeController.currentColor.sc9,
); );
await initWifiStatusAndWifiList(needSuccess: needSuccess);
} else { } else {
blueteethBindController.netType.value = 1; blueteethBindController.netType.value = 1;
blueteethBindController.updateAll(); blueteethBindController.updateAll();

View File

@@ -28,6 +28,7 @@ import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:vbvs_app/pages/mh_page/device/upgrade/BatchUpgradeManager.dart'; import 'package:vbvs_app/pages/mh_page/device/upgrade/BatchUpgradeManager.dart';
import 'package:vbvs_app/pages/mh_page/device/upgrade/device_upgrade_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/upgrade/device_upgrade_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/upgrade/tool/device_upgrade_tool.dart'; import 'package:vbvs_app/pages/mh_page/device/upgrade/tool/device_upgrade_tool.dart';
import 'package:flutter/services.dart';
class DeviceUpgrade extends StatefulWidget { class DeviceUpgrade extends StatefulWidget {
DeviceUpgrade({super.key}); DeviceUpgrade({super.key});
@@ -412,6 +413,11 @@ class _DeviceUpgradeState extends State<DeviceUpgrade> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -23,6 +23,7 @@ import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controlle
import 'package:vbvs_app/pages/mh_page/device/mht_blueteeth_device_page.dart'; import 'package:vbvs_app/pages/mh_page/device/mht_blueteeth_device_page.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart'; import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:vbvs_app/pages/mh_page/device/upgrade/device_upgrade_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/upgrade/device_upgrade_controller.dart';
import 'package:flutter/services.dart';
class DeviceUpgradeList extends StatefulWidget { class DeviceUpgradeList extends StatefulWidget {
DeviceUpgradeList({super.key}); DeviceUpgradeList({super.key});
@@ -407,6 +408,11 @@ class _DeviceUpgradeState extends State<DeviceUpgradeList> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
iconTheme: IconThemeData(color: themeController.currentColor.sc3), iconTheme: IconThemeData(color: themeController.currentColor.sc3),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
@@ -447,10 +453,10 @@ class _DeviceUpgradeState extends State<DeviceUpgradeList> {
child: Column( child: Column(
children: [ children: [
Obx(() { Obx(() {
if (mhtDeviceUpgradeController.model if (mhtDeviceUpgradeController
.upgradingDevices!.isNotEmpty) { .model.upgradingDevices!.isNotEmpty) {
final sortedList = mhtDeviceUpgradeController.model final sortedList = mhtDeviceUpgradeController
.upgradingDevices! .model.upgradingDevices!
.toList() .toList()
..sort((a, b) => b.rssi!.compareTo(a.rssi!)); ..sort((a, b) => b.rssi!.compareTo(a.rssi!));
// if (sortedList.length > 0) { // if (sortedList.length > 0) {

View File

@@ -6,6 +6,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/NullDataComponentWidget.dart'; import 'package:vbvs_app/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/pages/mh_page/device/device.dart'; import 'package:vbvs_app/pages/mh_page/device/device.dart';
import 'package:vbvs_app/pages/mh_page/searchWidget.dart'; import 'package:vbvs_app/pages/mh_page/searchWidget.dart';
import 'package:flutter/services.dart';
import '../../controller/mh_controller/device_list_controller.dart'; import '../../controller/mh_controller/device_list_controller.dart';
@@ -44,6 +45,11 @@ class _DeviceListPageState extends State<DeviceListPage> {
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),

View File

@@ -5,6 +5,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart'; import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
import 'package:flutter/services.dart';
class DevicePeopleInfo extends GetView<PeopleInfoController> { class DevicePeopleInfo extends GetView<PeopleInfoController> {
Map data; Map data;
@@ -78,11 +79,21 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0, titleSpacing: 0,
title: AppBar( title: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false, automaticallyImplyLeading: false,

View File

@@ -45,6 +45,11 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),

View File

@@ -13,6 +13,7 @@ import 'package:vbvs_app/component/tool/CustomCard.dart';
import 'package:vbvs_app/controller/mh_controller/address_controller.dart'; import 'package:vbvs_app/controller/mh_controller/address_controller.dart';
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart'; import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
import 'package:vbvs_app/pages/mh_page/homepage/component/citypicker.dart'; import 'package:vbvs_app/pages/mh_page/homepage/component/citypicker.dart';
import 'package:flutter/services.dart';
class EditAddressPage extends GetView<AddressController> class EditAddressPage extends GetView<AddressController>
implements CityPickerListener { implements CityPickerListener {
@@ -59,6 +60,11 @@ class EditAddressPage extends GetView<AddressController>
// key: scaffoldKey, // key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),
@@ -942,8 +948,9 @@ class EditAddressPage extends GetView<AddressController>
'Readex Pro', 'Readex Pro',
letterSpacing: letterSpacing:
0, 0,
color: themeController color: themeController
.currentColor.sc4, .currentColor
.sc4,
), ),
enabledBorder: enabledBorder:
UnderlineInputBorder( UnderlineInputBorder(

View File

@@ -13,6 +13,7 @@ import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
import 'package:vbvs_app/pages/mh_page/bluetooth.dart'; import 'package:vbvs_app/pages/mh_page/bluetooth.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart'; import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart'; import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
import 'package:flutter/services.dart';
class EditBedPage extends StatefulWidget { class EditBedPage extends StatefulWidget {
final Map data; final Map data;
@@ -68,6 +69,11 @@ class _EditBedPageState extends State<EditBedPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(color: Colors.white), iconTheme: const IconThemeData(color: Colors.white),
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
@@ -225,8 +231,8 @@ class _EditBedPageState extends State<EditBedPage> {
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
letterSpacing: 0, letterSpacing: 0,
fontSize: 36.rpx, fontSize: 36.rpx,
color: themeController color: themeController
.currentColor.sc4, .currentColor.sc4,
), ),
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide.none, borderSide: BorderSide.none,

View File

@@ -2,19 +2,16 @@ import 'dart:async';
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart'; import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appColors.dart';
import 'package:vbvs_app/common/color/appConstants.dart'; import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/color/appFontsize.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart'; import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart'; import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/experience_store_list_page.dart'; import 'package:vbvs_app/controller/mh_controller/experience_store_list_page.dart';
import 'package:vbvs_app/controller/weather/weather_controller.dart'; import 'package:vbvs_app/controller/weather/weather_controller.dart';
import 'package:vbvs_app/pages/mh_page/Empty.dart';
import 'package:vbvs_app/pages/mh_page/experience_store_widget.dart'; import 'package:vbvs_app/pages/mh_page/experience_store_widget.dart';
import 'package:vbvs_app/pages/mh_page/searchWidget.dart'; import 'package:vbvs_app/pages/mh_page/searchWidget.dart';
@@ -74,6 +71,11 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
// key: scaffoldKey, // key: scaffoldKey,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),
@@ -150,11 +152,11 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
if (controller.model.experienceStoreModelList.length == if (controller.model.experienceStoreModelList.length ==
0) { 0) {
return CircularProgressIndicator( return CircularProgressIndicator(
strokeWidth: 2, strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1, themeController.currentColor.sc1,
), ),
); );
} else { } else {
return Container(); return Container();
} }

View File

@@ -1,10 +1,9 @@
import 'package:ef/ef.dart'; import 'package:ef/ef.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:vbvs_app/common/color/appColors.dart';
import 'package:vbvs_app/common/util/FitTool.dart'; import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart'; import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
class HelpArticle extends StatefulWidget { class HelpArticle extends StatefulWidget {
final Map article; final Map article;
@@ -29,6 +28,11 @@ class _HelpArticleState extends State<HelpArticle> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white), iconTheme: IconThemeData(color: Colors.white),
@@ -100,11 +104,11 @@ class _HelpArticleState extends State<HelpArticle> {
color: const Color(0xFF042C46), color: const Color(0xFF042C46),
alignment: Alignment.center, alignment: Alignment.center,
child: CircularProgressIndicator( child: CircularProgressIndicator(
strokeWidth: 2, strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1, themeController.currentColor.sc1,
), ),
), ),
), ),
], ],
), ),

Some files were not shown because too many files have changed in this diff Show More