解绑后通知所分享人员 日报周报月报说明弹窗点击范围 注销账号
This commit is contained in:
@@ -597,6 +597,11 @@
|
||||
"去查看": "View now",
|
||||
"正常值": "range:",
|
||||
"绑定设备": "Bind Device",
|
||||
"设备分享提醒": "Device Sharing Alert","生命体征":"Vital signs",
|
||||
"无报告":"none"
|
||||
"设备分享提醒": "Device Sharing Alert",
|
||||
"生命体征": "Vital signs",
|
||||
"无报告": "none",
|
||||
"注销账号成功": "Account deleted successfully",
|
||||
"注销账号失败": "Failed to delete account",
|
||||
"是否确认注销?": "Are you sure you want to delete your account?",
|
||||
"设备已被用户解绑,将取消当前分享!": "The device has been unbound by the user, and the current sharing will be cancelled!","设备解绑提醒": "Device Unbind Reminder"
|
||||
}
|
||||
@@ -590,9 +590,17 @@
|
||||
"皮肤指数": "皮肤指数",
|
||||
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。",
|
||||
"删除后": "删除后",
|
||||
"该设备的历史数据将被清除": "该设备的历史数据将被清除","有一条新的设备分享消息":"有一条新的设备分享消息","去查看":"去查看",
|
||||
"正常值":"正常值:",
|
||||
"绑定设备":"绑定设备",
|
||||
"设备分享提醒":"设备分享提醒","生命体征":"生命体征",
|
||||
"无报告":"无报告"
|
||||
"该设备的历史数据将被清除": "该设备的历史数据将被清除",
|
||||
"有一条新的设备分享消息": "有一条新的设备分享消息",
|
||||
"去查看": "去查看",
|
||||
"正常值": "正常值:",
|
||||
"绑定设备": "绑定设备",
|
||||
"设备分享提醒": "设备分享提醒",
|
||||
"生命体征": "生命体征",
|
||||
"无报告": "无报告",
|
||||
"注销账号成功": "注销账号成功",
|
||||
"注销账号失败": "注销账号失败",
|
||||
"是否确认注销?": "是否确认注销?",
|
||||
"设备已被用户解绑,将取消当前分享!": "设备已被用户解绑,将取消当前分享!",
|
||||
"设备解绑提醒": "设备解绑提醒"
|
||||
}
|
||||
@@ -597,5 +597,10 @@
|
||||
"绑定设备": "绑定设备",
|
||||
"设备分享提醒": "設備分享提醒",
|
||||
"生命体征": "生命體徵",
|
||||
"无报告":"无报告"
|
||||
"无报告": "无报告",
|
||||
"注销账号成功": "註銷帳號成功",
|
||||
"注销账号失败": "註銷帳號失敗",
|
||||
"是否确认注销?": "是否確認註銷?",
|
||||
"设备已被用户解绑,将取消当前分享!": "設備已被用戶解綁,將取消當前分享!",
|
||||
"设备解绑提醒": "設備解绑提醒"
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
class ServiceConstant {
|
||||
// static const String baseHost = "zhmht.swes.com.cn:27021"; //服务地址 眠花糖测试地址
|
||||
static const String baseHost = "zhmht.swes.com.cn:27020"; //服务地址 眠花糖正式地址
|
||||
// static const String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址
|
||||
// static const String baseHost = "zhmht.swes.com.cn:27020"; //服务地址 眠花糖正式地址
|
||||
static const String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址
|
||||
// static const String baseHost = "vsbst-api.he-info.cn";//服务地址
|
||||
// static const String service_address = "http://$baseHost";
|
||||
static const String service_address = "https://$baseHost";
|
||||
static const String service_address = "http://$baseHost";
|
||||
// static const String service_address = "https://$baseHost";
|
||||
|
||||
static String server_service = "/vsbs_app_server"; //服务名称
|
||||
|
||||
static String send_code = "/api/verifycode/send"; //发送验证码
|
||||
static String login = "/api/user/login"; //登录
|
||||
static String delete_account = "/api/user/logout";
|
||||
static String get_bluetooth_device_status =
|
||||
"/api/device/status/info"; //设备绑定状态
|
||||
static String device_bind = "/api/device/bind"; //设备绑定
|
||||
|
||||
@@ -50,8 +50,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.device_list;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}$search";
|
||||
var response = await EasyDartModule.dio
|
||||
.get(queryUrl);
|
||||
var response = await EasyDartModule.dio.get(queryUrl);
|
||||
if (response != null) {
|
||||
var responseData =
|
||||
response.data is String ? jsonDecode(response.data) : response.data;
|
||||
@@ -154,6 +153,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
||||
onSuccess: (res) {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: Color(0XFF00C1AA));
|
||||
Get.back();
|
||||
},
|
||||
onFailure: (err) {
|
||||
TopSlideNotification.show(context,
|
||||
|
||||
@@ -249,4 +249,31 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
mhtHomeController.personnelList.value = [];
|
||||
return apiResponse;
|
||||
}
|
||||
ApiResponse deleteAccount() {
|
||||
MHTHomeController mhtHomeController = Get.find();
|
||||
ApiResponse apiResponse = ApiResponse(code: 1, msg: "注销成功".tr);
|
||||
EasyDartModule.logger.info("注销账号");
|
||||
DailyLogUtils.writeLog("注销账号");
|
||||
|
||||
model.login = 0;
|
||||
EasyDartModule.dio.token = null;
|
||||
final box = GetStorage();
|
||||
box.remove("user");
|
||||
box.remove("token");
|
||||
BodyDeviceController bodyDeviceController = Get.find();
|
||||
bodyDeviceController.bindDeviceNum.value = 0;
|
||||
HomeController homeController = Get.find();
|
||||
homeController.sleepNum.value = 0;
|
||||
LoginController loginController = Get.find();
|
||||
loginController.model.register_agree = null;
|
||||
bodyDeviceController.sleepReportData.value = {};
|
||||
MessageController messageController = Get.find();
|
||||
messageController.model.body_message_read = 0;
|
||||
messageController.model.system_message_read = 0;
|
||||
CountdownController countdownController = Get.find();
|
||||
countdownController.countdown.value = 0;
|
||||
mhtHomeController.personnelList.value = [];
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
}
|
||||
|
||||
127
lib/main.dart
127
lib/main.dart
@@ -183,15 +183,105 @@ Timer? _messageTimer;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
void startMessagePolling(int ent_type) {
|
||||
Future<void> startMessagePolling(int ent_type) async {
|
||||
Get.put(MhMessageController());
|
||||
MhMessageController messageController = Get.find();
|
||||
final Set<String> _poppedMessageIds = {}; // 本地已弹窗的消息 ID(无论是否已读成功)
|
||||
final Set<String> _readMessageIds = {};
|
||||
final controller = Get.find<MhMessageController>();
|
||||
_messageTimer?.cancel();
|
||||
if (ent_type == APPPackageType.MHT.code) {
|
||||
if (Get.isRegistered<MhMessageController>()) {
|
||||
Get.find<MhMessageController>().getMessageStatus();
|
||||
await controller.getMessageStatus();
|
||||
|
||||
if (controller.model.system_message_read == 1) {
|
||||
await controller.getMessageList("app_system");
|
||||
|
||||
final unhandledShareMessages =
|
||||
controller.systemMessageList.where((item) {
|
||||
final data = item['data'];
|
||||
final id = item['_id']?.toString();
|
||||
return data is Map &&
|
||||
data['type'] == 'share' &&
|
||||
id != null &&
|
||||
!_poppedMessageIds.contains(id) &&
|
||||
(item['read_time'] == null);
|
||||
}).toList();
|
||||
|
||||
// if (unhandledShareMessages.isNotEmpty) {
|
||||
// for (final message in unhandledShareMessages) {
|
||||
// final messageId = message['_id']?.toString();
|
||||
// if (messageId == null || _poppedMessageIds.contains(messageId))
|
||||
// continue;
|
||||
|
||||
// // 新增:如果当前页面是消息页,则跳过弹窗
|
||||
// if (Get.currentRoute == '/messagePage') {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// _poppedMessageIds.add(messageId);
|
||||
|
||||
// try {
|
||||
// await controller.updateMessageReadStatus(Get.context!, messageId);
|
||||
// } catch (e) {
|
||||
// print("标记消息 $messageId 为已读失败: $e");
|
||||
// }
|
||||
|
||||
// final result = await showMessageConfirmDialog(title: '设备分享提醒'.tr);
|
||||
// if (result == 'confirm') {
|
||||
// Get.toNamed('/messageDetail', arguments: message);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (unhandledShareMessages.isNotEmpty) {
|
||||
for (final message in unhandledShareMessages) {
|
||||
final messageId = message['_id']?.toString();
|
||||
|
||||
if (messageId == null || _poppedMessageIds.contains(messageId))
|
||||
continue;
|
||||
|
||||
// 新增:如果当前页面是消息页,则跳过弹窗
|
||||
if (Get.currentRoute == '/messagePage') {
|
||||
continue;
|
||||
}
|
||||
|
||||
final data = message['data'] as Map<String, dynamic>;
|
||||
final valList = data['val'] as List<dynamic>;
|
||||
final messageType = data['type'];
|
||||
|
||||
// Extract device ID
|
||||
final deviceIdEntry = valList.firstWhere(
|
||||
(item) => item['k'] == '设备ID',
|
||||
orElse: () => null,
|
||||
);
|
||||
final mac = deviceIdEntry?['v'] as String?;
|
||||
_poppedMessageIds.add(messageId);
|
||||
|
||||
try {
|
||||
await controller.updateMessageReadStatus(
|
||||
Get.context!, message['type'],
|
||||
mid: messageId);
|
||||
} catch (e) {
|
||||
print("标记消息 $messageId 为已读失败: $e");
|
||||
}
|
||||
|
||||
String dialogTitle;
|
||||
String msg;
|
||||
if (messageType == 'share') {
|
||||
dialogTitle = '设备分享提醒'.tr; // "Device Sharing Notification"
|
||||
final result = await showMessageConfirmDialog(title: dialogTitle);
|
||||
|
||||
if (result == 'confirm') {
|
||||
Get.toNamed('/messageDetail', arguments: message);
|
||||
}
|
||||
} else {
|
||||
dialogTitle = '设备解绑提醒'.tr;
|
||||
showUnShareMessageDialog(title: dialogTitle, mac: mac!);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Get.isRegistered<MessageController>()) {
|
||||
@@ -203,18 +293,16 @@ void startMessagePolling(int ent_type) {
|
||||
try {
|
||||
if (ent_type == APPPackageType.MHT.code) {
|
||||
if (Get.isRegistered<MhMessageController>()) {
|
||||
final controller = Get.find<MhMessageController>();
|
||||
await controller.getMessageStatus();
|
||||
|
||||
if (controller.model.system_message_read == 1) {
|
||||
await controller.getMessageList("app_system");
|
||||
|
||||
final unhandledShareMessages =
|
||||
controller.systemMessageList.where((item) {
|
||||
final data = item['data'];
|
||||
final id = item['_id']?.toString();
|
||||
return data is Map &&
|
||||
data['type'] == 'share' &&
|
||||
(data['type'] == 'share' || data['type'] == 'unShare') &&
|
||||
id != null &&
|
||||
!_poppedMessageIds.contains(id) &&
|
||||
(item['read_time'] == null);
|
||||
@@ -223,6 +311,7 @@ void startMessagePolling(int ent_type) {
|
||||
if (unhandledShareMessages.isNotEmpty) {
|
||||
for (final message in unhandledShareMessages) {
|
||||
final messageId = message['_id']?.toString();
|
||||
|
||||
if (messageId == null || _poppedMessageIds.contains(messageId))
|
||||
continue;
|
||||
|
||||
@@ -231,19 +320,39 @@ void startMessagePolling(int ent_type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final data = message['data'] as Map<String, dynamic>;
|
||||
final valList = data['val'] as List<dynamic>;
|
||||
final messageType = data['type'];
|
||||
|
||||
// Extract device ID
|
||||
final deviceIdEntry = valList.firstWhere(
|
||||
(item) => item['k'] == '设备ID',
|
||||
orElse: () => null,
|
||||
);
|
||||
final mac = deviceIdEntry?['v'] as String?;
|
||||
_poppedMessageIds.add(messageId);
|
||||
|
||||
try {
|
||||
await controller.updateMessageReadStatus(
|
||||
Get.context!, messageId);
|
||||
Get.context!, message['type'],
|
||||
mid: messageId);
|
||||
} catch (e) {
|
||||
print("标记消息 $messageId 为已读失败: $e");
|
||||
}
|
||||
|
||||
final result =
|
||||
await showMessageConfirmDialog(title: '设备分享提醒'.tr);
|
||||
if (result == 'confirm') {
|
||||
Get.toNamed('/messageDetail', arguments: message);
|
||||
String dialogTitle;
|
||||
String msg;
|
||||
if (messageType == 'share') {
|
||||
dialogTitle = '设备分享提醒'.tr; // "Device Sharing Notification"
|
||||
final result =
|
||||
await showMessageConfirmDialog(title: dialogTitle);
|
||||
|
||||
if (result == 'confirm') {
|
||||
Get.toNamed('/messageDetail', arguments: message);
|
||||
}
|
||||
} else {
|
||||
dialogTitle = '设备解绑提醒'.tr;
|
||||
showUnShareMessageDialog(title: dialogTitle, mac: mac!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/base/SleepCalendarWidget.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/device/device_calibration_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
|
||||
@@ -110,8 +111,6 @@ Widget getOnePickers(
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Future showDateSelectionDialog(BuildContext context,
|
||||
{required DateTime checkDate,
|
||||
Function? checkChange,
|
||||
@@ -1232,22 +1231,52 @@ Future showCustomConfirmDialog(BuildContext context, String name,
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 50.rpx, bottom: 40.rpx),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// Get.back(result: "confirm");
|
||||
// },
|
||||
// child: Container(
|
||||
// width: 260.rpx,
|
||||
// height: 60.rpx,
|
||||
// alignment: Alignment.center,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(6),
|
||||
// color: stringToColor("#D3B684")),
|
||||
// child: Text(
|
||||
// '$btnName',
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize: 30.rpx),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.back(result: "confirm");
|
||||
},
|
||||
colors: [
|
||||
Color(0xFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
child: Container(
|
||||
width: 260.rpx,
|
||||
height: 60.rpx,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: stringToColor("#D3B684")),
|
||||
child: Text(
|
||||
'$btnName',
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"确定".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1499,7 +1499,8 @@ Future<String?> showMessageConfirmDialog({
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '有一条新的设备分享消息'.tr,
|
||||
style: TextStyle(color: Colors.red, fontSize: 26.rpx)),
|
||||
style:
|
||||
TextStyle(color: Colors.black, fontSize: 26.rpx)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1558,3 +1559,79 @@ Future<String?> showMessageConfirmDialog({
|
||||
barrierDismissible: true,
|
||||
);
|
||||
}
|
||||
|
||||
Future<String?> showUnShareMessageDialog({
|
||||
required String title,
|
||||
required String mac,
|
||||
}) async {
|
||||
return await Get.dialog<String>(
|
||||
FrostedDialog(
|
||||
blurSigma: 3.0,
|
||||
child: Container(
|
||||
width: 520.rpx,
|
||||
height: 460.rpx,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 45.rpx, right: 45.rpx, top: 90.rpx, bottom: 60.rpx),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 30.rpx, color: Colors.black),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: mac,
|
||||
style: TextStyle(color: Colors.blue, fontSize: 26.rpx)),
|
||||
TextSpan(
|
||||
text: " " + '设备已被用户解绑,将取消当前分享!'.tr,
|
||||
style:
|
||||
TextStyle(color: Colors.black, fontSize: 26.rpx)),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
onTap: () {
|
||||
Get.back(result: 'confirm');
|
||||
},
|
||||
colors: [
|
||||
Color(0xFF1592AA),
|
||||
Color(0XFF0C83A7),
|
||||
Color(0XFF006FA3)
|
||||
],
|
||||
child: Container(
|
||||
width: 200.rpx,
|
||||
height: 90.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'确定'.tr,
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
barrierDismissible: true,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -428,6 +428,7 @@ class ShareDeviceDetailWidget extends GetView {
|
||||
data['info'][5]['uid'],
|
||||
data['mac'.tr],
|
||||
context);
|
||||
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:vbvs_app/controller/login/login_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
|
||||
|
||||
class DeletedAccountPage extends GetView {
|
||||
BoxConstraints? bodysize;
|
||||
@@ -262,33 +263,44 @@ class DeletedAccountPage extends GetView {
|
||||
),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "待开发功能".tr,
|
||||
);
|
||||
// showCustomConfirmDialog(context, "是否确认注销?")
|
||||
// .then((v) async {
|
||||
// if (v != "confirm") {
|
||||
// return;
|
||||
// }
|
||||
// LoginController loginController = Get.find();
|
||||
// UserInfoController userInfoController =
|
||||
// Get.find<UserInfoController>();
|
||||
// var code = await loginController.deletedAccount();
|
||||
// if (code != null && code == 1) {
|
||||
// final box = GetStorage();
|
||||
// box.remove('user');
|
||||
// box.remove('token');
|
||||
// userInfoController.model.token = null;
|
||||
// userInfoController.model.user = null;
|
||||
// userInfoController.model.login = 0;
|
||||
// userInfoController.model.message = 0;
|
||||
// GlobalController globalController =
|
||||
// Get.find<GlobalController>();
|
||||
// globalController.resetParmAll();
|
||||
// Get.offAllNamed("/loginPage");
|
||||
// }
|
||||
// });
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: "待开发功能".tr,
|
||||
// );
|
||||
showCustomConfirmDialog(context, "是否确认注销?".tr)
|
||||
.then((v) async {
|
||||
if (v != "confirm") {
|
||||
return;
|
||||
}
|
||||
MHTLoginController loginController = Get.find();
|
||||
UserInfoController userInfoController =
|
||||
Get.find<UserInfoController>();
|
||||
int code = await loginController.deletedAccount();
|
||||
if (code == 1) {
|
||||
userInfoController.logOut();
|
||||
Get.offAllNamed("/mianPageBottomChange");
|
||||
TopSlideNotification.show(context,
|
||||
text: "注销账号成功".tr,
|
||||
textColor: themeController.currentColor.sc2);
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: "注销账号失败".tr,
|
||||
textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
|
||||
// if (code != null && code == 1) {
|
||||
// final box = GetStorage();
|
||||
// box.remove('user');
|
||||
// box.remove('token');
|
||||
// userInfoController.model.token = null;
|
||||
// userInfoController.model.user = null;
|
||||
// userInfoController.model.login = 0;
|
||||
// userInfoController.model.message = 0;
|
||||
// GlobalController globalController =
|
||||
// Get.find<GlobalController>();
|
||||
// globalController.resetParmAll();
|
||||
// }
|
||||
});
|
||||
},
|
||||
text: '注销账号'.tr,
|
||||
options: FFButtonOptions(
|
||||
|
||||
@@ -300,8 +300,24 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
|
||||
}
|
||||
|
||||
//注销账号
|
||||
deletedAccount() async {
|
||||
// return await repository.deletedAccount();
|
||||
Future<int> deletedAccount() async {
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.delete_account;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
int code = 0;
|
||||
requestWithLog(
|
||||
logTitle: "注销账号",
|
||||
method: MyHttpMethod.put,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
code = res.code!;
|
||||
},
|
||||
onFailure: (res) {
|
||||
code = res.code!;
|
||||
},
|
||||
);
|
||||
return code;
|
||||
}
|
||||
|
||||
Future<void> openWeChatCustomerService(BuildContext context) async {
|
||||
|
||||
@@ -151,12 +151,11 @@ class LabelWithSvg extends StatelessWidget {
|
||||
Container(
|
||||
child: Text(
|
||||
explain,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
style: TextStyle(fontSize: 26.rpx, color: Colors.black),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [Color(0XFF1592AA), Color(0xFF0C83A7), Color(0xFF006FA3)],
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
|
||||
@@ -70,7 +70,7 @@ class _AIAdviceWidgetState extends State<AIAdviceWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -90,7 +90,7 @@ class _SnoreViewWidgetWidgetState extends State<BreathePauseNewWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -132,7 +132,7 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -80,7 +80,7 @@ class _CompareSleepWidgetState extends State<CompareSleepWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -70,7 +70,7 @@ class _DiseasePercentsWidgetState extends State<DiseasePercentsWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
// 你的点击逻辑
|
||||
|
||||
@@ -72,7 +72,7 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
@@ -80,14 +80,15 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
|
||||
Container(
|
||||
child: Text(
|
||||
// "心率变异性(HRV)介绍".tr,
|
||||
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。".tr,
|
||||
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。"
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: Colors.black,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
@@ -182,11 +183,16 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
|
||||
'${data['desc']}',
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color:
|
||||
themeController.currentColor.sc3,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
|
||||
@@ -72,7 +72,7 @@ class _HeartHealthWidgetState extends State<HeartHealthWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -89,7 +89,7 @@ class _HeartPointWidgetState extends State<HeartPointWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -132,7 +132,7 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -528,7 +528,7 @@ Widget MonthDataWidget(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("MAC号:${data['mac']}",
|
||||
Text("MAC:${data['mac']}",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx))
|
||||
],
|
||||
|
||||
@@ -88,7 +88,7 @@ class _SkinPercentWidgetState extends State<SkinPercentWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -47,7 +47,12 @@ class SleepChartContainer extends StatelessWidget {
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx,
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
|
||||
@@ -91,7 +91,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx),//
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -120,7 +120,7 @@ class _SnoreViewWidgetWidgetState extends State<SnoreViewWidgetWidget> {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
|
||||
class TrendDataTablePage extends StatefulWidget {
|
||||
@@ -46,7 +47,12 @@ class _TrendDataTablePageState extends State<TrendDataTablePage> {
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx,
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
|
||||
@@ -58,7 +58,7 @@ class IndicatorCompareCard extends StatelessWidget {
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white,
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(14.rpx, 0, 14.rpx, 0),
|
||||
EdgeInsetsDirectional.fromSTEB(14.rpx, 10.rpx, 14.rpx, 10.rpx),
|
||||
borderRadius: 0.rpx,
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
@@ -668,7 +668,7 @@ Widget WeekDataWidget(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("MAC号:${data['mac']}",
|
||||
Text("MAC:${data['mac']}",
|
||||
style: TextStyle(
|
||||
color: Color(0xFFD3D3D3).withOpacity(0.2), fontSize: 18.rpx))
|
||||
],
|
||||
|
||||
@@ -91,7 +91,7 @@ class _ZiZhuShenJingPercentWidgetState
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
14.rpx, 10.rpx, 14.rpx, 10.rpx), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
|
||||
Reference in New Issue
Block a user