多语言
This commit is contained in:
@@ -1,15 +1,594 @@
|
|||||||
{
|
{
|
||||||
"语言名称": "English",
|
"语言名称": "English",
|
||||||
"菜单": {
|
"网页载入完毕": "Page loaded",
|
||||||
|
"关于我们": "About Us",
|
||||||
|
"地址管理": "Address Management",
|
||||||
|
"添加新地址": "Add New Address",
|
||||||
|
"默认": "Def",
|
||||||
|
"无详细地址": "No Detailed Address",
|
||||||
|
"编辑": "Edit",
|
||||||
|
"报修成功标题": "Repair Request Successful",
|
||||||
|
"报修成功": "Repair submitted successfully",
|
||||||
|
"查看报修历史": "View Repair History",
|
||||||
|
"返回": "Back",
|
||||||
|
"申请报修": "Request Repair",
|
||||||
|
"选择需要报修的设备": "Select Device for Repair",
|
||||||
|
"已绑设备": "Bound Devices",
|
||||||
|
"未知MAC": "Unknown MAC",
|
||||||
|
"未知型号": "Unknown Model",
|
||||||
|
"暂无可选设备": "No Available Devices",
|
||||||
|
"请选择绑定设备": "Please Select Device to Bind",
|
||||||
|
"查找": "Search",
|
||||||
|
"设备系列": "Device Series",
|
||||||
|
"产品型号": "Product Model",
|
||||||
|
"序列号": "Serial Number",
|
||||||
|
"上传设备故障照片": "Upload Fault Photo",
|
||||||
|
"请描述一下您的问题": "Please Describe Your Issue",
|
||||||
|
"问题描述(100个字以内)": "Problem Description (within 100 characters)",
|
||||||
|
"联系方式": "Phone",
|
||||||
|
"联系人": "Contact",
|
||||||
|
"手机号码": "Phone",
|
||||||
|
"提交报修信息": "Submit Repair Request",
|
||||||
|
"提交申请": "Submit Application",
|
||||||
|
"请输入设备系列!": "Please enter device series!",
|
||||||
|
"请输入设备型号!": "Please enter device model!",
|
||||||
|
"请输入设备序列号id!": "Please enter device serial number ID!",
|
||||||
|
"请输入姓名!": "Please enter name!",
|
||||||
|
"姓名必须为2到4个汉字!": "Name must be 2-4 Chinese characters!",
|
||||||
|
"请输入手机号!": "Please enter phone!",
|
||||||
|
"无效的手机号!": "Invalid phone number!",
|
||||||
|
"请输入问题描述!": "Please describe the problem!",
|
||||||
|
"请至少上传一张问题图片!": "Please upload at least one problem photo!",
|
||||||
|
"体征检测设备": "Vital Signs Monitoring Device",
|
||||||
|
"智能床": "Smart Bed",
|
||||||
|
"智能床垫": "Smart Mattress",
|
||||||
|
"未知设备": "Unknown Device",
|
||||||
|
"百度地图": "Baidu Map",
|
||||||
|
"腾讯地图": "Tencent Map",
|
||||||
|
"高德地图": "Amap",
|
||||||
|
"Apple地图": "Apple Maps",
|
||||||
|
"Google地图": "Google Maps",
|
||||||
|
"Google地图Go": "Google Maps Go",
|
||||||
|
"Petal地图": "Petal Maps",
|
||||||
|
"背部律动": "Back Massage",
|
||||||
|
"力度调节": "Intensity Adjustment",
|
||||||
|
"强": "Strong",
|
||||||
|
"弱": "Weak",
|
||||||
|
"按摩定时": "Massage Timer",
|
||||||
|
"恢复到默认设置": "Restore Default Settings",
|
||||||
|
"设置": "Settings",
|
||||||
|
"未命名": "Unnamed",
|
||||||
|
"已连接": "Connected",
|
||||||
|
"未连接": "Disconnected",
|
||||||
|
"详情": "Details",
|
||||||
|
"人员资料": "Personal Information",
|
||||||
|
"房间选择": "Room Selection",
|
||||||
|
"设备校准": "Device Calibration",
|
||||||
|
"体征传感器": "Vital Signs Sensor",
|
||||||
|
"WIFI配置": "WiFi Configuration",
|
||||||
|
"分享设备": "Share Device",
|
||||||
|
"解绑": "Unbind",
|
||||||
|
"删除": "Delete",
|
||||||
|
"解绑成功": "Unbound successfully",
|
||||||
|
"删除成功": "Deleted successfully",
|
||||||
|
"是否进行解绑?": "Confirm to unbind?",
|
||||||
|
"是否进行删除?": "Confirm to delete?",
|
||||||
|
"我要预约": "Make Appointment",
|
||||||
|
"体验日期": "Experience Date",
|
||||||
|
"体验时段": "Time Slot",
|
||||||
|
"请选择时间": "Select Time",
|
||||||
|
"体验人员": "Participant",
|
||||||
|
"输入姓名": "Enter Name",
|
||||||
|
"手机号": "Phone",
|
||||||
|
"输入手机号": "Enter Phone",
|
||||||
|
"提交预约": "Submit Appointment",
|
||||||
|
"预约编号:": "Appointment No.:",
|
||||||
|
"预约人员:": "Participant:",
|
||||||
|
"手机号码:": "Phone:",
|
||||||
|
"体验时间:": "Time:",
|
||||||
|
"预约门店:": "Store:",
|
||||||
|
"SWES眠花糖杭州南星桥旗舰店": "SWES Mianhuatang Hangzhou Nanxingqiao Flagship Store",
|
||||||
|
"门店地址:": "Address:",
|
||||||
|
"浙江省杭州市上城区飞云江路45号一层": "1F, No.45 Feiyunjiang Road, Shangcheng District, Hangzhou",
|
||||||
|
"预约成功!": "Appointment Successful!",
|
||||||
|
"关闭": "Close",
|
||||||
|
"我的预约": "My Appointments",
|
||||||
|
"双人版绑定标题": "Dual Binding",
|
||||||
|
"绑定全部": "Bind All",
|
||||||
|
"主设备": "Main Device",
|
||||||
|
"可绑定": "Available",
|
||||||
|
"已被绑定": "Bound",
|
||||||
|
"从设备": "Secondary Device",
|
||||||
|
"确定": "OK",
|
||||||
|
"取消": "Cancel",
|
||||||
|
"无法绑定": "Cannot Bind",
|
||||||
|
"无法绑定1": "Device detected",
|
||||||
|
"无法绑定2": "Already bound",
|
||||||
|
"无法绑定3": ", please unbind before binding. If you have any questions, please contact customer service.",
|
||||||
|
"否": "No",
|
||||||
|
"是": "Yes",
|
||||||
|
"密码为空": "Password Empty",
|
||||||
|
"连接": "Connect",
|
||||||
|
"继续": "Continue",
|
||||||
|
"下次再说": "Later",
|
||||||
|
"注销账号": "Delete Account",
|
||||||
|
"注销智慧眠花糖账号": "Delete Mianhuatang Account",
|
||||||
|
"账号注销后,你将无法使用以下功能,": "After deletion, you won't be able to:",
|
||||||
|
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销": "Accounts with bound/shared devices cannot be deleted",
|
||||||
|
",可先进行解绑后再进行注销操作。": "Unbind devices first.",
|
||||||
|
"无法控制智能床、智能床垫等设备": "Cannot control smart beds/mattresses",
|
||||||
|
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。": "You won't be able to control your smart beds/mattresses.",
|
||||||
|
"无法查询睡眠报告和体征数据": "Cannot view sleep reports/data",
|
||||||
|
"注销账号后你将查询不到你以前的睡眠报告和实时数据。": "Your historical sleep data will be unavailable.",
|
||||||
|
"无法使用的其他功能": "Other unavailable features",
|
||||||
|
"包含设备报修、门店体验预约等。": "Including repairs, appointments, etc.",
|
||||||
|
"信号强度": "Signal Strength",
|
||||||
|
"设备状态": "Device Status",
|
||||||
|
"其他设备正在绑定中,是否终止其他设备绑定?": "Another device is binding. Terminate?",
|
||||||
|
"是否确认绑定?": "Confirm binding?",
|
||||||
|
"连接异常": "Connection Error",
|
||||||
|
"用户点击了取消": "User cancelled",
|
||||||
|
"添加": "Add",
|
||||||
|
"更新用户绑定流程": "Update Binding Process",
|
||||||
|
"默认设备名称": "Default Device Name",
|
||||||
|
"SN": "SN",
|
||||||
|
"蓝牙地址": "Bluetooth Address",
|
||||||
|
"mac": "mac",
|
||||||
|
"网络": "Network",
|
||||||
|
"在线": "Online",
|
||||||
|
"离线": "Offline",
|
||||||
|
"传感器": "Sensor",
|
||||||
|
"版本": "Version",
|
||||||
|
"蓝牙连接失败": "Bluetooth Connection Failed",
|
||||||
|
"不支持的设备类型": "Unsupported Device",
|
||||||
|
"未能获取到MAC地址": "Failed to Get MAC",
|
||||||
|
"获取不到传感器mac,请重试": "Failed to get sensor MAC, please retry",
|
||||||
|
"获取设备状态": "Get Device Status",
|
||||||
|
"获取设备状态失败": "Failed to Get Status",
|
||||||
|
"获取MAC失败": "Failed to Get MAC",
|
||||||
|
"获取MAC超时": "MAC Timeout",
|
||||||
|
"BLE返回数据格式不正确": "Invalid BLE Data",
|
||||||
|
"数据长度不足,无法解析MAC": "Insufficient Data for MAC",
|
||||||
|
"未连接心率带": "No Heart Rate Monitor",
|
||||||
|
"获取设备状态异常": "Error Getting Status",
|
||||||
|
"设备状态请求失败": "Status Request Failed",
|
||||||
|
"请求失败": "Request Failed",
|
||||||
|
"未知错误": "Unknown Error",
|
||||||
|
"传感器mac读取失败": "Failed to Read Sensor MAC",
|
||||||
|
"绑定成功": "Binding Successful",
|
||||||
|
"服务器失败": "Server Error",
|
||||||
|
"更新睡眠习惯": "Update Sleep Habits",
|
||||||
|
"TopSlideNotification 未显示:context 不可用或未挂载": "TopSlideNotification not shown: context unavailable",
|
||||||
|
"设备ID": "Device ID",
|
||||||
|
"设备ID:": "Device ID :",
|
||||||
|
"房间": "Room",
|
||||||
|
"未分配房间": "Unassigned",
|
||||||
|
"已绑定": "Bound",
|
||||||
|
"控制": "Control",
|
||||||
|
"已分享:": "Shared:",
|
||||||
|
"人": "people",
|
||||||
|
"来自": "From",
|
||||||
|
"的分享": "'s share",
|
||||||
|
"睡眠报告": "Sleep Report",
|
||||||
|
"未知类型设备": "Unknown Device Type",
|
||||||
|
"SWES 智能床": "SWES Smart Bed",
|
||||||
|
"SWES 智能床垫": "SWES Smart Mattress",
|
||||||
|
"标题": "Title",
|
||||||
|
"分享标题": "Share Title",
|
||||||
|
"分享内容": "Share Content",
|
||||||
|
"立即分享": "Share Now",
|
||||||
|
"失败": "Failed",
|
||||||
|
"添加设备": "Add Device",
|
||||||
|
"选择类型": "Select Type",
|
||||||
|
"权限提示": "Permissions Required",
|
||||||
|
"应用需要蓝牙和位置权限才能扫描设备。请授予权限。": "Bluetooth and location permissions required for scanning.",
|
||||||
|
"蓝牙未开启": "Bluetooth Off",
|
||||||
|
"请先打开蓝牙在进行设备扫描": "Enable Bluetooth first",
|
||||||
|
"等待扫描": "Waiting to Scan",
|
||||||
|
"扫描中": "Scanning",
|
||||||
|
"最小信号强度": "Minimum Signal",
|
||||||
|
"检索设备": "Search Devices",
|
||||||
|
"匹配出的外围设备": "Matched Devices",
|
||||||
|
"蓝牙绑定提示": "For binding, enable Bluetooth and stay within 3m.",
|
||||||
|
"校准未完成提示": "Calibration incomplete. Exit anyway?",
|
||||||
|
"下一步": "Next",
|
||||||
|
"离床校准": "Bed Exit Calibration",
|
||||||
|
"未完成": "Incomplete",
|
||||||
|
"已完成": "Completed",
|
||||||
|
"位置校准": "Position Calibration",
|
||||||
|
"床头": "Headboard",
|
||||||
|
"校准完成": "Calibration Complete",
|
||||||
|
"校准失败": "Calibration Failed",
|
||||||
|
"离床校准提示": "Please leave the bed and keep quiet during calibration",
|
||||||
|
"位置校准提示": "Lie on designated side for 10 seconds",
|
||||||
|
"s后超时": "s timeout",
|
||||||
|
"开始校准": "Start Calibration",
|
||||||
|
"重新校准": "Recalibrate",
|
||||||
|
"设备校准进度": "Calibration Progress",
|
||||||
|
"设备校准完成": "Calibration Complete",
|
||||||
|
"请校准人员保持在床状态": "Please stay on bed",
|
||||||
|
"请校准人员暂时离开床铺": "Please leave the bed",
|
||||||
|
"请保持身体静止": "Please stay still",
|
||||||
|
"查询绑定流程": "Check Binding Process",
|
||||||
|
"更新绑定流程": "Update Binding Process",
|
||||||
|
"请开始B侧校准": "Start Side B Calibration",
|
||||||
|
"请校准人员到箭头指定一侧平躺 保持静止后点击开始,保持10秒": "Lie on designated side for 10 seconds",
|
||||||
|
"开始另外一侧校准": "Start Other Side",
|
||||||
|
"单侧校准完成,请移动到另外一侧": "One side complete, move to other side",
|
||||||
|
"保存用户信息": "Save User Info",
|
||||||
|
"保存成功": "Saved Successfully",
|
||||||
|
"保存失败": "Save Failed",
|
||||||
|
"姓名": "Name",
|
||||||
|
"请输入姓名": "Enter Name",
|
||||||
|
"女": "Female",
|
||||||
|
"男": "Male",
|
||||||
|
"性别": "Gender",
|
||||||
|
"身高(cm)": "Height(cm)",
|
||||||
|
"体重(kg)": "Weight(kg)",
|
||||||
|
"生日": "Birthday",
|
||||||
|
"yyyy年MM月dd日": "yyyy-MM-dd",
|
||||||
|
"请输入联系方式": "Enter Phone",
|
||||||
|
"未配置网络提示": "Network Not Configured",
|
||||||
|
"wifi配置": "WiFi Setup",
|
||||||
|
"可用WLAN": "Available WLAN",
|
||||||
|
"输入wifi密码": "Enter WiFi Password",
|
||||||
|
"配网成功": "Network Configured",
|
||||||
|
"配网失败": "Configuration Failed",
|
||||||
|
"4g设备配置wifi提示": "4G Device WiFi Setup",
|
||||||
|
"获取设备网络类型失败": "Failed to Get Network Type",
|
||||||
|
"刷新": "Refresh",
|
||||||
|
"获取wifi列表成功": "WiFi List Retrieved",
|
||||||
|
"获取wifi列表失败": "Failed to Get WiFi List",
|
||||||
|
"设备连接超时,请重试": "Connection Timeout, Retry",
|
||||||
|
"连接成功": "Connected",
|
||||||
|
"连接失败": "Connection Failed",
|
||||||
|
"设备连接失败": "Device Connection Failed",
|
||||||
|
"扫描过程中发生错误": "Scan Error",
|
||||||
|
"关闭蓝牙连接成功": "Bluetooth Disconnected",
|
||||||
|
"设备列表": "Device List",
|
||||||
|
"设备信息": "Device Info",
|
||||||
|
"将以下设备分享给您的家人或朋友": "Share these devices With family or friends",
|
||||||
|
"请输入对方手机号/邮箱号": "Enter Recipient's Phone/Email",
|
||||||
|
"点击复制APP下载链接": "Tap to Copy App Link",
|
||||||
|
"允许对方控制和查看该设备": "Allow Control & View",
|
||||||
|
"仅允许对方查看该设备": "View Only",
|
||||||
|
"发送邀请": "Send Invite",
|
||||||
|
"已分享用户": "Shared Users",
|
||||||
|
"请选择省": "Select Province",
|
||||||
|
"请选择市": "Select City",
|
||||||
|
"请选择地区": "Select District",
|
||||||
|
"请选择街道": "Select Street",
|
||||||
|
"编辑地址": "Edit Address",
|
||||||
|
"地址信息": "Address Info",
|
||||||
|
"收件人": "Recipient",
|
||||||
|
"所在地区": "Region",
|
||||||
|
"详细地址": "Detailed Address",
|
||||||
|
"地址不能为空": "Address Required",
|
||||||
|
"名字不能为空": "Name Required",
|
||||||
|
"详细地址不能为空": "Detailed Address Required",
|
||||||
|
"手机号不能为空": "Phone Required",
|
||||||
|
"无效的手机号码": "Invalid Phone",
|
||||||
|
"保存": "Save",
|
||||||
|
"智能设备名称": "Smart Device Name",
|
||||||
|
"智能电动床": "Smart Electric Bed",
|
||||||
|
"律动智能床垫": "Massage Smart Mattress",
|
||||||
|
"更新设备信息": "Update Device Info",
|
||||||
|
"修改名称成功": "Name Updated",
|
||||||
|
"请输入设备的名称": "Enter Device Name",
|
||||||
|
"完成": "Done",
|
||||||
|
"预约体验": "Book Experience",
|
||||||
|
"待开发功能": "Coming Soon",
|
||||||
|
"请输入门店名称": "Enter Store Name",
|
||||||
|
"咨询": "Consult",
|
||||||
|
"未检测到导航软件": "No Navigation App",
|
||||||
|
"选择地图": "Select Map",
|
||||||
|
"导航": "Navigate",
|
||||||
|
"预约": "Book",
|
||||||
|
"问题与帮助": "Help",
|
||||||
|
"设备列表请求失败": "Device List Error",
|
||||||
|
"设备列表请求成功": "Device List Retrieved",
|
||||||
|
"请求成功": "Request Successful",
|
||||||
|
"用户操作:解绑设备": "Unbind Device",
|
||||||
|
"操作失败": "Operation Failed",
|
||||||
|
"操作成功": "Operation Successful",
|
||||||
|
"请求人员信息列表": "Request User List",
|
||||||
|
"请求睡眠信息列表": "Request Sleep Data",
|
||||||
|
"更新控制倒计时": "Update Timer",
|
||||||
|
"查询控制倒计时": "Check Timer",
|
||||||
|
"请先": "Please",
|
||||||
|
"登录": "Login",
|
||||||
|
"后,再查看睡眠报告": "to view sleep reports",
|
||||||
|
"健康报告": "Health Report",
|
||||||
|
"暂无数据": "No Data",
|
||||||
|
"发现新版本": "New Version Available",
|
||||||
|
"知道了": "Back",
|
||||||
|
"周一": "Mon",
|
||||||
|
"周二": "Tue",
|
||||||
|
"周三": "Wed",
|
||||||
|
"周四": "Thu",
|
||||||
|
"周五": "Fri",
|
||||||
|
"周六": "Sat",
|
||||||
|
"周日": "Sun",
|
||||||
|
"添加新设备": "Add New Device",
|
||||||
|
"暂无内容!": "No Content!",
|
||||||
|
"切换语言": "Change Language",
|
||||||
|
"左": "Left",
|
||||||
|
"全局": "Global",
|
||||||
|
"右": "Right",
|
||||||
|
"一键助眠": "One-Tap Sleep",
|
||||||
|
"疲劳缓解": "Fatigue Relief",
|
||||||
|
"全身放松": "Full Relaxation",
|
||||||
|
"腿部律动": "Leg Massage",
|
||||||
|
"垂直律动": "Vertical Vibration",
|
||||||
|
"加热": "Heating",
|
||||||
|
"柔性唤醒": "Gentle Wake-up",
|
||||||
|
"记忆": "Memory",
|
||||||
|
"消息详情": "Message Details",
|
||||||
|
"同意": "Agree",
|
||||||
|
"已同意": "Agreed",
|
||||||
|
"已过期": "Expired",
|
||||||
|
"未知状态": "Unknown",
|
||||||
|
"消息中心": "Messages",
|
||||||
|
"全部已读": "Mark All Read",
|
||||||
|
"系统消息": "System Messages",
|
||||||
|
"体征消息": "Health Alerts",
|
||||||
|
"查看详情": "View Details",
|
||||||
|
"未知数据": "Unknown",
|
||||||
|
"未知指标": "Unknown Indicator",
|
||||||
|
"无需处理": "No Action Needed",
|
||||||
|
"待处理": "Pending",
|
||||||
|
"已处理": "Processed",
|
||||||
|
"已超时": "Timeout",
|
||||||
|
"取消预约": "Cancel Appointment",
|
||||||
|
"必须登录提示": "Login Required",
|
||||||
|
"微信用户": "WeChat User",
|
||||||
|
"我的智能设备": "My Smart Devices",
|
||||||
|
"我绑定或关联的智能床,智能床垫等智能设备": "My smart beds/mattresses",
|
||||||
|
"门店体验": "Store Experience",
|
||||||
|
"如果想免费体验智能设备,可在此进行提前预约": "Book free product demos",
|
||||||
|
"设备报修": "Device Repair",
|
||||||
|
"当您的智能设备需要报修时,可以通过该功能联系解决,": "Request device repairs here",
|
||||||
|
"网上商城": "Online Store",
|
||||||
|
"最新的智能产品线上购买服务": "Shop smart products",
|
||||||
|
"用于收货和报修时联系您": "For deliveries/repairs",
|
||||||
|
"常见的问题汇总,如:智能床连接流程、如何查看睡眠报告": "FAQs & Guides",
|
||||||
|
"在线客服": "Customer Service",
|
||||||
|
"购买和使用智能床过程中,如果遇到疑问可与客服进行联系": "Contact support for help",
|
||||||
|
"修改密码": "Change Password",
|
||||||
|
"点击了容器": "Container Tapped",
|
||||||
|
"当前版本": "Current Version",
|
||||||
|
"简体中文": "Simplified Chinese",
|
||||||
|
"用户协议": "User Agreement",
|
||||||
|
"隐私协议": "Privacy Policy",
|
||||||
|
"退出登录": "Logout",
|
||||||
|
"ICP备案号:浙ICP备2023000785号-1": "ICP:浙ICP备2023000785号-1",
|
||||||
|
"Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有": "Copyright © 202-2025 Jiaxing Taihe IT Co.",
|
||||||
|
"Copyright © 202-2025 杭州欢睡科技有限公司 版权所有": "Copyright © 202-2025 Hangzhou Huanshui Tech",
|
||||||
|
"请选择身高": "Select Height",
|
||||||
|
"请选择体重": "Select Weight",
|
||||||
|
"请输入正确的联系人电话": "Valid Phone Required",
|
||||||
|
"更新失败": "Update Failed",
|
||||||
|
"系列:": "Series: ",
|
||||||
|
"型号:": "Model: ",
|
||||||
|
"序列号:": "SN: ",
|
||||||
|
"报修单号:": "Ticket: ",
|
||||||
|
"提交时间:": "Submitted: ",
|
||||||
|
"问题描述:": "Issue: ",
|
||||||
|
"报修状态": "Repair Status",
|
||||||
|
"页面返回事件": "Page Back",
|
||||||
|
"审核中": "Reviewing",
|
||||||
|
"审核通过": "Approved",
|
||||||
|
"维修中": "Repairing",
|
||||||
|
"维修完成": "Repaired",
|
||||||
|
"已评价": "Rated",
|
||||||
|
"报修须知": "Repair Notice",
|
||||||
|
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ": " Dear user, thank you for choosing our product. If the device encounters a malfunction during use and requires repair, please first ensure it is properly connected to the controller or network, check whether the settings are correct, and rule out any misuse. If the issue persists, please record the device name, device ID, and a detailed description of the issue so that we can assist you efficiently. You can request service directly through the warranty page in the Smart Cotton Candy App or by calling ",
|
||||||
|
" 反馈。": " for help.",
|
||||||
|
"我要报修": "Request Repair",
|
||||||
|
"报修历史": "Repair History",
|
||||||
|
"亩核通过": "Approved",
|
||||||
|
"查询房间列表": "Get Room List",
|
||||||
|
"更新成功": "Updated",
|
||||||
|
"评价": "Rate",
|
||||||
|
"我要评价": "Leave Review",
|
||||||
|
"差": "Poor",
|
||||||
|
"较差": "Fair",
|
||||||
|
"一般": "Average",
|
||||||
|
"优秀": "Good",
|
||||||
|
"完美": "Excellent",
|
||||||
|
"未评分": "Unrated",
|
||||||
|
"再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!": "Your feedback matters most. We strive for 100% satisfaction!",
|
||||||
|
"提交": "Submit",
|
||||||
|
"请输入关键字": "Enter Keywords",
|
||||||
|
"搜索": "Search",
|
||||||
|
"解除分享": "Revoke Share",
|
||||||
|
"再按一次退出程序": "Press again to exit",
|
||||||
|
"睡眠习惯": "Sleep Habits",
|
||||||
|
"睡眠隐私": "Sleep Privacy",
|
||||||
|
"睡眠隐私功能": "Privacy Mode",
|
||||||
|
"开始时间": "Start Time",
|
||||||
|
"结束时间": "End Time",
|
||||||
|
"*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。": "*Note: Sleep data won't be collected during privacy hours.",
|
||||||
|
"查询设备绑定人员列表": "Get Bound Users",
|
||||||
|
"未知数据格式": "Unknown Data Format",
|
||||||
|
"后,再进行设备控制": "to control devices",
|
||||||
|
"请选择登录方式": "Select Login Method",
|
||||||
|
"账户不能为空": "Account Required",
|
||||||
|
"密码不能为空": "Password Required",
|
||||||
|
"请输入手机号": "Enter Phone",
|
||||||
|
"请输入正确的手机号": "Valid Phone Required",
|
||||||
|
"验证码不能为空": "Verification Code Required",
|
||||||
|
"需要同意协议": "Must Agree to Terms",
|
||||||
|
"用户登录": "Login",
|
||||||
|
"发送验证码": "Send Code",
|
||||||
|
"发送验证码成功": "Code Sent",
|
||||||
|
"请先安装微信APP,再使用微信登录": "Install WeChat to login",
|
||||||
|
"微信登录": "WeChat Login",
|
||||||
|
"请先安装微信APP,再联系客服": "Install WeChat to contact support",
|
||||||
|
"请输入密码": "Enter Password",
|
||||||
|
"密码格式提示": "Password rules:\n1. Minimum 8 characters\n2. Letters + numbers\n3. Special/Uppercase required",
|
||||||
|
"请输入确认密码": "Confirm Password",
|
||||||
|
"两次密码不一致": "Passwords Don't Match",
|
||||||
|
"请输入验证码": "Enter Verification Code",
|
||||||
|
"用户注册": "Register",
|
||||||
|
"注册成功": "Registration Successful",
|
||||||
|
"获取验证码": "Get Code",
|
||||||
|
"编辑资料": "Edit Profile",
|
||||||
|
"点击更换头像": "Change Avatar",
|
||||||
|
"找回密码": "Password Reset",
|
||||||
|
"请输验证码": "Enter Code",
|
||||||
|
"网络未连接,请开启设备网络后重试": "No Network Connection",
|
||||||
|
"秒": "seconds",
|
||||||
|
"请输入新密码": "Enter New Password",
|
||||||
|
"确认新密码": "Confirm Password",
|
||||||
|
"用户拒绝授权": "Permission Denied",
|
||||||
|
"用户取消授权": "Authorization Cancelled",
|
||||||
|
"退出": "Exit",
|
||||||
|
"密码登录": "Account",
|
||||||
|
"短信登录": "SMS",
|
||||||
|
"请输入账号": "Enter Account",
|
||||||
|
"我已阅读并同意": "I agree to the",
|
||||||
|
"《用户协议》": "《Terms》",
|
||||||
|
"与": "and",
|
||||||
|
"《隐私协议》": "《Privacy》",
|
||||||
|
"注:首次登录会自动创建账号": "Note: First login creates account",
|
||||||
|
"还没有账号?": "No account?",
|
||||||
|
"前往注册": "Register",
|
||||||
|
"其他登录方式": "Other Methods",
|
||||||
|
"未同意协议": "Agreement Not Accepted",
|
||||||
|
"合肥眠花糖家具有限责任公司版权所有": "© Hefei Mianhuatang Furniture Co.",
|
||||||
|
"请确认密码": "Confirm Password",
|
||||||
|
"床垫全局": "Mattress Global",
|
||||||
|
"床垫左侧": "Mattress Left",
|
||||||
|
"床垫右侧": "Mattress Right",
|
||||||
|
"柔性唤醒功能": "Gentle Wake-up",
|
||||||
|
"唤醒时间": "Wake-up Time",
|
||||||
|
"开": "On",
|
||||||
|
"关": "Off",
|
||||||
|
"按摩": "Massage",
|
||||||
|
"唤醒部位": "Wake-up Area",
|
||||||
|
"自定义": "Custom",
|
||||||
|
"*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。": "*Note: Gentle vibration will start at set time.",
|
||||||
|
"输入手机号码": "Enter Phone",
|
||||||
|
"输入验证码": "Enter Code",
|
||||||
|
"输入新密码": "New Password",
|
||||||
|
"更新时间": "Updated",
|
||||||
|
"是否在床": "On Bed",
|
||||||
|
"设备故障": "Device Fault",
|
||||||
|
"网络状态": "Network Status",
|
||||||
|
"较弱": "Weak",
|
||||||
|
"离床": "Off Bed",
|
||||||
|
"在床": "On Bed",
|
||||||
"首页": "Home",
|
"首页": "Home",
|
||||||
"报告": "Reports",
|
"报告": "Reports",
|
||||||
"控制": "Control",
|
"我的": "Mine",
|
||||||
"我的": "Mine"
|
"查询失败": "Query Failed",
|
||||||
},
|
"退出成功": "Logout Successful",
|
||||||
"标题": {
|
"最长字符为8个字": "Maximum 8 characters",
|
||||||
"智能床名称": "Smart Bed Name",
|
"未选择图片": "No Image Selected",
|
||||||
"设置": "Settings",
|
"上传成功": "Upload Successful",
|
||||||
"详情": "Details",
|
"头像上传失败": "Avatar Upload Failed",
|
||||||
"人员资料": "User Info"
|
"请输入正确的手机号/邮箱号": "Please enter valid phone/email",
|
||||||
}
|
"上传限制": "Upload Limit",
|
||||||
|
"用户未存在手机号": "User has no phone number",
|
||||||
|
"选择生日": "Select Birthday",
|
||||||
|
"日报": "Day",
|
||||||
|
"周报": "Week",
|
||||||
|
"月报": "Month",
|
||||||
|
"名称": "Name",
|
||||||
|
"本周": "Week",
|
||||||
|
"上周": "L.Week",
|
||||||
|
"范围": "Range",
|
||||||
|
"本月": "Month",
|
||||||
|
"上月": "L.Month",
|
||||||
|
"与上月对比": "VS Last Month",
|
||||||
|
"最低分": "Min",
|
||||||
|
"本周平均分": "Weekly Avg",
|
||||||
|
"最高分": "Max",
|
||||||
|
"每日得分": "Day Score",
|
||||||
|
"本周睡眠时长": "Weekly Sleep",
|
||||||
|
"用户本周睡眠分数的汇总": "Weekly Sleep Score Summary",
|
||||||
|
"用户本月睡眠分数的汇总": "Monthly Sleep Score Summary",
|
||||||
|
"参考范围": "Range",
|
||||||
|
"与上周对比": "VS Last Week",
|
||||||
|
"本月平均分": "Monthly Avg",
|
||||||
|
"选择月份": "Select Month",
|
||||||
|
"一": "Mon",
|
||||||
|
"二": "Tue",
|
||||||
|
"三": "Wed",
|
||||||
|
"四": "Thu",
|
||||||
|
"五": "Fri",
|
||||||
|
"六": "Sat",
|
||||||
|
"日": "Sun",
|
||||||
|
"选择语言": "Select Language",
|
||||||
|
"person_info_A": "Profile A",
|
||||||
|
"person_info_B": "Profile B",
|
||||||
|
"本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和": "The monthly sleep duration refers to the total actual sleep time of the user from the beginning to the end of the month.",
|
||||||
|
"本月睡眠时长": "Monthly Sleep Duration",
|
||||||
|
"睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last month’s score to analyze recent changes in sleep quality, helping you understand fluctuations and adjust your routine accordingly.",
|
||||||
|
"本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。": "Weekly sleep duration refers to the total actual sleep time from Monday to Sunday.",
|
||||||
|
"睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last week's score to analyze changes in sleep quality, helping you understand fluctuations and adjust your routine.",
|
||||||
|
"选择性别": "Select Gender",
|
||||||
|
"选择身高": "Select Height",
|
||||||
|
"选择体重": "Select Weight",
|
||||||
|
"年": "year",
|
||||||
|
"月": "month",
|
||||||
|
"day": "day",
|
||||||
|
"设备名称": "Device Name",
|
||||||
|
"身高": "Height",
|
||||||
|
"体重": "Weight",
|
||||||
|
"体征传感器A": "Vital Sign Sensor A",
|
||||||
|
"体征传感器B": "Vital Sign Sensor B",
|
||||||
|
"该设备只可被一个用户绑定,": "This device can only be bound to one user.",
|
||||||
|
"解绑后": "After unbinding ",
|
||||||
|
"其他用户才可以绑定": "Only other users can bind",
|
||||||
|
"请输入联系人": "Enter contact",
|
||||||
|
"正在打开微信客服...": "Opening WeChat Support...",
|
||||||
|
"起床时间:": "Wake Up:",
|
||||||
|
"入睡时间:": "Sleep Time",
|
||||||
|
"入睡时间": "Sleep Time",
|
||||||
|
"起床时间": "起床时间",
|
||||||
|
"次": "Times",
|
||||||
|
"次/分": "times/min",
|
||||||
|
"毫秒": "ms",
|
||||||
|
"sleep_duration": "Sleep Duration",
|
||||||
|
"deep_sleep": "Deep Sleep",
|
||||||
|
"light_sleep": "Light Sleep",
|
||||||
|
"小时": "hour",
|
||||||
|
"今日": "Today",
|
||||||
|
"30天平均分": "30-Day Average Score",
|
||||||
|
"睡眠评分": "Sleep Score",
|
||||||
|
"睡眠等级": "Sleep Level",
|
||||||
|
"睡眠规律性": "Sleep Regularity",
|
||||||
|
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。": "Sleep regularity reflects how consistent your sleep time, duration, and habits are — a key factor in overall sleep quality.",
|
||||||
|
"分钟": "min",
|
||||||
|
"睡眠时长": "Sleep Time",
|
||||||
|
"当前属于": " Current:",
|
||||||
|
"与昨日对比分析": "Comparison with Yesterday",
|
||||||
|
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。": "A time-based horizontal comparison method that contrasts current (today's) data, status, and behaviors with those of the previous day (yesterday) to identify differences, trends, or patterns, enabling observation of short-term dynamic changes in the user's time series.",
|
||||||
|
"今日数据": "Today's Data",
|
||||||
|
"昨日数据": "Yesterday's Data",
|
||||||
|
"心率散点图": "Heart Rate Points Chart",
|
||||||
|
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。": "The electrocardiogram scatter plot is a nonlinear graphical representation of continuous heartbeats showing RR intervals. Since the plot consists of scattered points, it is also called a scatter plot.",
|
||||||
|
"心率数据": "Heart Rate Data",
|
||||||
|
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。": "Heart rate data refers to the basic heart rate measurements collected during a user's sleep. It helps preliminarily assess cardiovascular load and autonomic nervous system function during sleep, providing important insights for sleep health evaluation.",
|
||||||
|
"正常范围": "Normal Range",
|
||||||
|
"心率变异性(HRV)": "Heart Rate Variability (HRV)",
|
||||||
|
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。": "Heart Rate Variability (HRV) refers to the variation in time intervals between heartbeats. It reflects the autonomic nervous system’s (sympathetic and parasympathetic) regulation of the heart and is an important indicator for assessing cardiovascular health and stress levels.",
|
||||||
|
"测量值": "Value",
|
||||||
|
"趋势": "Trend",
|
||||||
|
"呼吸数据": "Respiratory Data",
|
||||||
|
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。": "Respiratory data refers to the user's basic breathing information during sleep. It is a key indicator for evaluating sleep breathing quality and screening for sleep-related breathing disorders.",
|
||||||
|
"打鼾监测": "Snoring Monitoring",
|
||||||
|
"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。": "Snoring monitoring refers to the charted analysis of snoring frequency during the user's sleep.",
|
||||||
|
"呼吸暂停监测": "Apnea Monitoring",
|
||||||
|
"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。": "Apnea monitoring refers to the charted analysis of breathing pauses during the user's sleep.",
|
||||||
|
"心理健康评估": "Mental Health Assessment",
|
||||||
|
"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。": "Mental health assessment is based on sleep report data such as timestamps, vital signs, and HRV to evaluate the user's psychological well-being and fatigue level.",
|
||||||
|
"慢性病风险指数": "Chronic Disease Risk Index",
|
||||||
|
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。": "The Chronic Disease Risk Index is a quantitative model that integrates physiological indicators and lifestyle factors to estimate the likelihood of developing chronic non-communicable diseases such as hypertension, diabetes, coronary heart disease, and cancer.",
|
||||||
|
"自主神经平衡指数": "Autonomic Balance Index",
|
||||||
|
"自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。": "The Autonomic Nervous System Balance Index is an important metric for assessing ANS function, reflecting the balance between sympathetic and parasympathetic nervous activity.",
|
||||||
|
"皮肤指数": "Skin Index",
|
||||||
|
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "The Skin Index is a composite metric derived from physiological data during sleep by measuring skin conductance. It evaluates physiological stress and autonomic nervous activity during sleep."
|
||||||
}
|
}
|
||||||
@@ -1,220 +1,592 @@
|
|||||||
{
|
{
|
||||||
"语言名称": "简体中文",
|
"语言名称": "简体中文",
|
||||||
"菜单": {
|
"网页载入完毕": "网页载入完毕",
|
||||||
"首页": "首页",
|
"关于我们": "关于我们",
|
||||||
"报告": "报告",
|
"地址管理": "地址管理",
|
||||||
"控制": "控制",
|
"添加新地址": "添加新地址",
|
||||||
"我的": "我的"
|
"默认": "默认",
|
||||||
},
|
"无详细地址": "无详细地址",
|
||||||
"标题": {
|
"编辑": "编辑",
|
||||||
"智能床名称": "智能床名称",
|
"报修成功标题": "报修成功标题",
|
||||||
|
"报修成功": "报修成功",
|
||||||
|
"查看报修历史": "查看报修历史",
|
||||||
|
"返回": "返回",
|
||||||
|
"申请报修": "申请报修",
|
||||||
|
"选择需要报修的设备": "选择需要报修的设备",
|
||||||
|
"已绑设备": "已绑设备",
|
||||||
|
"未知MAC": "未知MAC",
|
||||||
|
"未知型号": "未知型号",
|
||||||
|
"暂无可选设备": "暂无可选设备",
|
||||||
|
"请选择绑定设备": "请选择绑定设备",
|
||||||
|
"查找": "查找",
|
||||||
|
"设备系列": "设备系列",
|
||||||
|
"产品型号": "产品型号",
|
||||||
|
"序列号": "序列号",
|
||||||
|
"上传设备故障照片": "上传设备故障照片",
|
||||||
|
"请描述一下您的问题": "请描述一下您的问题",
|
||||||
|
"问题描述(100个字以内)": "问题描述(100个字以内)",
|
||||||
|
"联系方式": "联系方式",
|
||||||
|
"联系人": "联系人",
|
||||||
|
"手机号码": "手机号码",
|
||||||
|
"提交报修信息": "提交报修信息",
|
||||||
|
"提交申请": "提交申请",
|
||||||
|
"请输入设备系列!": "请输入设备系列!",
|
||||||
|
"请输入设备型号!": "请输入设备型号!",
|
||||||
|
"请输入设备序列号id!": "请输入设备序列号id!",
|
||||||
|
"请输入姓名!": "请输入姓名!",
|
||||||
|
"姓名必须为2到4个汉字!": "姓名必须为2到4个汉字!",
|
||||||
|
"请输入手机号!": "请输入手机号!",
|
||||||
|
"无效的手机号!": "无效的手机号!",
|
||||||
|
"请输入问题描述!": "请输入问题描述!",
|
||||||
|
"请至少上传一张问题图片!": "请至少上传一张问题图片!",
|
||||||
|
"体征检测设备": "体征检测设备",
|
||||||
|
"智能床": "智能床",
|
||||||
|
"智能床垫": "智能床垫",
|
||||||
|
"未知设备": "未知设备",
|
||||||
|
"百度地图": "百度地图",
|
||||||
|
"腾讯地图": "腾讯地图",
|
||||||
|
"高德地图": "高德地图",
|
||||||
|
"Apple地图": "Apple地图",
|
||||||
|
"Google地图": "Google地图",
|
||||||
|
"Google地图Go": "Google地图Go",
|
||||||
|
"Petal地图": "Petal地图",
|
||||||
|
"背部律动": "背部律动",
|
||||||
|
"力度调节": "力度调节",
|
||||||
|
"强": "强",
|
||||||
|
"弱": "弱",
|
||||||
|
"按摩定时": "按摩定时",
|
||||||
|
"恢复到默认设置": "恢复到默认设置",
|
||||||
"设置": "设置",
|
"设置": "设置",
|
||||||
"详情": "详情",
|
|
||||||
"人员资料": "人员资料"
|
|
||||||
},
|
|
||||||
"请输入手机号": "输入手机号码",
|
|
||||||
"请输入正确的手机号": "请输入正确的手机号",
|
|
||||||
"请输入密码": "请输入密码",
|
|
||||||
"密码格式提示": "1.密码长度必须至少8位\n2.密码需要字母加数字\n3.特殊字符和大写字母至少包含一个",
|
|
||||||
"请输入确认密码": "请输入确认密码",
|
|
||||||
"两次密码不一致": "两次密码不一致",
|
|
||||||
"请输入验证码": "请输入验证码",
|
|
||||||
"需要同意协议": "需要同意协议",
|
|
||||||
"请选择登录方式": "请选择登录方式",
|
|
||||||
"账户不能为空": "账户不能为空",
|
|
||||||
"密码不能为空": "密码不能为空",
|
|
||||||
"验证码不能为空": "验证码不能为空",
|
|
||||||
"密码登录": "密码登录",
|
|
||||||
"短信登录": "短信登录",
|
|
||||||
"获取验证码": "获取验证码",
|
|
||||||
"登录": "登录",
|
|
||||||
"找回密码": "找回密码",
|
|
||||||
"注册": "注册",
|
|
||||||
"我已阅读并同意": "我已阅读并同意",
|
|
||||||
"与": "与",
|
|
||||||
"《用户协议》": "《用户协议》",
|
|
||||||
"《隐私协议》": "《隐私协议》",
|
|
||||||
"注:首次登录会自动创建账号": "注:首次登录会自动创建账号",
|
|
||||||
"请输入新密码": "请输入新密码",
|
|
||||||
"确认新密码": "确认新密码",
|
|
||||||
"秒": "秒",
|
|
||||||
"添加一台新设备": "添加一台新设备",
|
|
||||||
"添加新设备": "添加新设备",
|
|
||||||
"网络未连接,请开启设备网络后重试": "网络未连接,请开启设备网络后重试",
|
|
||||||
"提交": "提交",
|
|
||||||
"发送验证码成功": "发送验证码成功",
|
|
||||||
"注册成功": "注册成功",
|
|
||||||
"再按一次退出程序": "再按一次退出程序成功",
|
|
||||||
"用户拒绝授权": "用户拒绝授权",
|
|
||||||
"用户取消授权": "用户取消授权",
|
|
||||||
"未命名": "未命名",
|
"未命名": "未命名",
|
||||||
"编辑资料": "编辑资料",
|
"已连接": "已连接",
|
||||||
"保存": "保存",
|
"未连接": "未连接",
|
||||||
"点击更换头像": "点击更换头像",
|
"详情": "详情",
|
||||||
"保存失败": "保存失败",
|
"人员资料": "人员资料",
|
||||||
"昵称为空": "昵称为空",
|
"房间选择": "房间选择",
|
||||||
"保存成功": "保存成功",
|
"设备校准": "设备校准",
|
||||||
"请先登录": "请先登录",
|
"体征传感器": "体征传感器",
|
||||||
"密码修改成功": "密码修改成功",
|
"WIFI配置": "WIFI配置",
|
||||||
"未知数据": "-",
|
"分享设备": "分享设备",
|
||||||
"必须登录提示": "请先登录!",
|
"解绑": "解绑",
|
||||||
"输入验证码": "输入验证码",
|
"删除": "删除",
|
||||||
"输入新密码": "输入新密码",
|
"解绑成功": "解绑成功",
|
||||||
"确认验证码": "确认验证码",
|
"删除成功": "删除成功",
|
||||||
"输入手机号码": "输入手机号码",
|
"是否进行解绑?": "是否进行解绑?",
|
||||||
"操作成功": "操作成功",
|
"是否进行删除?": "是否进行删除?",
|
||||||
"添加设备": "添加设备",
|
"我要预约": "我要预约",
|
||||||
"扫描中": "扫描中...",
|
"体验日期": "体验日期",
|
||||||
"检索设备": "检索设备",
|
"体验时段": "体验时段",
|
||||||
"搜索": "搜索",
|
"请选择时间": "请选择时间",
|
||||||
"匹配出的外围设备": "匹配出的外围设备",
|
"体验人员": "体验人员",
|
||||||
"知道了": "返回",
|
"输入姓名": "输入姓名",
|
||||||
"蓝牙未开启": "蓝牙未开启",
|
"手机号": "手机号",
|
||||||
"请先打开蓝牙在进行设备扫描": "请先打开蓝牙在进行设备扫描",
|
"输入手机号": "输入手机号",
|
||||||
"等待扫描": "等待扫描",
|
"提交预约": "提交预约",
|
||||||
"默认设备名称": "默认设备名称",
|
"预约编号:": "预约编号:",
|
||||||
"连接异常": "连接异常",
|
"预约人员:": "预约人员:",
|
||||||
"蓝牙绑定提示": "用手机进行设备添加时,请打开手机蓝牙搜索,靠近目标位置3米以内进行。",
|
"手机号码:": "手机号码:",
|
||||||
"蓝牙连接成功": "蓝牙连接成功",
|
"体验时间:": "体验时间:",
|
||||||
"蓝牙连接失败": "蓝牙连接失败,请重试",
|
"预约门店:": "预约门店:",
|
||||||
"绑定失败请重试": "绑定失败请重试",
|
"SWES眠花糖杭州南星桥旗舰店": "SWES眠花糖杭州南星桥旗舰店",
|
||||||
"无法绑定": "无法绑定!",
|
"门店地址:": "门店地址:",
|
||||||
|
"浙江省杭州市上城区飞云江路45号一层": "浙江省杭州市上城区飞云江路45号一层",
|
||||||
|
"预约成功!": "预约成功!",
|
||||||
|
"关闭": "关闭",
|
||||||
|
"我的预约": "我的预约",
|
||||||
|
"双人版绑定标题": "双人版绑定标题",
|
||||||
|
"绑定全部": "绑定全部",
|
||||||
|
"主设备": "主设备",
|
||||||
|
"可绑定": "可绑定",
|
||||||
|
"已被绑定": "已被绑定",
|
||||||
|
"从设备": "从设备",
|
||||||
|
"确定": "确定",
|
||||||
|
"取消": "取消",
|
||||||
|
"无法绑定": "无法绑定",
|
||||||
"无法绑定1": "检测到该设备",
|
"无法绑定1": "检测到该设备",
|
||||||
"无法绑定2": "已被绑定",
|
"无法绑定2": "已被绑定",
|
||||||
"无法绑定3": ",绑定前请先进行解绑,有疑问请联系客服",
|
"无法绑定3": ",绑定前请先进行解绑,有疑问请联系客服",
|
||||||
"蓝牙绑定": {
|
"否": "否",
|
||||||
"标题": "蓝牙绑定",
|
"是": "是",
|
||||||
"扫描": "扫描蓝牙设备中…",
|
"密码为空": "密码为空",
|
||||||
"信号": "最小信号强度",
|
"连接": "连接",
|
||||||
"搜索提示": "检索设备",
|
"继续": "继续",
|
||||||
"搜索": "搜索",
|
"下次再说": "下次再说",
|
||||||
"匹配": "匹配出的外围设备",
|
"注销账号": "注销账号",
|
||||||
|
"注销智慧眠花糖账号": "注销智慧眠花糖账号",
|
||||||
|
"账号注销后,你将无法使用以下功能,": "账号注销后,你将无法使用以下功能,",
|
||||||
|
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销": "并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
|
||||||
|
",可先进行解绑后再进行注销操作。": ",可先进行解绑后再进行注销操作。",
|
||||||
|
"无法控制智能床、智能床垫等设备": "无法控制智能床、智能床垫等设备",
|
||||||
|
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。": "你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
||||||
|
"无法查询睡眠报告和体征数据": "无法查询睡眠报告和体征数据",
|
||||||
|
"注销账号后你将查询不到你以前的睡眠报告和实时数据。": "注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
||||||
|
"无法使用的其他功能": "无法使用的其他功能",
|
||||||
|
"包含设备报修、门店体验预约等。": "包含设备报修、门店体验预约等。",
|
||||||
"信号强度": "信号强度",
|
"信号强度": "信号强度",
|
||||||
|
"设备状态": "设备状态",
|
||||||
|
"其他设备正在绑定中,是否终止其他设备绑定?": "其他设备正在绑定中,是否终止其他设备绑定?",
|
||||||
|
"是否确认绑定?": "是否确认绑定?",
|
||||||
|
"连接异常": "连接异常",
|
||||||
|
"用户点击了取消": "用户点击了取消",
|
||||||
|
"添加": "添加",
|
||||||
|
"更新用户绑定流程": "更新用户绑定流程",
|
||||||
|
"默认设备名称": "默认设备名称",
|
||||||
"SN": "SN",
|
"SN": "SN",
|
||||||
"蓝牙地址": "蓝牙地址",
|
"蓝牙地址": "蓝牙地址",
|
||||||
"mac": "mac",
|
"mac": "mac",
|
||||||
"网络": "网络",
|
"网络": "网络",
|
||||||
"在线": "在线",
|
"在线": "在线",
|
||||||
"离线": "离线",
|
"离线": "离线",
|
||||||
"版本": "版本",
|
|
||||||
"默认设备名称": "未知设备",
|
|
||||||
"传感器": "传感器",
|
"传感器": "传感器",
|
||||||
"可绑定": "可绑定",
|
"版本": "版本",
|
||||||
"已被绑定": "已被绑定",
|
"蓝牙连接失败": "蓝牙连接失败",
|
||||||
"双人版绑定标题": "该设备为双人版,请选择",
|
"不支持的设备类型": "不支持的设备类型",
|
||||||
"绑定全部": "绑定全部",
|
"未能获取到MAC地址": "未能获取到MAC地址",
|
||||||
"主设备": "主设备:",
|
"获取不到传感器mac,请重试": "获取不到传感器mac,请重试",
|
||||||
"从设备": "从设备:",
|
"获取设备状态": "获取设备状态",
|
||||||
"确定": "确定",
|
"获取设备状态失败": "获取设备状态失败",
|
||||||
"取消": "取消",
|
"获取MAC失败": "获取MAC失败",
|
||||||
"无法绑定": "无法绑定!",
|
"获取MAC超时": "获取MAC超时",
|
||||||
"无法绑定1": "检测到该设备",
|
"BLE返回数据格式不正确": "BLE返回数据格式不正确",
|
||||||
"无法绑定2": "已被绑定",
|
"数据长度不足,无法解析MAC": "数据长度不足,无法解析MAC",
|
||||||
"无法绑定3": ",绑定前请先进行解绑,有疑问请联系客服",
|
"未连接心率带": "未连接心率带",
|
||||||
"知道了": "返回",
|
"获取设备状态异常": "获取设备状态异常",
|
||||||
"是": "是",
|
"设备状态请求失败": "设备状态请求失败",
|
||||||
"否": "否",
|
"请求失败": "请求失败",
|
||||||
"确定绑定提示": "确定绑定该设备吗?",
|
"未知错误": "未知错误",
|
||||||
"连接成功": "蓝牙连接成功",
|
"传感器mac读取失败": "传感器mac读取失败",
|
||||||
"连接异常": "蓝牙连接异常",
|
"绑定成功": "绑定成功",
|
||||||
"连接": "连接",
|
"服务器失败": "服务器失败",
|
||||||
"输入wifi密码": "请输入wifi密码",
|
"更新睡眠习惯": "更新睡眠习惯",
|
||||||
"显示密码": "显示",
|
"TopSlideNotification 未显示:context 不可用或未挂载": "TopSlideNotification 未显示:context 不可用或未挂载",
|
||||||
"不显示密码": "不显示"
|
"设备ID": "设备ID",
|
||||||
},
|
"设备ID:": "设备ID:",
|
||||||
"wifi页": {
|
"房间": "房间",
|
||||||
"标题": "WIFI配置",
|
"未分配房间": "未分配房间",
|
||||||
"跳过": "下一步",
|
"已绑定": "已绑定",
|
||||||
"WLAN": "网络",
|
"控制": "控制",
|
||||||
"未连接": "未连接",
|
"已分享:": "已分享:",
|
||||||
"已连接": "已连接",
|
"人": "人",
|
||||||
"可用WLAN": "可用WLAN",
|
"来自": "来自",
|
||||||
"刷新": "刷新",
|
"的分享": "的分享",
|
||||||
"密码为空": "密码不能为空",
|
"睡眠报告": "睡眠报告",
|
||||||
"配网成功": "配网成功",
|
"未知类型设备": "未知类型设备",
|
||||||
"配网失败": "配网失败",
|
"SWES 智能床": "SWES 智能床",
|
||||||
"配网中": "配网中",
|
"SWES 智能床垫": "SWES 智能床垫",
|
||||||
"需配网": "请给设备配置网络!"
|
"标题": "标题",
|
||||||
},
|
"分享标题": "分享标题",
|
||||||
"设备校准": "设备校准",
|
"分享内容": "分享内容",
|
||||||
|
"立即分享": "立即分享",
|
||||||
|
"失败": "失败",
|
||||||
|
"添加设备": "添加设备",
|
||||||
|
"选择类型": "选择类型",
|
||||||
|
"权限提示": "权限提示",
|
||||||
|
"应用需要蓝牙和位置权限才能扫描设备。请授予权限。": "应用需要蓝牙和位置权限才能扫描设备。请授予权限。",
|
||||||
|
"蓝牙未开启": "蓝牙未开启",
|
||||||
|
"请先打开蓝牙在进行设备扫描": "请先打开蓝牙在进行设备扫描",
|
||||||
|
"等待扫描": "等待扫描",
|
||||||
|
"扫描中": "扫描中",
|
||||||
|
"最小信号强度": "最小信号强度",
|
||||||
|
"检索设备": "检索设备",
|
||||||
|
"匹配出的外围设备": "匹配出的外围设备",
|
||||||
|
"蓝牙绑定提示": "用手机进行设备添加时,请打开手机蓝牙搜索,靠近目标位置3米以内进行。",
|
||||||
|
"校准未完成提示": "校准还未完成,是否确认退出校准流程?",
|
||||||
|
"下一步": "下一步",
|
||||||
"离床校准": "离床校准",
|
"离床校准": "离床校准",
|
||||||
"未完成": "未完成",
|
"未完成": "未完成",
|
||||||
"已完成": "已完成",
|
"已完成": "已完成",
|
||||||
"位置校准": "位置校准",
|
"位置校准": "位置校准",
|
||||||
"床头": "床头",
|
"床头": "床头",
|
||||||
|
"校准完成": "校准完成",
|
||||||
|
"校准失败": "校准失败",
|
||||||
"离床校准提示": "请校准人员暂时离开床铺且在校准期间保持周围安静",
|
"离床校准提示": "请校准人员暂时离开床铺且在校准期间保持周围安静",
|
||||||
"位置校准提示": "请校准人员到箭头指定一侧 平躺后点击开始,保持10秒",
|
"位置校准提示": "请校准人员到箭头指定一侧 平躺后点击开始,保持10秒",
|
||||||
|
"s后超时": "s后超时",
|
||||||
"开始校准": "开始校准",
|
"开始校准": "开始校准",
|
||||||
"校准完成": "校准完成!",
|
"重新校准": "重新校准",
|
||||||
"绑定成功": {
|
"设备校准进度": "设备校准进度",
|
||||||
"标题": "绑定完成",
|
"设备校准完成": "设备校准完成",
|
||||||
"绑定成功": "配置成功! ",
|
"请校准人员保持在床状态": "请校准人员保持在床状态",
|
||||||
"分享标题": "是否进行分享?",
|
"请校准人员暂时离开床铺": "请校准人员暂时离开床铺",
|
||||||
"分享内容": "设备绑定成功后,如需对朋友或家人共享我的睡眠情况,可以进行立即分享,分享成功后,对方即可享受查看该设备权限,可以收到该设备的睡眠报告。",
|
"请保持身体静止": "请保持身体静止",
|
||||||
"立即分享": "立即分享",
|
"查询绑定流程": "查询绑定流程",
|
||||||
"返回": "返回"
|
"更新绑定流程": "更新绑定流程",
|
||||||
},
|
"请开始B侧校准": "请开始B侧校准",
|
||||||
"设置页": {
|
"请校准人员到箭头指定一侧平躺 保持静止后点击开始,保持10秒": "请校准人员到箭头指定一侧平躺 保持静止后点击开始,保持10秒",
|
||||||
"标题": "设置",
|
"开始另外一侧校准": "开始另外一侧校准",
|
||||||
"主题模式": "主题模式",
|
"单侧校准完成,请移动到另外一侧": "单侧校准完成,请移动到另外一侧",
|
||||||
"选择语言": "选择语言",
|
"保存用户信息": "保存用户信息",
|
||||||
"关于我们": "关于我们",
|
"保存成功": "保存成功",
|
||||||
"用户协议": "用户协议",
|
"保存失败": "保存失败",
|
||||||
"隐私协议": "隐私协议",
|
"姓名": "姓名",
|
||||||
"退出登录": "退出登录",
|
"请输入姓名": "请输入姓名",
|
||||||
"注销账号": "注销账号",
|
"女": "女",
|
||||||
"退出成功": "退出成功",
|
"男": "男",
|
||||||
"退出失败": "退出失败"
|
"性别": "性别",
|
||||||
},
|
"身高(cm)": "身高(cm)",
|
||||||
|
"体重(kg)": "体重(kg)",
|
||||||
|
"生日": "生日",
|
||||||
|
"yyyy年MM月dd日": "yyyy年MM月dd日",
|
||||||
|
"请输入联系方式": "请输入联系方式",
|
||||||
|
"未配置网络提示": "未配置网络提示",
|
||||||
|
"wifi配置": "wifi配置",
|
||||||
|
"可用WLAN": "可用WLAN",
|
||||||
|
"输入wifi密码": "输入wifi密码",
|
||||||
|
"配网成功": "配网成功",
|
||||||
|
"配网失败": "配网失败",
|
||||||
|
"4g设备配置wifi提示": "4g设备配置wifi提示",
|
||||||
|
"获取设备网络类型失败": "获取设备网络类型失败",
|
||||||
|
"刷新": "刷新",
|
||||||
|
"获取wifi列表成功": "获取wifi列表成功",
|
||||||
|
"获取wifi列表失败": "获取wifi列表失败",
|
||||||
|
"设备连接超时,请重试": "设备连接超时,请重试",
|
||||||
|
"连接成功": "连接成功",
|
||||||
|
"连接失败": "连接失败",
|
||||||
|
"设备连接失败": "设备连接失败",
|
||||||
|
"扫描过程中发生错误": "扫描过程中发生错误",
|
||||||
|
"关闭蓝牙连接成功": "关闭蓝牙连接成功",
|
||||||
|
"设备列表": "设备列表",
|
||||||
|
"设备信息": "设备信息",
|
||||||
|
"将以下设备分享给您的家人或朋友": "将以下设备分享给您的家人或朋友",
|
||||||
|
"请输入对方手机号/邮箱号": "请输入对方手机号/邮箱号",
|
||||||
|
"点击复制APP下载链接": "点击复制APP下载链接",
|
||||||
|
"允许对方控制和查看该设备": "允许对方控制和查看该设备",
|
||||||
|
"仅允许对方查看该设备": "仅允许对方查看该设备",
|
||||||
|
"发送邀请": "发送邀请",
|
||||||
|
"已分享用户": "已分享用户",
|
||||||
|
"请选择省": "请选择省",
|
||||||
|
"请选择市": "请选择市",
|
||||||
|
"请选择地区": "请选择地区",
|
||||||
|
"请选择街道": "请选择街道",
|
||||||
|
"编辑地址": "编辑地址",
|
||||||
|
"地址信息": "地址信息",
|
||||||
|
"收件人": "收件人",
|
||||||
|
"所在地区": "所在地区",
|
||||||
|
"详细地址": "详细地址",
|
||||||
|
"地址不能为空": "地址不能为空",
|
||||||
|
"名字不能为空": "名字不能为空",
|
||||||
|
"详细地址不能为空": "详细地址不能为空",
|
||||||
|
"手机号不能为空": "手机号不能为空",
|
||||||
|
"无效的手机号码": "无效的手机号码",
|
||||||
|
"保存": "保存",
|
||||||
|
"智能设备名称": "智能设备名称",
|
||||||
|
"智能电动床": "智能电动床",
|
||||||
|
"律动智能床垫": "律动智能床垫",
|
||||||
|
"更新设备信息": "更新设备信息",
|
||||||
|
"修改名称成功": "修改名称成功",
|
||||||
|
"请输入设备的名称": "请输入设备的名称",
|
||||||
|
"完成": "完成",
|
||||||
|
"预约体验": "预约体验",
|
||||||
|
"待开发功能": "待开发功能",
|
||||||
|
"请输入门店名称": "请输入门店名称",
|
||||||
|
"咨询": "咨询",
|
||||||
|
"未检测到导航软件": "未检测到导航软件",
|
||||||
|
"选择地图": "选择地图",
|
||||||
|
"导航": "导航",
|
||||||
|
"预约": "预约",
|
||||||
|
"问题与帮助": "问题与帮助",
|
||||||
|
"设备列表请求失败": "设备列表请求失败",
|
||||||
|
"设备列表请求成功": "设备列表请求成功",
|
||||||
|
"请求成功": "请求成功",
|
||||||
|
"用户操作:解绑设备": "用户操作:解绑设备",
|
||||||
|
"操作失败": "操作失败",
|
||||||
"操作成功": "操作成功",
|
"操作成功": "操作成功",
|
||||||
"关于我们": "关于我们",
|
"请求人员信息列表": "请求人员信息列表",
|
||||||
|
"请求睡眠信息列表": "请求睡眠信息列表",
|
||||||
|
"更新控制倒计时": "更新控制倒计时",
|
||||||
|
"查询控制倒计时": "查询控制倒计时",
|
||||||
|
"请先": "请先",
|
||||||
|
"登录": "登录",
|
||||||
|
"后,再查看睡眠报告": "后,再查看睡眠报告",
|
||||||
|
"健康报告": "健康报告",
|
||||||
|
"暂无数据": "暂无数据",
|
||||||
|
"发现新版本": "发现新版本",
|
||||||
|
"知道了": "返回",
|
||||||
|
"周一": "周一",
|
||||||
|
"周二": "周二",
|
||||||
|
"周三": "周三",
|
||||||
|
"周四": "周四",
|
||||||
|
"周五": "周五",
|
||||||
|
"周六": "周六",
|
||||||
|
"周日": "周日",
|
||||||
|
"添加新设备": "添加新设备",
|
||||||
|
"暂无内容!": "暂无内容!",
|
||||||
|
"切换语言": "切换语言",
|
||||||
|
"左": "左",
|
||||||
|
"全局": "全局",
|
||||||
|
"右": "右",
|
||||||
|
"一键助眠": "一键助眠",
|
||||||
|
"疲劳缓解": "疲劳缓解",
|
||||||
|
"全身放松": "全身放松",
|
||||||
|
"腿部律动": "腿部律动",
|
||||||
|
"垂直律动": "垂直律动",
|
||||||
|
"加热": "加热",
|
||||||
|
"柔性唤醒": "柔性唤醒",
|
||||||
|
"记忆": "记忆",
|
||||||
|
"消息详情": "消息详情",
|
||||||
|
"同意": "同意",
|
||||||
|
"已同意": "已同意",
|
||||||
|
"已过期": "已过期",
|
||||||
|
"未知状态": "未知状态",
|
||||||
|
"消息中心": "消息中心",
|
||||||
|
"全部已读": "全部已读",
|
||||||
|
"系统消息": "系统消息",
|
||||||
|
"体征消息": "体征消息",
|
||||||
|
"查看详情": "查看详情",
|
||||||
|
"未知数据": "未知数据",
|
||||||
|
"未知指标": "未知指标",
|
||||||
|
"无需处理": "无需处理",
|
||||||
|
"待处理": "待处理",
|
||||||
|
"已处理": "已处理",
|
||||||
|
"已超时": "已超时",
|
||||||
|
"取消预约": "取消预约",
|
||||||
|
"必须登录提示": "请先登录",
|
||||||
|
"微信用户": "微信用户",
|
||||||
|
"我的智能设备": "我的智能设备",
|
||||||
|
"我绑定或关联的智能床,智能床垫等智能设备": "我绑定或关联的智能床,智能床垫等智能设备",
|
||||||
|
"门店体验": "门店体验",
|
||||||
|
"如果想免费体验智能设备,可在此进行提前预约": "如果想免费体验智能设备,可在此进行提前预约",
|
||||||
|
"设备报修": "设备报修",
|
||||||
|
"当您的智能设备需要报修时,可以通过该功能联系解决,": "当您的智能设备需要报修时,可以通过该功能联系解决,",
|
||||||
|
"网上商城": "网上商城",
|
||||||
|
"最新的智能产品线上购买服务": "最新的智能产品线上购买服务",
|
||||||
|
"用于收货和报修时联系您": "用于收货和报修时联系您",
|
||||||
|
"常见的问题汇总,如:智能床连接流程、如何查看睡眠报告": "常见的问题汇总,如:智能床连接流程、如何查看睡眠报告",
|
||||||
|
"在线客服": "在线客服",
|
||||||
|
"购买和使用智能床过程中,如果遇到疑问可与客服进行联系": "购买和使用智能床过程中,如果遇到疑问可与客服进行联系",
|
||||||
|
"修改密码": "修改密码",
|
||||||
|
"点击了容器": "点击了容器",
|
||||||
|
"当前版本": "当前版本",
|
||||||
|
"简体中文": "简体中文",
|
||||||
"用户协议": "用户协议",
|
"用户协议": "用户协议",
|
||||||
"隐私协议": "隐私协议",
|
"隐私协议": "隐私协议",
|
||||||
"退出登录": "退出登录",
|
"退出登录": "退出登录",
|
||||||
"注销账号": "注销账号",
|
"ICP备案号:浙ICP备2023000785号-1": "ICP备案号:浙ICP备2023000785号-1",
|
||||||
"我的智能设备": "我的智能设备",
|
"Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有": "Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有",
|
||||||
"解绑成功": "解绑成功",
|
"Copyright © 202-2025 杭州欢睡科技有限公司 版权所有": "Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
|
||||||
"解绑失败": "解绑失败",
|
"请选择身高": "请选择身高",
|
||||||
|
"请选择体重": "请选择体重",
|
||||||
|
"请输入正确的联系人电话": "请输入正确的联系人电话",
|
||||||
|
"更新失败": "更新失败",
|
||||||
|
"系列:": "系列: ",
|
||||||
|
"型号:": "型号: ",
|
||||||
|
"序列号:": "序列号: ",
|
||||||
|
"报修单号:": "报修单号: ",
|
||||||
|
"提交时间:": "提交时间: ",
|
||||||
|
"问题描述:": "问题描述: ",
|
||||||
|
"报修状态": "报修状态",
|
||||||
|
"页面返回事件": "页面返回事件",
|
||||||
|
"审核中": "审核中",
|
||||||
|
"审核通过": "审核通过",
|
||||||
|
"维修中": "维修中",
|
||||||
|
"维修完成": "维修完成",
|
||||||
|
"已评价": "已评价",
|
||||||
|
"报修须知": "报修须知",
|
||||||
|
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ": "尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打",
|
||||||
|
" 反馈。": "反馈。",
|
||||||
|
"我要报修": "我要报修",
|
||||||
|
"报修历史": "报修历史",
|
||||||
|
"亩核通过": "亩核通过",
|
||||||
|
"查询房间列表": "查询房间列表",
|
||||||
|
"更新成功": "更新成功",
|
||||||
|
"评价": "评价",
|
||||||
|
"我要评价": "我要评价",
|
||||||
|
"差": "差",
|
||||||
|
"较差": "较差",
|
||||||
|
"一般": "一般",
|
||||||
|
"优秀": "优秀",
|
||||||
|
"完美": "完美",
|
||||||
|
"未评分": "未评分",
|
||||||
|
"再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!": "再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!",
|
||||||
|
"提交": "提交",
|
||||||
|
"请输入关键字": "请输入关键字",
|
||||||
|
"搜索": "搜索",
|
||||||
|
"解除分享": "解除分享",
|
||||||
|
"再按一次退出程序": "再按一次退出程序",
|
||||||
|
"睡眠习惯": "睡眠习惯",
|
||||||
"睡眠隐私": "睡眠隐私",
|
"睡眠隐私": "睡眠隐私",
|
||||||
"睡眠隐私功能": "睡眠隐私功能",
|
"睡眠隐私功能": "睡眠隐私功能",
|
||||||
"开始时间": "开始时间",
|
"开始时间": "开始时间",
|
||||||
"结束时间": "结束时间",
|
"结束时间": "结束时间",
|
||||||
"取消": "取消",
|
"*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。": "*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。",
|
||||||
"确认": "确认",
|
"查询设备绑定人员列表": "查询设备绑定人员列表",
|
||||||
"时": "时",
|
"未知数据格式": "未知数据格式",
|
||||||
"分": "分",
|
"后,再进行设备控制": "后,再进行设备控制",
|
||||||
"选择性别": "选择性别",
|
"请选择登录方式": "请选择登录方式",
|
||||||
"*注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。": "*注:开启睡眠隐私功能后,在设置时间段内,将不会采集您的睡眠数据。",
|
"账户不能为空": "账户不能为空",
|
||||||
"柔性唤醒": "柔性唤醒",
|
"密码不能为空": "密码不能为空",
|
||||||
"睡眠银色": "睡眠隐私",
|
"请输入手机号": "请输入手机号",
|
||||||
"睡眠习惯": "睡眠习惯",
|
"请输入正确的手机号": "请输入正确的手机号",
|
||||||
"允许对方查看设备": "允许对方查看设备",
|
"验证码不能为空": "验证码不能为空",
|
||||||
"允许对方控制设备": "允许对方控制设备",
|
"需要同意协议": "需要同意协议",
|
||||||
"已分享用户": "已分享用户",
|
"用户登录": "用户登录",
|
||||||
"发送邀请": "发送邀请",
|
"发送验证码": "发送验证码",
|
||||||
"仅允许对方查看该设备": "仅允许对方查看该设备",
|
"发送验证码成功": "发送验证码成功",
|
||||||
"允许对方控制该设备": "允许对方控制该设备",
|
"请先安装微信APP,再使用微信登录": "请先安装微信APP,再使用微信登录",
|
||||||
"点击复制APP下载链接": "点击复制APP下载链接",
|
"微信登录": "微信登录",
|
||||||
"评价": "评价",
|
"请先安装微信APP,再联系客服": "请先安装微信APP,再联系客服",
|
||||||
"我要评价": "我要评价",
|
"请输入密码": "请输入密码",
|
||||||
"更新成功": "更新成功",
|
"密码格式提示": "1.密码长度必须至少8位\n2.密码需要字母加数字\n3.特殊字符和大写字母至少包含一个",
|
||||||
"更新失败": "更新失败",
|
"请输入确认密码": "请输入确认密码",
|
||||||
"完成": "完成",
|
"两次密码不一致": "两次密码不一致",
|
||||||
"请输入正确的联系人电话": "请输入正确的联系人电话",
|
"请输入验证码": "请输入验证码",
|
||||||
"请选择体重": "请输入体重",
|
"用户注册": "用户注册",
|
||||||
"请选择身高": "请输入身高",
|
"注册成功": "注册成功",
|
||||||
"人员资料": "人员资料",
|
"获取验证码": "获取验证码",
|
||||||
"请输入姓名": "请输入姓名",
|
"编辑资料": "编辑资料",
|
||||||
"解除分享": "解除分享",
|
"点击更换头像": "点击更换头像",
|
||||||
"最高分": "最高分",
|
"找回密码": "找回密码",
|
||||||
|
"请输验证码": "请输验证码",
|
||||||
|
"网络未连接,请开启设备网络后重试": "网络未连接,请开启设备网络后重试",
|
||||||
|
"秒": "秒",
|
||||||
|
"请输入新密码": "请输入新密码",
|
||||||
|
"确认新密码": "确认新密码",
|
||||||
|
"用户拒绝授权": "用户拒绝授权",
|
||||||
|
"用户取消授权": "用户取消授权",
|
||||||
|
"退出": "退出",
|
||||||
|
"密码登录": "密码登录",
|
||||||
|
"短信登录": "短信登录",
|
||||||
|
"请输入账号": "请输入账号",
|
||||||
|
"我已阅读并同意": "我已阅读并同意",
|
||||||
|
"《用户协议》": "《用户协议》",
|
||||||
|
"与": "与",
|
||||||
|
"《隐私协议》": "《隐私协议》",
|
||||||
|
"注:首次登录会自动创建账号": "注:首次登录会自动创建账号",
|
||||||
|
"还没有账号?": "还没有账号?",
|
||||||
|
"前往注册": "前往注册",
|
||||||
|
"其他登录方式": "其他登录方式",
|
||||||
|
"未同意协议": "未同意协议",
|
||||||
|
"合肥眠花糖家具有限责任公司版权所有": "合肥眠花糖家具有限责任公司版权所有",
|
||||||
|
"请确认密码": "请确认密码",
|
||||||
|
"床垫全局": "床垫全局",
|
||||||
|
"床垫左侧": "床垫左侧",
|
||||||
|
"床垫右侧": "床垫右侧",
|
||||||
|
"柔性唤醒功能": "柔性唤醒功能",
|
||||||
|
"唤醒时间": "唤醒时间",
|
||||||
|
"开": "开",
|
||||||
|
"关": "关",
|
||||||
|
"按摩": "按摩",
|
||||||
|
"唤醒部位": "唤醒部位",
|
||||||
|
"自定义": "自定义",
|
||||||
|
"*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。": "*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。",
|
||||||
|
"输入手机号码": "输入手机号码",
|
||||||
|
"输入验证码": "输入验证码",
|
||||||
|
"输入新密码": "输入新密码",
|
||||||
|
"更新时间": "更新时间",
|
||||||
|
"是否在床": "是否在床",
|
||||||
|
"设备故障": "设备故障",
|
||||||
|
"网络状态": "网络状态",
|
||||||
|
"较弱": "较弱",
|
||||||
|
"离床": "离床",
|
||||||
|
"在床": "在床",
|
||||||
|
"首页": "首页",
|
||||||
|
"报告": "报告",
|
||||||
|
"我的": "我的",
|
||||||
|
"查询失败": "查询失败",
|
||||||
|
"退出成功": "退出成功",
|
||||||
|
"最长字符为8个字": "最长字符为8个字",
|
||||||
|
"未选择图片": "未选择图片",
|
||||||
|
"上传成功": "上传成功",
|
||||||
|
"头像上传失败": "头像上传失败",
|
||||||
|
"请输入正确的手机号/邮箱号": "请输入正确的手机号/邮箱号",
|
||||||
|
"上传限制": "上传限制",
|
||||||
|
"用户未存在手机号": "用户未存在手机号",
|
||||||
|
"选择生日": "选择生日",
|
||||||
|
"日报": "日报",
|
||||||
|
"周报": "周报",
|
||||||
|
"月报": "月报",
|
||||||
|
"名称": "名称",
|
||||||
|
"本周": "本周",
|
||||||
|
"上周": "上周",
|
||||||
|
"范围": "范围",
|
||||||
|
"本月": "本月",
|
||||||
|
"上月": "上月",
|
||||||
|
"与上月对比": "与上月对比",
|
||||||
"最低分": "最低分",
|
"最低分": "最低分",
|
||||||
"本周平均分": "本周平均分",
|
"本周平均分": "本周平均分",
|
||||||
"本月平均分": "本月平均分",
|
"最高分": "最高分",
|
||||||
"每日得分": "每日得分",
|
"每日得分": "每日得分",
|
||||||
"每日得分介绍": "每日得分介绍",
|
"本周睡眠时长": "本周睡眠时长",
|
||||||
"与上月对比": "与上月对比",
|
"用户本周睡眠分数的汇总": "用户本周睡眠分数的汇总",
|
||||||
"设备状态":"设备状态",
|
"用户本月睡眠分数的汇总": "用户本月睡眠分数的汇总",
|
||||||
"校准未完成提示":"校准还未完成,是否确认退出校准流程?",
|
"参考范围": "参考范围",
|
||||||
"选择体重":"选择体重"
|
"与上周对比": "与上周对比",
|
||||||
|
"本月平均分": "本月平均分",
|
||||||
|
"选择月份": "选择月份",
|
||||||
|
"一": "一",
|
||||||
|
"二": "二",
|
||||||
|
"三": "三",
|
||||||
|
"四": "四",
|
||||||
|
"五": "五",
|
||||||
|
"六": "六",
|
||||||
|
"日": "日",
|
||||||
|
"选择语言": "选择语言",
|
||||||
|
"person_info_A": "人员资料A",
|
||||||
|
"person_info_B": "人员资料B",
|
||||||
|
"本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和": "本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和",
|
||||||
|
"本月睡眠时长": "本月睡眠时长",
|
||||||
|
"睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
||||||
|
"本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。": "本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。",
|
||||||
|
"睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
||||||
|
"选择性别": "选择性别",
|
||||||
|
"选择身高": "选择身高",
|
||||||
|
"选择体重": "选择体重",
|
||||||
|
"年": "年",
|
||||||
|
"月": "月",
|
||||||
|
"day": "日",
|
||||||
|
"设备名称": "设备名称",
|
||||||
|
"身高": "身高",
|
||||||
|
"体重": "体重",
|
||||||
|
"体征传感器A": "体征传感器A",
|
||||||
|
"体征传感器B": "体征传感器B",
|
||||||
|
"该设备只可被一个用户绑定,": "该设备只可被一个用户绑定,",
|
||||||
|
"解绑后": "解绑后",
|
||||||
|
"其他用户才可以绑定": "其他用户才可以绑定",
|
||||||
|
"请输入联系人": "请输入联系人",
|
||||||
|
"正在打开微信客服...": "正在打开微信客服...",
|
||||||
|
"起床时间:": "起床时间:",
|
||||||
|
"入睡时间:": "入睡时间:",
|
||||||
|
"次": "次",
|
||||||
|
"次/分": "次/分",
|
||||||
|
"毫秒": "毫秒",
|
||||||
|
"sleep_duration": "睡眠时长",
|
||||||
|
"deep_sleep": "深睡",
|
||||||
|
"light_sleep": "浅睡",
|
||||||
|
"小时": "小时",
|
||||||
|
"今日": "今日",
|
||||||
|
"30天平均分": "30天平均分",
|
||||||
|
"睡眠评分": "睡眠评分",
|
||||||
|
"睡眠等级": "睡眠等级",
|
||||||
|
"睡眠规律性": "睡眠规律性",
|
||||||
|
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。": "睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。",
|
||||||
|
"分钟": "分钟",
|
||||||
|
"睡眠时长": "睡眠时长",
|
||||||
|
"当前属于": "当前属于",
|
||||||
|
"与昨日对比分析": "与昨日对比分析",
|
||||||
|
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。": "基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。",
|
||||||
|
"今日数据": "今日数据",
|
||||||
|
"昨日数据": "昨日数据",
|
||||||
|
"心率散点图": "心率散点图",
|
||||||
|
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。": "心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。",
|
||||||
|
"心率数据": "心率数据",
|
||||||
|
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。": "心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。",
|
||||||
|
"正常范围": "正常范围",
|
||||||
|
"心率变异性(HRV)": "心率变异性(HRV)",
|
||||||
|
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。": "心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。",
|
||||||
|
"测量值": "测量值",
|
||||||
|
"趋势": "趋势",
|
||||||
|
"呼吸数据": "呼吸数据",
|
||||||
|
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。": "呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。",
|
||||||
|
"打鼾监测": "打鼾监测",
|
||||||
|
"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。": "打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。",
|
||||||
|
"呼吸暂停监测": "呼吸暂停监测",
|
||||||
|
"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。": "呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。",
|
||||||
|
"心理健康评估": "心理健康评估",
|
||||||
|
"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。": "心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。",
|
||||||
|
"慢性病风险指数": "慢性病风险指数",
|
||||||
|
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。": "慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。",
|
||||||
|
"自主神经平衡指数":"自主神经平衡指数",
|
||||||
|
"自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。": "自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。",
|
||||||
|
"皮肤指数": "皮肤指数",
|
||||||
|
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。"
|
||||||
}
|
}
|
||||||
592
assets/mhlangs/zh_TW.json
Normal file
592
assets/mhlangs/zh_TW.json
Normal file
@@ -0,0 +1,592 @@
|
|||||||
|
{
|
||||||
|
"语言名称": "繁體中文",
|
||||||
|
"网页载入完毕": "網頁載入完畢",
|
||||||
|
"关于我们": "關於我們",
|
||||||
|
"地址管理": "地址管理",
|
||||||
|
"添加新地址": "添加新地址",
|
||||||
|
"默认": "默認",
|
||||||
|
"无详细地址": "無詳細地址",
|
||||||
|
"编辑": "編輯",
|
||||||
|
"报修成功标题": "報修成功標題",
|
||||||
|
"报修成功": "報修成功",
|
||||||
|
"查看报修历史": "查看報修歷史",
|
||||||
|
"返回": "返回",
|
||||||
|
"申请报修": "申請報修",
|
||||||
|
"选择需要报修的设备": "選擇需要報修的設備",
|
||||||
|
"已绑设备": "已綁設備",
|
||||||
|
"未知MAC": "未知MAC",
|
||||||
|
"未知型号": "未知型號",
|
||||||
|
"暂无可选设备": "暫無可選設備",
|
||||||
|
"请选择绑定设备": "請選擇綁定設備",
|
||||||
|
"查找": "查找",
|
||||||
|
"设备系列": "設備系列",
|
||||||
|
"产品型号": "產品型號",
|
||||||
|
"序列号": "序列號",
|
||||||
|
"上传设备故障照片": "上傳設備故障照片",
|
||||||
|
"请描述一下您的问题": "請描述一下您的問題",
|
||||||
|
"问题描述(100个字以内)": "問題描述(100個字以內)",
|
||||||
|
"联系方式": "聯繫方式",
|
||||||
|
"联系人": "聯繫人",
|
||||||
|
"手机号码": "手機號碼",
|
||||||
|
"提交报修信息": "提交報修信息",
|
||||||
|
"提交申请": "提交申請",
|
||||||
|
"请输入设备系列!": "請輸入設備系列!",
|
||||||
|
"请输入设备型号!": "請輸入設備型號!",
|
||||||
|
"请输入设备序列号id!": "請輸入設備序列號id!",
|
||||||
|
"请输入姓名!": "請輸入姓名!",
|
||||||
|
"姓名必须为2到4个汉字!": "姓名必須為2到4個漢字!",
|
||||||
|
"请输入手机号!": "請輸入手機號!",
|
||||||
|
"无效的手机号!": "無效的手機號!",
|
||||||
|
"请输入问题描述!": "請輸入問題描述!",
|
||||||
|
"请至少上传一张问题图片!": "請至少上傳一張問題圖片!",
|
||||||
|
"体征检测设备": "體徵檢測設備",
|
||||||
|
"智能床": "智能床",
|
||||||
|
"智能床垫": "智能床墊",
|
||||||
|
"未知设备": "未知設備",
|
||||||
|
"百度地图": "百度地圖",
|
||||||
|
"腾讯地图": "騰訊地圖",
|
||||||
|
"高德地图": "高德地圖",
|
||||||
|
"Apple地图": "Apple地圖",
|
||||||
|
"Google地图": "Google地圖",
|
||||||
|
"Google地图Go": "Google地圖Go",
|
||||||
|
"Petal地图": "Petal地圖",
|
||||||
|
"背部律动": "背部律動",
|
||||||
|
"力度调节": "力度調節",
|
||||||
|
"强": "強",
|
||||||
|
"弱": "弱",
|
||||||
|
"按摩定时": "按摩定時",
|
||||||
|
"恢复到默认设置": "恢復到默認設置",
|
||||||
|
"设置": "設置",
|
||||||
|
"未命名": "未命名",
|
||||||
|
"已连接": "已連接",
|
||||||
|
"未连接": "未連接",
|
||||||
|
"详情": "詳情",
|
||||||
|
"人员资料": "人員資料",
|
||||||
|
"房间选择": "房間選擇",
|
||||||
|
"设备校准": "設備校準",
|
||||||
|
"体征传感器": "體徵傳感器",
|
||||||
|
"WIFI配置": "WIFI配置",
|
||||||
|
"分享设备": "分享設備",
|
||||||
|
"解绑": "解綁",
|
||||||
|
"删除": "刪除",
|
||||||
|
"解绑成功": "解綁成功",
|
||||||
|
"删除成功": "刪除成功",
|
||||||
|
"是否进行解绑?": "是否進行解綁?",
|
||||||
|
"是否进行删除?": "是否進行刪除?",
|
||||||
|
"我要预约": "我要預約",
|
||||||
|
"体验日期": "體驗日期",
|
||||||
|
"体验时段": "體驗時段",
|
||||||
|
"请选择时间": "請選擇時間",
|
||||||
|
"体验人员": "體驗人員",
|
||||||
|
"输入姓名": "輸入姓名",
|
||||||
|
"手机号": "手機號",
|
||||||
|
"输入手机号": "輸入手機號",
|
||||||
|
"提交预约": "提交預約",
|
||||||
|
"预约编号:": "預約編號:",
|
||||||
|
"预约人员:": "預約人員:",
|
||||||
|
"手机号码:": "手機號碼:",
|
||||||
|
"体验时间:": "體驗時間:",
|
||||||
|
"预约门店:": "預約門店:",
|
||||||
|
"SWES眠花糖杭州南星桥旗舰店": "SWES眠花糖杭州南星橋旗艦店",
|
||||||
|
"门店地址:": "門店地址:",
|
||||||
|
"浙江省杭州市上城区飞云江路45号一层": "浙江省杭州市上城區飛雲江路45號一層",
|
||||||
|
"预约成功!": "預約成功!",
|
||||||
|
"关闭": "關閉",
|
||||||
|
"我的预约": "我的預約",
|
||||||
|
"双人版绑定标题": "雙人版綁定標題",
|
||||||
|
"绑定全部": "綁定全部",
|
||||||
|
"主设备": "主設備",
|
||||||
|
"可绑定": "可綁定",
|
||||||
|
"已被绑定": "已被綁定",
|
||||||
|
"从设备": "從設備",
|
||||||
|
"确定": "確定",
|
||||||
|
"取消": "取消",
|
||||||
|
"无法绑定": "無法綁定",
|
||||||
|
"无法绑定1": "檢測到該設備",
|
||||||
|
"无法绑定2": "已被綁定",
|
||||||
|
"无法绑定3": ",綁定前請先進行解除綁定,有疑問請聯繫客服",
|
||||||
|
"否": "否",
|
||||||
|
"是": "是",
|
||||||
|
"密码为空": "密碼為空",
|
||||||
|
"连接": "連接",
|
||||||
|
"继续": "繼續",
|
||||||
|
"下次再说": "下次再說",
|
||||||
|
"注销账号": "註銷賬號",
|
||||||
|
"注销智慧眠花糖账号": "註銷智慧眠花糖賬號",
|
||||||
|
"账号注销后,你将无法使用以下功能,": "賬號註銷後,你將無法使用以下功能,",
|
||||||
|
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销": "並且當前有綁定以及被分享的智能床、智能床墊等設備的賬號不能註銷",
|
||||||
|
",可先进行解绑后再进行注销操作。": ",可先進行解綁後再進行註銷操作。",
|
||||||
|
"无法控制智能床、智能床垫等设备": "無法控制智能床、智能床墊等設備",
|
||||||
|
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。": "你將無法控制你的智能床、智能床墊等設備,以及與其相關的各種操作。",
|
||||||
|
"无法查询睡眠报告和体征数据": "無法查詢睡眠報告和體徵數據",
|
||||||
|
"注销账号后你将查询不到你以前的睡眠报告和实时数据。": "註銷賬號後你將查詢不到你以前的睡眠報告和實時數據。",
|
||||||
|
"无法使用的其他功能": "無法使用的其他功能",
|
||||||
|
"包含设备报修、门店体验预约等。": "包含設備報修、門店體驗預約等。",
|
||||||
|
"信号强度": "信號強度",
|
||||||
|
"设备状态": "設備狀態",
|
||||||
|
"其他设备正在绑定中,是否终止其他设备绑定?": "其他設備正在綁定中,是否終止其他設備綁定?",
|
||||||
|
"是否确认绑定?": "是否確認綁定?",
|
||||||
|
"连接异常": "連接異常",
|
||||||
|
"用户点击了取消": "用戶點擊了取消",
|
||||||
|
"添加": "添加",
|
||||||
|
"更新用户绑定流程": "更新用戶綁定流程",
|
||||||
|
"默认设备名称": "默認設備名稱",
|
||||||
|
"SN": "SN",
|
||||||
|
"蓝牙地址": "藍牙地址",
|
||||||
|
"mac": "mac",
|
||||||
|
"网络": "網絡",
|
||||||
|
"在线": "在線",
|
||||||
|
"离线": "離線",
|
||||||
|
"传感器": "傳感器",
|
||||||
|
"版本": "版本",
|
||||||
|
"蓝牙连接失败": "藍牙連接失敗",
|
||||||
|
"不支持的设备类型": "不支持的設備類型",
|
||||||
|
"未能获取到MAC地址": "未能獲取到MAC地址",
|
||||||
|
"获取不到传感器mac,请重试": "獲取不到傳感器mac,請重試",
|
||||||
|
"获取设备状态": "獲取設備狀態",
|
||||||
|
"获取设备状态失败": "獲取設備狀態失敗",
|
||||||
|
"获取MAC失败": "獲取MAC失敗",
|
||||||
|
"获取MAC超时": "獲取MAC超時",
|
||||||
|
"BLE返回数据格式不正确": "BLE返回數據格式不正確",
|
||||||
|
"数据长度不足,无法解析MAC": "數據長度不足,無法解析MAC",
|
||||||
|
"未连接心率带": "未連接心率帶",
|
||||||
|
"获取设备状态异常": "獲取設備狀態異常",
|
||||||
|
"设备状态请求失败": "設備狀態請求失敗",
|
||||||
|
"请求失败": "請求失敗",
|
||||||
|
"未知错误": "未知錯誤",
|
||||||
|
"传感器mac读取失败": "傳感器mac讀取失敗",
|
||||||
|
"绑定成功": "綁定成功",
|
||||||
|
"服务器失败": "服務器失敗",
|
||||||
|
"更新睡眠习惯": "更新睡眠習慣",
|
||||||
|
"TopSlideNotification 未显示:context 不可用或未挂载": "TopSlideNotification 未顯示:context 不可用或未掛載",
|
||||||
|
"设备ID": "設備ID",
|
||||||
|
"设备ID:": "設備ID:",
|
||||||
|
"房间": "房間",
|
||||||
|
"未分配房间": "未分配房間",
|
||||||
|
"已绑定": "已綁定",
|
||||||
|
"控制": "控制",
|
||||||
|
"已分享:": "已分享:",
|
||||||
|
"人": "人",
|
||||||
|
"来自": "來自",
|
||||||
|
"的分享": "的分享",
|
||||||
|
"睡眠报告": "睡眠報告",
|
||||||
|
"未知类型设备": "未知類型設備",
|
||||||
|
"SWES 智能床": "SWES 智能床",
|
||||||
|
"SWES 智能床垫": "SWES 智能床墊",
|
||||||
|
"标题": "標題",
|
||||||
|
"分享标题": "分享標題",
|
||||||
|
"分享内容": "分享內容",
|
||||||
|
"立即分享": "立即分享",
|
||||||
|
"失败": "失敗",
|
||||||
|
"添加设备": "添加設備",
|
||||||
|
"选择类型": "選擇類型",
|
||||||
|
"权限提示": "權限提示",
|
||||||
|
"应用需要蓝牙和位置权限才能扫描设备。请授予权限。": "應用需要藍牙和位置權限才能掃描設備。請授予權限。",
|
||||||
|
"蓝牙未开启": "藍牙未開啟",
|
||||||
|
"请先打开蓝牙在进行设备扫描": "請先打開藍牙在進行設備掃描",
|
||||||
|
"等待扫描": "等待掃描",
|
||||||
|
"扫描中": "掃描中",
|
||||||
|
"最小信号强度": "最小信號強度",
|
||||||
|
"检索设备": "檢索設備",
|
||||||
|
"匹配出的外围设备": "匹配出的外圍設備",
|
||||||
|
"蓝牙绑定提示": "用手機進行設備添加時,請打開手機藍牙搜索,靠近目標位置3米以內進行。",
|
||||||
|
"校准未完成提示": "校準還未完成,是否確認退出校準流程?",
|
||||||
|
"下一步": "下一步",
|
||||||
|
"离床校准": "離床校準",
|
||||||
|
"未完成": "未完成",
|
||||||
|
"已完成": "已完成",
|
||||||
|
"位置校准": "位置校準",
|
||||||
|
"床头": "床頭",
|
||||||
|
"校准完成": "校準完成",
|
||||||
|
"校准失败": "校準失敗",
|
||||||
|
"离床校准提示": "請校準人員暫時離開床鋪且在校準期間保持周圍安靜",
|
||||||
|
"位置校准提示": "請校準人員到箭頭指定一側 平躺後點擊開始,保持10秒",
|
||||||
|
"s后超时": "s後超時",
|
||||||
|
"开始校准": "開始校準",
|
||||||
|
"重新校准": "重新校準",
|
||||||
|
"设备校准进度": "設備校準進度",
|
||||||
|
"设备校准完成": "設備校準完成",
|
||||||
|
"请校准人员保持在床状态": "請校準人員保持在床狀態",
|
||||||
|
"请校准人员暂时离开床铺": "請校準人員暫時離開床鋪",
|
||||||
|
"请保持身体静止": "請保持身體靜止",
|
||||||
|
"查询绑定流程": "查詢綁定流程",
|
||||||
|
"更新绑定流程": "更新綁定流程",
|
||||||
|
"请开始B侧校准": "請開始B側校準",
|
||||||
|
"请校准人员到箭头指定一侧平躺 保持静止后点击开始,保持10秒": "請校準人員到箭頭指定一側平躺 保持靜止後點擊開始,保持10秒",
|
||||||
|
"开始另外一侧校准": "開始另外一側校準",
|
||||||
|
"单侧校准完成,请移动到另外一侧": "單側校準完成,請移動到另外一側",
|
||||||
|
"保存用户信息": "保存用戶信息",
|
||||||
|
"保存成功": "保存成功",
|
||||||
|
"保存失败": "保存失敗",
|
||||||
|
"姓名": "姓名",
|
||||||
|
"请输入姓名": "請輸入姓名",
|
||||||
|
"女": "女",
|
||||||
|
"男": "男",
|
||||||
|
"性别": "性別",
|
||||||
|
"身高(cm)": "身高(cm)",
|
||||||
|
"体重(kg)": "體重(kg)",
|
||||||
|
"生日": "生日",
|
||||||
|
"yyyy年MM月dd日": "yyyy年MM月dd日",
|
||||||
|
"请输入联系方式": "請輸入聯繫方式",
|
||||||
|
"未配置网络提示": "未配置網絡提示",
|
||||||
|
"wifi配置": "wifi配置",
|
||||||
|
"可用WLAN": "可用WLAN",
|
||||||
|
"输入wifi密码": "輸入wifi密碼",
|
||||||
|
"配网成功": "配網成功",
|
||||||
|
"配网失败": "配網失敗",
|
||||||
|
"4g设备配置wifi提示": "4g設備配置wifi提示",
|
||||||
|
"获取设备网络类型失败": "獲取設備網絡類型失敗",
|
||||||
|
"刷新": "刷新",
|
||||||
|
"获取wifi列表成功": "獲取wifi列表成功",
|
||||||
|
"获取wifi列表失败": "獲取wifi列表失敗",
|
||||||
|
"设备连接超时,请重试": "設備連接超時,請重試",
|
||||||
|
"连接成功": "連接成功",
|
||||||
|
"连接失败": "連接失敗",
|
||||||
|
"设备连接失败": "設備連接失敗",
|
||||||
|
"扫描过程中发生错误": "掃描過程中發生錯誤",
|
||||||
|
"关闭蓝牙连接成功": "關閉藍牙連接成功",
|
||||||
|
"设备列表": "設備列表",
|
||||||
|
"设备信息": "設備信息",
|
||||||
|
"将以下设备分享给您的家人或朋友": "將以下設備分享給您的家人或朋友",
|
||||||
|
"请输入对方手机号/邮箱号": "請輸入對方手機號/郵箱號",
|
||||||
|
"点击复制APP下载链接": "點擊複製APP下載鏈接",
|
||||||
|
"允许对方控制和查看该设备": "允許對方控制和查看該設備",
|
||||||
|
"仅允许对方查看该设备": "僅允許對方查看該設備",
|
||||||
|
"发送邀请": "發送邀請",
|
||||||
|
"已分享用户": "已分享用戶",
|
||||||
|
"请选择省": "請選擇省",
|
||||||
|
"请选择市": "請選擇市",
|
||||||
|
"请选择地区": "請選擇地區",
|
||||||
|
"请选择街道": "請選擇街道",
|
||||||
|
"编辑地址": "編輯地址",
|
||||||
|
"地址信息": "地址信息",
|
||||||
|
"收件人": "收件人",
|
||||||
|
"所在地区": "所在地區",
|
||||||
|
"详细地址": "詳細地址",
|
||||||
|
"地址不能为空": "地址不能為空",
|
||||||
|
"名字不能为空": "名字不能為空",
|
||||||
|
"详细地址不能为空": "詳細地址不能為空",
|
||||||
|
"手机号不能为空": "手機號不能為空",
|
||||||
|
"无效的手机号码": "無效的手機號碼",
|
||||||
|
"保存": "保存",
|
||||||
|
"智能设备名称": "智能設備名稱",
|
||||||
|
"智能电动床": "智能電動床",
|
||||||
|
"律动智能床垫": "律動智能床墊",
|
||||||
|
"更新设备信息": "更新設備信息",
|
||||||
|
"修改名称成功": "修改名稱成功",
|
||||||
|
"请输入设备的名称": "請輸入設備的名稱",
|
||||||
|
"完成": "完成",
|
||||||
|
"预约体验": "預約體驗",
|
||||||
|
"待开发功能": "待開發功能",
|
||||||
|
"请输入门店名称": "請輸入門店名稱",
|
||||||
|
"咨询": "諮詢",
|
||||||
|
"未检测到导航软件": "未檢測到導航軟件",
|
||||||
|
"选择地图": "選擇地圖",
|
||||||
|
"导航": "導航",
|
||||||
|
"预约": "預約",
|
||||||
|
"问题与帮助": "問題與幫助",
|
||||||
|
"设备列表请求失败": "設備列表請求失敗",
|
||||||
|
"设备列表请求成功": "設備列表請求成功",
|
||||||
|
"请求成功": "請求成功",
|
||||||
|
"用户操作:解绑设备": "用戶操作:解綁設備",
|
||||||
|
"操作失败": "操作失敗",
|
||||||
|
"操作成功": "操作成功",
|
||||||
|
"请求人员信息列表": "請求人員信息列表",
|
||||||
|
"请求睡眠信息列表": "請求睡眠信息列表",
|
||||||
|
"更新控制倒计时": "更新控制倒計時",
|
||||||
|
"查询控制倒计时": "查詢控制倒計時",
|
||||||
|
"请先": "請先",
|
||||||
|
"登录": "登錄",
|
||||||
|
"后,再查看睡眠报告": "後,再查看睡眠報告",
|
||||||
|
"健康报告": "健康報告",
|
||||||
|
"暂无数据": "暫無數據",
|
||||||
|
"发现新版本": "發現新版本",
|
||||||
|
"知道了": "返回",
|
||||||
|
"周一": "週一",
|
||||||
|
"周二": "週二",
|
||||||
|
"周三": "週三",
|
||||||
|
"周四": "週四",
|
||||||
|
"周五": "週五",
|
||||||
|
"周六": "週六",
|
||||||
|
"周日": "週日",
|
||||||
|
"添加新设备": "添加新設備",
|
||||||
|
"暂无内容!": "暫無內容!",
|
||||||
|
"切换语言": "切換語言",
|
||||||
|
"左": "左",
|
||||||
|
"全局": "全局",
|
||||||
|
"右": "右",
|
||||||
|
"一键助眠": "一鍵助眠",
|
||||||
|
"疲劳缓解": "疲勞緩解",
|
||||||
|
"全身放松": "全身放鬆",
|
||||||
|
"腿部律动": "腿部律動",
|
||||||
|
"垂直律动": "垂直律動",
|
||||||
|
"加热": "加熱",
|
||||||
|
"柔性唤醒": "柔性喚醒",
|
||||||
|
"记忆": "記憶",
|
||||||
|
"消息详情": "消息詳情",
|
||||||
|
"同意": "同意",
|
||||||
|
"已同意": "已同意",
|
||||||
|
"已过期": "已過期",
|
||||||
|
"未知状态": "未知狀態",
|
||||||
|
"消息中心": "消息中心",
|
||||||
|
"全部已读": "全部已讀",
|
||||||
|
"系统消息": "系統消息",
|
||||||
|
"体征消息": "體徵消息",
|
||||||
|
"查看详情": "查看詳情",
|
||||||
|
"未知数据": "未知數據",
|
||||||
|
"未知指标": "未知指標",
|
||||||
|
"无需处理": "無需處理",
|
||||||
|
"待处理": "待處理",
|
||||||
|
"已处理": "已處理",
|
||||||
|
"已超时": "已超時",
|
||||||
|
"取消预约": "取消預約",
|
||||||
|
"必须登录提示": "請先登錄",
|
||||||
|
"微信用户": "微信用戶",
|
||||||
|
"我的智能设备": "我的智能設備",
|
||||||
|
"我绑定或关联的智能床,智能床垫等智能设备": "我綁定或關聯的智能床,智能床墊等智能設備",
|
||||||
|
"门店体验": "門店體驗",
|
||||||
|
"如果想免费体验智能设备,可在此进行提前预约": "如果想免費體驗智能設備,可在此進行提前預約",
|
||||||
|
"设备报修": "設備報修",
|
||||||
|
"当您的智能设备需要报修时,可以通过该功能联系解决,": "當您的智能設備需要報修時,可以通過該功能聯繫解決,",
|
||||||
|
"网上商城": "網上商城",
|
||||||
|
"最新的智能产品线上购买服务": "最新的智能產品線上購買服務",
|
||||||
|
"用于收货和报修时联系您": "用於收貨和報修時聯繫您",
|
||||||
|
"常见的问题汇总,如:智能床连接流程、如何查看睡眠报告": "常見的問題匯總,如:智能床連接流程、如何查看睡眠報告",
|
||||||
|
"在线客服": "在線客服",
|
||||||
|
"购买和使用智能床过程中,如果遇到疑问可与客服进行联系": "購買和使用智能床過程中,如果遇到疑問可與客服進行聯繫",
|
||||||
|
"修改密码": "修改密碼",
|
||||||
|
"点击了容器": "點擊了容器",
|
||||||
|
"当前版本": "當前版本",
|
||||||
|
"简体中文": "簡體中文",
|
||||||
|
"用户协议": "用戶協議",
|
||||||
|
"隐私协议": "隱私協議",
|
||||||
|
"退出登录": "退出登錄",
|
||||||
|
"ICP备案号:浙ICP备2023000785号-1": "ICP備案號:浙ICP備2023000785號-1",
|
||||||
|
"Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有": "Copyright © 202-2025 嘉興太和信息技術有限責任公司 版權所有",
|
||||||
|
"Copyright © 202-2025 杭州欢睡科技有限公司 版权所有": "Copyright © 202-2025 杭州歡睡科技有限公司 版權所有",
|
||||||
|
"请选择身高": "請選擇身高",
|
||||||
|
"请选择体重": "請選擇體重",
|
||||||
|
"请输入正确的联系人电话": "請輸入正確的聯繫人電話",
|
||||||
|
"更新失败": "更新失敗",
|
||||||
|
"系列:": "系列: ",
|
||||||
|
"型号:": "型號: ",
|
||||||
|
"序列号:": "序列號: ",
|
||||||
|
"报修单号:": "報修單號: ",
|
||||||
|
"提交时间:": "提交時間: ",
|
||||||
|
"问题描述:": "問題描述: ",
|
||||||
|
"报修状态": "報修狀態",
|
||||||
|
"页面返回事件": "頁面返回事件",
|
||||||
|
"审核中": "審核中",
|
||||||
|
"审核通过": "審核通過",
|
||||||
|
"维修中": "維修中",
|
||||||
|
"维修完成": "維修完成",
|
||||||
|
"已评价": "已評價",
|
||||||
|
"报修须知": "報修須知",
|
||||||
|
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ": "尊敬的用戶,感謝您選擇我司產品。在使用過程中,如果設備出現故障需要維修,請首先確認設備是否正確連接控制器或網絡,檢查設置是否正常,排除誤操作問題。若問題依然存在,請記錄下設備名稱、設備編號、和具體故障內容,方便我們快速地為您提供幫助。您可以通過智慧棉花糖APP保修頁面直接報修或撥打",
|
||||||
|
" 反馈。": "反饋。",
|
||||||
|
"我要报修": "我要報修",
|
||||||
|
"报修历史": "報修歷史",
|
||||||
|
"亩核通过": "畝核通過",
|
||||||
|
"查询房间列表": "查詢房間列表",
|
||||||
|
"更新成功": "更新成功",
|
||||||
|
"评价": "評價",
|
||||||
|
"我要评价": "我要評價",
|
||||||
|
"差": "差",
|
||||||
|
"较差": "較差",
|
||||||
|
"一般": "一般",
|
||||||
|
"优秀": "優秀",
|
||||||
|
"完美": "完美",
|
||||||
|
"未评分": "未評分",
|
||||||
|
"再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!": "再多的溢美之詞,都比不上您真心的評價。我們願付出200%的努力,只為您100%的滿意~感謝您的支持與厚愛!",
|
||||||
|
"提交": "提交",
|
||||||
|
"请输入关键字": "請輸入關鍵字",
|
||||||
|
"搜索": "搜索",
|
||||||
|
"解除分享": "解除分享",
|
||||||
|
"再按一次退出程序": "再按一次退出程序",
|
||||||
|
"睡眠习惯": "睡眠習慣",
|
||||||
|
"睡眠隐私": "睡眠隱私",
|
||||||
|
"睡眠隐私功能": "睡眠隱私功能",
|
||||||
|
"开始时间": "開始時間",
|
||||||
|
"结束时间": "結束時間",
|
||||||
|
"注:开启睡眠隐私功能后,在设置的时间段内,将不会采集您的睡眠数据。": "注:開啟睡眠隱私功能後,在設置的時間段內,將不會採集您的睡眠數據。",
|
||||||
|
"查询设备绑定人员列表": "查詢設備綁定人員列表",
|
||||||
|
"未知数据格式": "未知數據格式",
|
||||||
|
"后,再进行设备控制": "後,再進行設備控制",
|
||||||
|
"请选择登录方式": "請選擇登錄方式",
|
||||||
|
"账户不能为空": "賬戶不能為空",
|
||||||
|
"密码不能为空": "密碼不能為空",
|
||||||
|
"请输入手机号": "請輸入手機號",
|
||||||
|
"请输入正确的手机号": "請輸入正確的手機號",
|
||||||
|
"验证码不能为空": "驗證碼不能為空",
|
||||||
|
"需要同意协议": "需要同意協議",
|
||||||
|
"用户登录": "用戶登錄",
|
||||||
|
"发送验证码": "發送驗證碼",
|
||||||
|
"发送验证码成功": "發送驗證碼成功",
|
||||||
|
"请先安装微信APP,再使用微信登录": "請先安裝微信APP,再使用微信登錄",
|
||||||
|
"微信登录": "微信登錄",
|
||||||
|
"请先安装微信APP,再联系客服": "請先安裝微信APP,再聯繫客服",
|
||||||
|
"请输入密码": "請輸入密碼",
|
||||||
|
"密码格式提示": "1.密碼長度必須至少8位\n2.密碼需要字母加數字\n3.特殊字符和大寫字母至少包含一個",
|
||||||
|
"请输入确认密码": "請輸入確認密碼",
|
||||||
|
"两次密码不一致": "兩次密碼不一致",
|
||||||
|
"请输入验证码": "請輸入驗證碼",
|
||||||
|
"用户注册": "用戶註冊",
|
||||||
|
"注册成功": "註冊成功",
|
||||||
|
"获取验证码": "獲取驗證碼",
|
||||||
|
"编辑资料": "編輯資料",
|
||||||
|
"点击更换头像": "點擊更換頭像",
|
||||||
|
"找回密码": "找回密碼",
|
||||||
|
"请输验证码": "請輸驗證碼",
|
||||||
|
"网络未连接,请开启设备网络后重试": "網絡未連接,請開啟設備網絡後重試",
|
||||||
|
"秒": "秒",
|
||||||
|
"请输入新密码": "請輸入新密碼",
|
||||||
|
"确认新密码": "確認新密碼",
|
||||||
|
"用户拒绝授权": "用戶拒絕授權",
|
||||||
|
"用户取消授权": "用戶取消授權",
|
||||||
|
"退出": "退出",
|
||||||
|
"密码登录": "密碼登錄",
|
||||||
|
"短信登录": "短信登錄",
|
||||||
|
"请输入账号": "請輸入賬號",
|
||||||
|
"我已阅读并同意": "我已閱讀並同意",
|
||||||
|
"《用户协议》": "《用戶協議》",
|
||||||
|
"与": "與",
|
||||||
|
"《隐私协议》": "《隱私協議》",
|
||||||
|
"注:首次登录会自动创建账号": "注:首次登錄會自動創建賬號",
|
||||||
|
"还没有账号?": "還沒有賬號?",
|
||||||
|
"前往注册": "前往註冊",
|
||||||
|
"其他登录方式": "其他登錄方式",
|
||||||
|
"未同意协议": "未同意協議",
|
||||||
|
"合肥眠花糖家具有限责任公司版权所有": "合肥眠花糖家具有限責任公司版權所有",
|
||||||
|
"请确认密码": "請確認密碼",
|
||||||
|
"床垫全局": "床墊全局",
|
||||||
|
"床垫左侧": "床墊左側",
|
||||||
|
"床垫右侧": "床墊右側",
|
||||||
|
"柔性唤醒功能": "柔性喚醒功能",
|
||||||
|
"唤醒时间": "喚醒時間",
|
||||||
|
"开": "開",
|
||||||
|
"关": "關",
|
||||||
|
"按摩": "按摩",
|
||||||
|
"唤醒部位": "喚醒部位",
|
||||||
|
"自定义": "自定義",
|
||||||
|
"注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。": "注:開啟該功能後,在設置的時間點,設備將啟動一段固定時長的柔性喚醒功能。",
|
||||||
|
"输入手机号码": "輸入手機號碼",
|
||||||
|
"输入验证码": "輸入驗證碼",
|
||||||
|
"输入新密码": "輸入新密碼",
|
||||||
|
"更新时间": "更新時間",
|
||||||
|
"是否在床": "是否在床",
|
||||||
|
"设备故障": "設備故障",
|
||||||
|
"网络状态": "網絡狀態",
|
||||||
|
"较弱": "較弱",
|
||||||
|
"离床": "離床",
|
||||||
|
"在床": "在床",
|
||||||
|
"首页": "首頁",
|
||||||
|
"报告": "報告",
|
||||||
|
"我的": "我的",
|
||||||
|
"查询失败": "查詢失敗",
|
||||||
|
"退出成功": "退出成功",
|
||||||
|
"最长字符为8个字": "最長字符為8個字",
|
||||||
|
"未选择图片": "未選擇圖片",
|
||||||
|
"上传成功": "上傳成功",
|
||||||
|
"头像上传失败": "頭像上傳失敗",
|
||||||
|
"请输入正确的手机号/邮箱号": "請輸入正確的手機號/郵箱號",
|
||||||
|
"上传限制": "上傳限制",
|
||||||
|
"用户未存在手机号": "用戶未存在手機號",
|
||||||
|
"选择生日": "選擇生日",
|
||||||
|
"日报": "日報",
|
||||||
|
"周报": "週報",
|
||||||
|
"月报": "月報",
|
||||||
|
"名称": "名稱",
|
||||||
|
"本周": "本週",
|
||||||
|
"上周": "上週",
|
||||||
|
"范围": "範圍",
|
||||||
|
"本月": "本月",
|
||||||
|
"上月": "上月",
|
||||||
|
"与上月对比": "與上月對比",
|
||||||
|
"最低分": "最低分",
|
||||||
|
"本周平均分": "本週平均分",
|
||||||
|
"最高分": "最高分",
|
||||||
|
"每日得分": "每日得分",
|
||||||
|
"本周睡眠时长": "本週睡眠時長",
|
||||||
|
"用户本周睡眠分数的汇总": "用戶本週睡眠分數的匯總",
|
||||||
|
"用户本月睡眠分数的汇总": "用戶本月睡眠分數的匯總",
|
||||||
|
"参考范围": "參考範圍",
|
||||||
|
"与上周对比": "與上週對比",
|
||||||
|
"本月平均分": "本月平均分",
|
||||||
|
"选择月份": "選擇月份",
|
||||||
|
"一": "一",
|
||||||
|
"二": "二",
|
||||||
|
"三": "三",
|
||||||
|
"四": "四",
|
||||||
|
"五": "五",
|
||||||
|
"六": "六",
|
||||||
|
"日": "日",
|
||||||
|
"选择语言": "選擇語言",
|
||||||
|
"person_info_A": "人員資料A",
|
||||||
|
"person_info_B": "人員資料B",
|
||||||
|
"本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和": "本月睡眠時長是指從月初到月末,用戶每天實際睡眠的時間總和",
|
||||||
|
"本月睡眠时长": "本月睡眠時長",
|
||||||
|
"睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "睡眠分數與上月分數進行對比,是通過量化分析近期睡眠質量變化,可了解自身睡眠狀態的波動情況,進而調整用戶的作息習慣。",
|
||||||
|
"本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。": "本週睡眠時長是指從週一到週日內,每天實際睡眠的時間總和。",
|
||||||
|
"睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "睡眠分數與上週分數進行對比,是通過量化分析近期睡眠質量變化,可了解自身睡眠狀態的波動情況,進而調整用戶的作息習慣。",
|
||||||
|
"选择性别": "選擇性別",
|
||||||
|
"选择身高": "選擇身高",
|
||||||
|
"选择体重": "選擇體重",
|
||||||
|
"年": "年",
|
||||||
|
"月": "月",
|
||||||
|
"day": "日",
|
||||||
|
"设备名称": "設備名稱",
|
||||||
|
"身高": "身高",
|
||||||
|
"体重": "體重",
|
||||||
|
"体征传感器A": "體徵傳感器A",
|
||||||
|
"体征传感器B": "體徵傳感器B",
|
||||||
|
"该设备只可被一个用户绑定,": "該設備只可被一個用戶綁定,",
|
||||||
|
"解绑后": "解綁後",
|
||||||
|
"其他用户才可以绑定": "其他用戶才可以綁定",
|
||||||
|
"请输入联系人": "請輸入聯繫人",
|
||||||
|
"正在打开微信客服...": "正在打開微信客服...",
|
||||||
|
"起床时间:": "起床時間:",
|
||||||
|
"入睡时间:": "入睡時間:",
|
||||||
|
"次": "次",
|
||||||
|
"次/分": "次/分",
|
||||||
|
"毫秒": "毫秒",
|
||||||
|
"sleep_duration": "睡眠時長",
|
||||||
|
"deep_sleep": "深睡",
|
||||||
|
"light_sleep": "淺睡",
|
||||||
|
"小时": "小時",
|
||||||
|
"今日": "今日",
|
||||||
|
"30天平均分": "30天平均分",
|
||||||
|
"睡眠评分": "睡眠評分",
|
||||||
|
"睡眠等级": "睡眠等級",
|
||||||
|
"睡眠规律性": "睡眠規律性",
|
||||||
|
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。": "睡眠規律性是指個體睡眠模式在時間、時長、環境等方面呈現出的穩定性和一致性,是衡量睡眠質量的重要指標之一。",
|
||||||
|
"分钟": "分鐘",
|
||||||
|
"睡眠时长": "睡眠時長",
|
||||||
|
"当前属于": "當前屬於",
|
||||||
|
"与昨日对比分析": "與昨日對比分析",
|
||||||
|
"基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。": "基於時間維度的橫向比較分析方法,通過將當前(今日)的數據、狀態、行為等與前一日(昨日)的同類信息進行對照,識別差異、趨勢或變化規律,查看用戶短期時間序列的動態變化。",
|
||||||
|
"今日数据": "今日數據",
|
||||||
|
"昨日数据": "昨日數據",
|
||||||
|
"心率散点图": "心率散點圖",
|
||||||
|
"心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。": "心電散點圖是用非線性的圖形方法描記的連續心衝擊圖的RR間期圖,因圖形由散點組成,又稱散點圖。",
|
||||||
|
"心率数据": "心率數據",
|
||||||
|
"心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。": "心率數據是指用戶在睡眠過程中基本心率數據,可初步判斷睡眠中的心血管負荷及自主神經功能狀態,為睡眠健康評估提供重要依據。",
|
||||||
|
"正常范围": "Normal Range",
|
||||||
|
"心率变异性(HRV)": "心率變異性(HRV)",
|
||||||
|
"心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。": "心率變異性(HRV)是指心臟每次跳動間隔時間的差異程度,反映自主神經系統(交感神經和副交感神經)對心臟的調節能力,是評估心血管健康和壓力狀態的重要指標。",
|
||||||
|
"测量值": "測量值",
|
||||||
|
"趋势": "趨勢",
|
||||||
|
"呼吸数据": "呼吸數據",
|
||||||
|
"呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。": "呼吸數據是指用戶在睡眠過程中呼吸的基本數據,是評估睡眠呼吸質量、篩查睡眠呼吸障礙的核心指標。",
|
||||||
|
"打鼾监测": "打鼾監測",
|
||||||
|
"打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。": "打鼾監測是指用戶在睡眠過程中打鼾頻次的圖表說明。",
|
||||||
|
"呼吸暂停监测": "呼吸暫停監測",
|
||||||
|
"呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。": "呼吸暫停監測是指用戶在睡眠過程中產生的呼吸暫停的圖表說明。",
|
||||||
|
"心理健康评估": "心理健康評估",
|
||||||
|
"心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。": "心率健康評估主要通過用戶睡眠報告中的時間點、體徵數據及HRV數據等信息,來判斷其心理健康水平、疲勞程度。",
|
||||||
|
"慢性病风险指数": "慢性病風險指數",
|
||||||
|
"慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。": "慢性病風險指數是透過整合個體的生理指標、生活方式等多維度資料,構建的量化評估模型,用於預測用戶未來患慢性非傳染性疾病(如高血壓、糖尿病、冠心病、癌症等)的風險機率。",
|
||||||
|
"自主神经平衡指数": "自主神經平衡指數",
|
||||||
|
"自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。": "自主神經平衡指數 是評估人體自主神經系統(ANS)功能狀態的重要指標,主要反映交感神經和副交感神經的活性平衡關係。",
|
||||||
|
"皮肤指数": "皮膚指數",
|
||||||
|
"皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。": "皮膚指數透過用戶睡眠過程中的體徵資料,計算皮膚電反應,生成綜合評估指標,用於睡眠中的生理應激狀態或自主神經活動。"
|
||||||
|
}
|
||||||
@@ -196,13 +196,21 @@ class MyUtils {
|
|||||||
if (target == today) {
|
if (target == today) {
|
||||||
return '今日'.tr;
|
return '今日'.tr;
|
||||||
}
|
}
|
||||||
List<String> weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
List<String> weekdays = [
|
||||||
String currentLanguageCode = AppLanguage().getCurrentLanguageCode();
|
'周日'.tr,
|
||||||
if (currentLanguageCode != null) {
|
'周一'.tr,
|
||||||
if (currentLanguageCode != "zh_CN") {
|
'周二'.tr,
|
||||||
weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
'周三'.tr,
|
||||||
}
|
'周四'.tr,
|
||||||
}
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
];
|
||||||
|
// String currentLanguageCode = AppLanguage().getCurrentLanguageCode();
|
||||||
|
// if (currentLanguageCode != null) {
|
||||||
|
// if (currentLanguageCode != "zh_CN") {
|
||||||
|
// weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
return weekdays[date.weekday % 7]; // Dart中星期日是7,要映射到索引0
|
return weekdays[date.weekday % 7]; // Dart中星期日是7,要映射到索引0
|
||||||
}
|
}
|
||||||
@@ -227,22 +235,28 @@ class MyUtils {
|
|||||||
return '$dateStr $weekStr';
|
return '$dateStr $weekStr';
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getFormatEnglishDate(int millis) {
|
// static String getFormatEnglishDate(int millis) {
|
||||||
|
// final date = DateTime.fromMillisecondsSinceEpoch(millis);
|
||||||
|
// const weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
||||||
|
// final weekday = weekdays[date.weekday - 1];
|
||||||
|
// final formattedDate =
|
||||||
|
// '${date.year}/${date.month.toString().padLeft(2, '0')}/${date.day.toString().padLeft(2, '0')}';
|
||||||
|
// return '$weekday, $formattedDate';
|
||||||
|
// // return '$formattedDate';
|
||||||
|
// }
|
||||||
|
static String getFormatEnglishDate(int millis) {
|
||||||
final date = DateTime.fromMillisecondsSinceEpoch(millis);
|
final date = DateTime.fromMillisecondsSinceEpoch(millis);
|
||||||
const weekdays = [
|
|
||||||
'Monday',
|
// 英文星期简写
|
||||||
'Tuesday',
|
const weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
||||||
'Wednesday',
|
|
||||||
'Thursday',
|
|
||||||
'Friday',
|
|
||||||
'Saturday',
|
|
||||||
'Sunday'
|
|
||||||
];
|
|
||||||
final weekday = weekdays[date.weekday - 1];
|
final weekday = weekdays[date.weekday - 1];
|
||||||
|
|
||||||
|
// 格式化年月日:2025/07/21
|
||||||
final formattedDate =
|
final formattedDate =
|
||||||
'${date.year}/${date.month.toString().padLeft(2, '0')}/${date.day.toString().padLeft(2, '0')}';
|
'${date.year}/${date.month.toString().padLeft(2, '0')}/${date.day.toString().padLeft(2, '0')}';
|
||||||
|
|
||||||
return '$weekday, $formattedDate';
|
return '$weekday, $formattedDate';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Color stringToColor(String hexColor) {
|
Color stringToColor(String hexColor) {
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ class _SleepCalendarWidgetState extends State<SleepCalendarWidget> {
|
|||||||
return Container(
|
return Container(
|
||||||
constraints: BoxConstraints(minHeight: 90.rpx),
|
constraints: BoxConstraints(minHeight: 90.rpx),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: ["一", "二", "三", "四", "五", "六", "日"].map((day) {
|
children: ["一".tr, "二".tr, "三".tr, "四".tr, "五".tr, "六".tr, "日".tr].map((day) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -288,42 +288,7 @@ class _SleepDataModuleWidgetState extends State<SleepDataModuleWidget> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
// Expanded(
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisSize: MainAxisSize.min,
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
// children: [
|
|
||||||
// Text(
|
|
||||||
// '${widget.data['value']}',
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontFamily: 'Inter',
|
|
||||||
// fontSize: 36.rpx,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// color: themeController.currentColor.sc3,
|
|
||||||
// ),
|
|
||||||
// maxLines: 1,
|
|
||||||
// overflow: TextOverflow.ellipsis,
|
|
||||||
// ),
|
|
||||||
// Padding(
|
|
||||||
// padding:
|
|
||||||
// EdgeInsetsDirectional.fromSTEB(0, 0, 0, 10.rpx),
|
|
||||||
// child: Text(
|
|
||||||
// '${widget.data['unit'] ?? ''}',
|
|
||||||
// style: FlutterFlowTheme.of(context)
|
|
||||||
// .bodyMedium
|
|
||||||
// .override(
|
|
||||||
// fontFamily: 'Inter',
|
|
||||||
// fontSize: AppConstants().small_text_fontSize,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// color: themeController.currentColor.sc3,
|
|
||||||
// ),
|
|
||||||
// maxLines: 1,
|
|
||||||
// overflow: TextOverflow.ellipsis,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
|||||||
@@ -6,6 +6,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/device/body_device_controller.dart';
|
import 'package:vbvs_app/controller/device/body_device_controller.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
||||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||||
|
|
||||||
class SleepDateWidget extends StatefulWidget {
|
class SleepDateWidget extends StatefulWidget {
|
||||||
@@ -36,6 +37,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ThemeController themeController = Get.find();
|
ThemeController themeController = Get.find();
|
||||||
|
MHLanguageController mhLanguageController = Get.find();
|
||||||
BodyDeviceController bodyDeviceController = Get.find();
|
BodyDeviceController bodyDeviceController = Get.find();
|
||||||
String week = MyUtils.formatDateTimeWeek(widget.date);
|
String week = MyUtils.formatDateTimeWeek(widget.date);
|
||||||
String day = MyUtils.formatDateTimeDay(widget.date);
|
String day = MyUtils.formatDateTimeDay(widget.date);
|
||||||
@@ -67,6 +69,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
bodyDeviceController.updateAll();
|
bodyDeviceController.updateAll();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width * 0.19,
|
width: MediaQuery.sizeOf(context).width * 0.19,
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
@@ -122,8 +125,8 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
),
|
),
|
||||||
if ((widget.score?.trim().isNotEmpty ?? false))
|
if ((widget.score?.trim().isNotEmpty ?? false))
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
EdgeInsetsDirectional.fromSTEB(0, 16.rpx, 0, 0.rpx),
|
0, 16.rpx, 0, 0.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
'分'.tr,
|
'分'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -156,7 +159,8 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
padding:
|
padding:
|
||||||
EdgeInsetsDirectional.fromSTEB(16.rpx, 0, 16.rpx, 0),
|
EdgeInsetsDirectional.fromSTEB(16.rpx, 0, 16.rpx, 0),
|
||||||
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||||
color: widget.textColor ?? themeController.currentColor.sc4,
|
color:
|
||||||
|
widget.textColor ?? themeController.currentColor.sc4,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
// fontFamily: 'Inter Tight',
|
// fontFamily: 'Inter Tight',
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
@@ -168,8 +172,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
|||||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||||
|
|
||||||
class GlobalModel {
|
class GlobalModel {
|
||||||
List deviceList = [];//用户绑定设备数量
|
List deviceList = []; //用户绑定设备数量
|
||||||
Map deviceMain = {};
|
Map deviceMain = {};
|
||||||
|
|
||||||
Map useBedController = {}; //之前控制的设备
|
Map useBedController = {}; //之前控制的设备
|
||||||
@@ -160,7 +160,6 @@ class GlobalController extends GetControllerEx<GlobalModel> {
|
|||||||
return "$mac".toUpperCase();
|
return "$mac".toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getDeviceList({int time = 1}) async {
|
getDeviceList({int time = 1}) async {
|
||||||
await EasyDartModule.dio.get("/api/device/info/list").then((d) {
|
await EasyDartModule.dio.get("/api/device/info/list").then((d) {
|
||||||
Map d_ = {};
|
Map d_ = {};
|
||||||
@@ -187,8 +186,12 @@ class GlobalController extends GetControllerEx<GlobalModel> {
|
|||||||
if (!isClose) {
|
if (!isClose) {
|
||||||
model.deviceMain = {};
|
model.deviceMain = {};
|
||||||
updateAll();
|
updateAll();
|
||||||
showCustomConfirmAndCancelDialog(Get.context!, "设备已经被解绑,是否回到主界面?")
|
showCustomConfirmAndCancelDialog(
|
||||||
.then((e) {
|
Get.context!,
|
||||||
|
"设备已经被解绑,是否回到主界面?",
|
||||||
|
confirmName: '确定'.tr,
|
||||||
|
cancelName: '取消'.tr,
|
||||||
|
).then((e) {
|
||||||
if (e == "confirm") {
|
if (e == "confirm") {
|
||||||
Get.find<MainPageController>().model.currentIndex = 0;
|
Get.find<MainPageController>().model.currentIndex = 0;
|
||||||
Get.offAllNamed("/mianPageBottomChange");
|
Get.offAllNamed("/mianPageBottomChange");
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class ApplyRepairController extends GetControllerEx<ApplyRepairModel> {
|
|||||||
final ImagePicker picker = ImagePicker();
|
final ImagePicker picker = ImagePicker();
|
||||||
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
|
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
|
||||||
try {
|
try {
|
||||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "我的.头像上传失败".tr);
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "头像上传失败".tr);
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
int fileSize = await image.length(); // 获取图片大小,单位为字节
|
int fileSize = await image.length(); // 获取图片大小,单位为字节
|
||||||
if (fileSize > 1048576 * 5) {
|
if (fileSize > 1048576 * 5) {
|
||||||
@@ -106,20 +106,20 @@ class ApplyRepairController extends GetControllerEx<ApplyRepairModel> {
|
|||||||
ApiResponse.fromJson(responseData, (object) => object);
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
model.issue_img!.add(res.data['path']);
|
model.issue_img!.add(res.data['path']);
|
||||||
updateAll();
|
updateAll();
|
||||||
MyUtils.formatResponse(res, "我的.上传成功".tr, "我的.头像上传失败".tr);
|
MyUtils.formatResponse(res, "上传成功".tr, "头像上传失败".tr);
|
||||||
updateAll();
|
updateAll();
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
apiResponse.msg = "我的.未选择图片".tr;
|
apiResponse.msg = "未选择图片".tr;
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.error("上传图片失败->$e");
|
EasyDartModule.logger.error("上传图片失败->$e");
|
||||||
DailyLogUtils.writeError("上传图片失败->$e");
|
DailyLogUtils.writeError("上传图片失败->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
|||||||
String search = (model.keyword != null && model.keyword!.isNotEmpty)
|
String search = (model.keyword != null && model.keyword!.isNotEmpty)
|
||||||
? "?key=${model.keyword}&ncs=1"
|
? "?key=${model.keyword}&ncs=1"
|
||||||
: "?ncs=1";
|
: "?ncs=1";
|
||||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备.设备列表请求失败".tr);
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备列表请求失败".tr);
|
||||||
String serviceAddress = ServiceConstant.service_address;
|
String serviceAddress = ServiceConstant.service_address;
|
||||||
String serviceName = ServiceConstant.server_service;
|
String serviceName = ServiceConstant.server_service;
|
||||||
String serviceApi = ServiceConstant.device_list;
|
String serviceApi = ServiceConstant.device_list;
|
||||||
@@ -55,7 +55,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
|||||||
response.data is String ? jsonDecode(response.data) : response.data;
|
response.data is String ? jsonDecode(response.data) : response.data;
|
||||||
ApiResponse res =
|
ApiResponse res =
|
||||||
ApiResponse.fromJson(responseData, (object) => object);
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
MyUtils.formatResponse(res, "设备.设备列表请求成功".tr, "设备.设备列表请求失败".tr);
|
MyUtils.formatResponse(res, "设备列表请求成功".tr, "设备列表请求失败".tr);
|
||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
// bindDeviceNum.value = res.total!;
|
// bindDeviceNum.value = res.total!;
|
||||||
model.deviceList = res.data;
|
model.deviceList = res.data;
|
||||||
@@ -64,7 +64,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -77,7 +77,7 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
|||||||
//体征传感器
|
//体征传感器
|
||||||
getVitalList(String mac) async {
|
getVitalList(String mac) async {
|
||||||
try {
|
try {
|
||||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备.设备列表请求失败".tr);
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备列表请求失败".tr);
|
||||||
String serviceAddress = ServiceConstant.service_address;
|
String serviceAddress = ServiceConstant.service_address;
|
||||||
String serviceName = ServiceConstant.server_service;
|
String serviceName = ServiceConstant.server_service;
|
||||||
String serviceApi = ServiceConstant.device_list;
|
String serviceApi = ServiceConstant.device_list;
|
||||||
@@ -89,14 +89,14 @@ class DeviceListController extends GetControllerEx<DeviceListModel> {
|
|||||||
response.data is String ? jsonDecode(response.data) : response.data;
|
response.data is String ? jsonDecode(response.data) : response.data;
|
||||||
ApiResponse res =
|
ApiResponse res =
|
||||||
ApiResponse.fromJson(responseData, (object) => object);
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
MyUtils.formatResponse(res, "设备.设备列表请求成功".tr, "设备.设备列表请求失败".tr);
|
MyUtils.formatResponse(res, "设备列表请求成功".tr, "设备列表请求失败".tr);
|
||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
// bindDeviceNum.value = res.total!;
|
// bindDeviceNum.value = res.total!;
|
||||||
model.vitalList = res.data;
|
model.vitalList = res.data;
|
||||||
updateAll();
|
updateAll();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class MhMessageController extends GetControllerEx<MhMessageModel> {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -153,7 +153,7 @@ class MhMessageController extends GetControllerEx<MhMessageModel> {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -200,12 +200,12 @@ class MhMessageController extends GetControllerEx<MhMessageModel> {
|
|||||||
MyUtils.formatResponse(res, "操作成功".tr, "操作成功".tr);
|
MyUtils.formatResponse(res, "操作成功".tr, "操作成功".tr);
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.info("更新消息已读状态->$e");
|
EasyDartModule.logger.info("更新消息已读状态->$e");
|
||||||
DailyLogUtils.writeLog("更新消息已读状态->$e");
|
DailyLogUtils.writeLog("更新消息已读状态->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -29,12 +30,13 @@ class MHLanguageModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MHLanguageController extends GetControllerEx<MHLanguageModel> {
|
class MHLanguageController extends GetControllerEx<MHLanguageModel> {
|
||||||
LanguageController() {
|
MHLanguageController() {
|
||||||
attr = GetModel(MHLanguageModel()).obs;
|
attr = GetModel(MHLanguageModel()).obs;
|
||||||
}
|
}
|
||||||
|
|
||||||
RxList languageList = [].obs;
|
RxList languageList = [].obs;
|
||||||
var selectLanguage = Rx<MHLanguageModel?>(null);
|
var selectLanguage = Rx<MHLanguageModel?>(null);
|
||||||
|
|
||||||
Future<void> initLanuageList() async {
|
Future<void> initLanuageList() async {
|
||||||
try {
|
try {
|
||||||
String currentLanguageCode = AppLanguage().getCurrentLanguageCode();
|
String currentLanguageCode = AppLanguage().getCurrentLanguageCode();
|
||||||
|
|||||||
@@ -113,12 +113,12 @@ class MHDeviceShareController extends GetControllerEx<MHDeviceShareModel> {
|
|||||||
updateAll();
|
updateAll();
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.info("分享设备失败:${e.toString()}");
|
EasyDartModule.logger.info("分享设备失败:${e.toString()}");
|
||||||
DailyLogUtils.writeLog("分享设备失败:${e.toString()}");
|
DailyLogUtils.writeLog("分享设备失败:${e.toString()}");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,12 +180,12 @@ class MHDeviceShareController extends GetControllerEx<MHDeviceShareModel> {
|
|||||||
MyUtils.formatResponse(res, "操作成功".tr, "操作失败".tr);
|
MyUtils.formatResponse(res, "操作成功".tr, "操作失败".tr);
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.info("确认消息分享失败->$e");
|
EasyDartModule.logger.info("确认消息分享失败->$e");
|
||||||
DailyLogUtils.writeLog("确认消息分享失败->$e");
|
DailyLogUtils.writeLog("确认消息分享失败->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class BookExperienceListController
|
|||||||
int page_ = page;
|
int page_ = page;
|
||||||
String tel = Get.find<UserInfoController>().model.user?.phone ?? "";
|
String tel = Get.find<UserInfoController>().model.user?.phone ?? "";
|
||||||
if (tel.isEmpty) {
|
if (tel.isEmpty) {
|
||||||
showToast("用户未存在手机号");
|
showToast("用户未存在手机号".tr);
|
||||||
finished?.call();
|
finished?.call();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ class BookExperienceListController
|
|||||||
cancelBook(id, {Function? success}) {
|
cancelBook(id, {Function? success}) {
|
||||||
String tel = Get.find<UserInfoController>().model.user?.phone ?? "";
|
String tel = Get.find<UserInfoController>().model.user?.phone ?? "";
|
||||||
if (tel.isEmpty) {
|
if (tel.isEmpty) {
|
||||||
showToast("用户未存在手机号");
|
showToast("用户未存在手机号".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LoadingDialog.show("提交中...");
|
LoadingDialog.show("提交中...");
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
final ImagePicker picker = ImagePicker();
|
final ImagePicker picker = ImagePicker();
|
||||||
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
|
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
|
||||||
try {
|
try {
|
||||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "我的.头像上传失败".tr);
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "头像上传失败".tr);
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
int fileSize = await image.length(); // 获取图片大小,单位为字节
|
int fileSize = await image.length(); // 获取图片大小,单位为字节
|
||||||
if (fileSize > 1048576 * 5) {
|
if (fileSize > 1048576 * 5) {
|
||||||
@@ -104,21 +104,21 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
: response.data;
|
: response.data;
|
||||||
ApiResponse res =
|
ApiResponse res =
|
||||||
ApiResponse.fromJson(responseData, (object) => object);
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
MyUtils.formatResponse(apiResponse, "我的.上传成功".tr, "我的.头像上传失败".tr);
|
MyUtils.formatResponse(apiResponse, "上传成功".tr, "头像上传失败".tr);
|
||||||
model.user!.tmpHead = res.data['path'];
|
model.user!.tmpHead = res.data['path'];
|
||||||
updateAll();
|
updateAll();
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
apiResponse.msg = "我的.未选择图片".tr;
|
apiResponse.msg = "未选择图片".tr;
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.error("上传图片失败->$e");
|
EasyDartModule.logger.error("上传图片失败->$e");
|
||||||
DailyLogUtils.writeError("上传图片失败->$e");
|
DailyLogUtils.writeError("上传图片失败->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,12 +168,12 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
MyUtils.formatResponse(res, "保存成功".tr, "保存失败".tr);
|
MyUtils.formatResponse(res, "保存成功".tr, "保存失败".tr);
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.info("更新用户资料失败->$e");
|
EasyDartModule.logger.info("更新用户资料失败->$e");
|
||||||
DailyLogUtils.writeLog("更新用户资料失败->$e");
|
DailyLogUtils.writeLog("更新用户资料失败->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
EasyDartModule.logger.info("查询用户资料");
|
EasyDartModule.logger.info("查询用户资料");
|
||||||
DailyLogUtils.writeLog("查询用户资料");
|
DailyLogUtils.writeLog("查询用户资料");
|
||||||
try {
|
try {
|
||||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "我的.查询失败".tr);
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "查询失败".tr);
|
||||||
String serviceAddress = ServiceConstant.service_address;
|
String serviceAddress = ServiceConstant.service_address;
|
||||||
String serviceName = ServiceConstant.server_service;
|
String serviceName = ServiceConstant.server_service;
|
||||||
String serviceApi = ServiceConstant.user_info;
|
String serviceApi = ServiceConstant.user_info;
|
||||||
@@ -204,7 +204,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
response.data is String ? jsonDecode(response.data) : response.data;
|
response.data is String ? jsonDecode(response.data) : response.data;
|
||||||
ApiResponse res =
|
ApiResponse res =
|
||||||
ApiResponse.fromJson(responseData, (object) => object);
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
MyUtils.formatResponse(apiResponse, "我的.保存成功".tr, "我的.保存失败".tr);
|
MyUtils.formatResponse(apiResponse, "保存成功".tr, "保存失败".tr);
|
||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
UserInfoController userInfoController = Get.find();
|
UserInfoController userInfoController = Get.find();
|
||||||
userInfoController.model.user = UserModel.fromJson(res.data);
|
userInfoController.model.user = UserModel.fromJson(res.data);
|
||||||
@@ -214,17 +214,17 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "失败".tr);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyDartModule.logger.info("更新用户资料失败->$e");
|
EasyDartModule.logger.info("更新用户资料失败->$e");
|
||||||
DailyLogUtils.writeLog("更新用户资料失败->$e");
|
DailyLogUtils.writeLog("更新用户资料失败->$e");
|
||||||
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiResponse logOut() {
|
ApiResponse logOut() {
|
||||||
ApiResponse apiResponse = ApiResponse(code: 1, msg: "设置页.退出成功".tr);
|
ApiResponse apiResponse = ApiResponse(code: 1, msg: "退出成功".tr);
|
||||||
EasyDartModule.logger.info("退出登录");
|
EasyDartModule.logger.info("退出登录");
|
||||||
DailyLogUtils.writeLog("退出登录");
|
DailyLogUtils.writeLog("退出登录");
|
||||||
model.login = 0;
|
model.login = 0;
|
||||||
|
|||||||
@@ -355,19 +355,18 @@ class MyApp extends StatelessWidget {
|
|||||||
GlobalWidgetsLocalizations.delegate,
|
GlobalWidgetsLocalizations.delegate,
|
||||||
GlobalCupertinoLocalizations.delegate,
|
GlobalCupertinoLocalizations.delegate,
|
||||||
],
|
],
|
||||||
locale: Locale('zh', 'CN'), // 设置默认语言为中文
|
locale: AppLanguage().currentLocale, // ✅ 动态读取当前语言
|
||||||
|
fallbackLocale: const Locale("zh", "CN"),
|
||||||
supportedLocales: [
|
supportedLocales: [
|
||||||
Locale('en', 'US'),
|
Locale('en', 'US'),
|
||||||
Locale('zh', 'CN'),
|
Locale('zh', 'CN'),
|
||||||
],
|
],
|
||||||
// locale: Locale('zh'), // 设置应用的语言为中文
|
|
||||||
// home: MainPageBBottomChange(),
|
|
||||||
// initialRoute: "/loginPage",
|
|
||||||
initialRoute: "/mianPageBottomChange",
|
initialRoute: "/mianPageBottomChange",
|
||||||
onGenerateRoute: mhonGenerateRoute,
|
onGenerateRoute: mhonGenerateRoute,
|
||||||
initialBinding: BindingsBuilder(() => [
|
initialBinding: BindingsBuilder(() => [
|
||||||
// Get.lazyPut(() => UserInfoController()),
|
// Get.lazyPut(() => UserInfoController()),
|
||||||
Get.put(GlobalController()),
|
Get.put(GlobalController()),
|
||||||
|
Get.put(WeatherModelController()),
|
||||||
Get.lazyPut(() => ControlCardController()),
|
Get.lazyPut(() => ControlCardController()),
|
||||||
Get.lazyPut(() => RepairListController()),
|
Get.lazyPut(() => RepairListController()),
|
||||||
Get.lazyPut(() => RepairInfoController()),
|
Get.lazyPut(() => RepairInfoController()),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
@@ -53,16 +54,17 @@ getOnePicker(BuildContext context, List arr, int checkIndex,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//支持选中时文字变色
|
Widget getOnePickers(
|
||||||
getOnePickers(
|
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
List arr,
|
List arr,
|
||||||
RxInt selectedIndex, {
|
RxInt selectedIndex, {
|
||||||
String unit = '',
|
String unit = '',
|
||||||
bool looping = false,
|
bool looping = false,
|
||||||
void Function(int)? onChanged,
|
void Function(int)? onChanged,
|
||||||
|
bool isMonthName = false,
|
||||||
}) {
|
}) {
|
||||||
ThemeController themeController = Get.find();
|
ThemeController themeController = Get.find();
|
||||||
|
final bool isEn = Get.locale?.languageCode.startsWith('en') ?? false;
|
||||||
|
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
return CupertinoPicker.builder(
|
return CupertinoPicker.builder(
|
||||||
@@ -71,24 +73,33 @@ getOnePickers(
|
|||||||
magnification: 1,
|
magnification: 1,
|
||||||
diameterRatio: 3,
|
diameterRatio: 3,
|
||||||
squeeze: 1,
|
squeeze: 1,
|
||||||
// looping: looping,
|
|
||||||
scrollController:
|
scrollController:
|
||||||
FixedExtentScrollController(initialItem: selectedIndex.value),
|
FixedExtentScrollController(initialItem: selectedIndex.value),
|
||||||
selectionOverlay: Container(),
|
selectionOverlay: Container(),
|
||||||
onSelectedItemChanged: (int index) {
|
onSelectedItemChanged: (int index) {
|
||||||
selectedIndex.value = index;
|
selectedIndex.value = index;
|
||||||
|
if (onChanged != null) onChanged(index);
|
||||||
},
|
},
|
||||||
childCount: arr.length,
|
childCount: arr.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
bool isSelected = index == selectedIndex.value;
|
bool isSelected = index == selectedIndex.value;
|
||||||
|
|
||||||
|
// 处理显示文本
|
||||||
|
String displayText;
|
||||||
|
if (isMonthName && isEn && arr[index] is int) {
|
||||||
|
displayText = DateFormat.MMMM('en').format(DateTime(0, arr[index]));
|
||||||
|
} else {
|
||||||
|
displayText = isEn ? "${arr[index]}" : "${arr[index]}$unit"; // 中文附带单位
|
||||||
|
}
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${arr[index]}$unit",
|
displayText,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: isSelected
|
color: isSelected
|
||||||
? const Color(0xFF011D33) // ✅ 选中项颜色
|
? const Color(0xFF011D33)
|
||||||
: Color(0xFF9AA0B3), // 未选中颜色
|
: const Color(0xFF9AA0B3),
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
),
|
),
|
||||||
@@ -99,11 +110,14 @@ getOnePickers(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future showDateSelectionDialog(BuildContext context,
|
Future showDateSelectionDialog(BuildContext context,
|
||||||
{required DateTime checkDate,
|
{required DateTime checkDate,
|
||||||
Function? checkChange,
|
Function? checkChange,
|
||||||
String title = "选择生日"}) {
|
String title = "选择生日"}) {
|
||||||
ThemeController themeController = Get.find();
|
ThemeController themeController = Get.find();
|
||||||
|
final bool isEn = Get.locale?.languageCode.startsWith('en') ?? false;
|
||||||
Color checkColor = stringToColor("#D3B684");
|
Color checkColor = stringToColor("#D3B684");
|
||||||
|
|
||||||
final List<int> years = List.generate(100, (i) => DateTime.now().year - i)
|
final List<int> years = List.generate(100, (i) => DateTime.now().year - i)
|
||||||
@@ -162,10 +176,10 @@ Future showDateSelectionDialog(BuildContext context,
|
|||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onTap: () => Navigator.of(context).pop(),
|
onTap: () => Navigator.of(context).pop(),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text("取消",
|
child: Text("取消".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx, color: Colors.white)),
|
fontSize: 30.rpx, color: Colors.white)),
|
||||||
),
|
),
|
||||||
@@ -192,10 +206,10 @@ Future showDateSelectionDialog(BuildContext context,
|
|||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text("确定",
|
child: Text("确定".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: stringToColor("#84F5FF"))),
|
color: stringToColor("#84F5FF"))),
|
||||||
@@ -226,7 +240,34 @@ Future showDateSelectionDialog(BuildContext context,
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 95.rpx),
|
padding: EdgeInsets.symmetric(horizontal: 95.rpx),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: isEn
|
||||||
|
? [
|
||||||
|
Expanded(
|
||||||
|
child: getOnePickers(
|
||||||
|
context,
|
||||||
|
months,
|
||||||
|
monthIndex,
|
||||||
|
isMonthName: true,
|
||||||
|
onChanged: (_) => updateDays(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: getOnePickers(
|
||||||
|
context,
|
||||||
|
daysSelect,
|
||||||
|
dayIndex,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: getOnePickers(
|
||||||
|
context,
|
||||||
|
years,
|
||||||
|
yearIndex,
|
||||||
|
onChanged: (_) => updateDays(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: getOnePickers(
|
child: getOnePickers(
|
||||||
context,
|
context,
|
||||||
@@ -271,153 +312,6 @@ Future showDateSelectionDialog(BuildContext context,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future showMonthSelectionDialog(
|
|
||||||
// BuildContext context, {
|
|
||||||
// required DateTime checkDate,
|
|
||||||
// Function(DateTime)? checkChange,
|
|
||||||
// String title = "选择月份",
|
|
||||||
// }) {
|
|
||||||
// ThemeController themeController = Get.find();
|
|
||||||
|
|
||||||
// final List<int> years = List.generate(100, (i) => DateTime.now().year - i)
|
|
||||||
// ..sort();
|
|
||||||
// final List<int> months = List.generate(12, (i) => i + 1);
|
|
||||||
|
|
||||||
// final RxInt yearIndex = years.indexOf(checkDate.year).obs;
|
|
||||||
// final RxInt monthIndex = months.indexOf(checkDate.month).obs;
|
|
||||||
|
|
||||||
// return showDialog(
|
|
||||||
// context: context,
|
|
||||||
// barrierDismissible: true,
|
|
||||||
// builder: (BuildContext context) {
|
|
||||||
// return Stack(
|
|
||||||
// children: [
|
|
||||||
// Positioned(
|
|
||||||
// bottom: 0,
|
|
||||||
// left: 0,
|
|
||||||
// right: 0,
|
|
||||||
// child: Material(
|
|
||||||
// color: Colors.transparent,
|
|
||||||
// child: Dialog(
|
|
||||||
// backgroundColor: const Color(0xFF003058),
|
|
||||||
// insetPadding: EdgeInsets.zero,
|
|
||||||
// shape: RoundedRectangleBorder(
|
|
||||||
// borderRadius: BorderRadius.circular(0),
|
|
||||||
// ),
|
|
||||||
// child: Container(
|
|
||||||
// width: double.infinity,
|
|
||||||
// padding: EdgeInsets.fromLTRB(30.rpx, 10.rpx, 30.rpx, 90.rpx),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.min,
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
// children: <Widget>[
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// ClickableContainer(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// highlightColor: Colors.transparent,
|
|
||||||
// padding: EdgeInsets.zero,
|
|
||||||
// onTap: () => Navigator.of(context).pop(),
|
|
||||||
// child: Container(
|
|
||||||
// width: 100.rpx,
|
|
||||||
// height: 60.rpx,
|
|
||||||
// alignment: Alignment.center,
|
|
||||||
// child: Text("取消",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 30.rpx, color: Colors.white)),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// title,
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontFamily: 'Readex Pro',
|
|
||||||
// color: themeController.currentColor.sc3,
|
|
||||||
// fontSize: 30.rpx,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ClickableContainer(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// highlightColor: Colors.transparent,
|
|
||||||
// padding: EdgeInsets.zero,
|
|
||||||
// onTap: () {
|
|
||||||
// final selectedDate = DateTime(
|
|
||||||
// years[yearIndex.value],
|
|
||||||
// months[monthIndex.value],
|
|
||||||
// );
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// checkChange?.call(selectedDate);
|
|
||||||
// },
|
|
||||||
// child: Container(
|
|
||||||
// width: 100.rpx,
|
|
||||||
// height: 60.rpx,
|
|
||||||
// alignment: Alignment.center,
|
|
||||||
// child: Text("确定",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 30.rpx,
|
|
||||||
// color: stringToColor("#84F5FF"))),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// SizedBox(height: 20.rpx),
|
|
||||||
// Stack(
|
|
||||||
// children: [
|
|
||||||
// Positioned.fill(
|
|
||||||
// child: IgnorePointer(
|
|
||||||
// child: Center(
|
|
||||||
// child: Container(
|
|
||||||
// height: 90.rpx,
|
|
||||||
// margin:
|
|
||||||
// EdgeInsets.symmetric(horizontal: 95.rpx),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// color: const Color(0xFF84F5FF),
|
|
||||||
// borderRadius: BorderRadius.circular(16.rpx),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 240.rpx,
|
|
||||||
// child: Padding(
|
|
||||||
// padding: EdgeInsets.symmetric(horizontal: 95.rpx),
|
|
||||||
// child: Row(
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: getOnePickers(
|
|
||||||
// context,
|
|
||||||
// years,
|
|
||||||
// yearIndex,
|
|
||||||
// unit: "年",
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: getOnePickers(
|
|
||||||
// context,
|
|
||||||
// months,
|
|
||||||
// monthIndex,
|
|
||||||
// unit: "月",
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
Future showMonthSelectionDialog(
|
Future showMonthSelectionDialog(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required DateTime checkDate,
|
required DateTime checkDate,
|
||||||
@@ -498,11 +392,11 @@ Future showMonthSelectionDialog(
|
|||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onTap: () => Navigator.of(context).pop(),
|
onTap: () => Navigator.of(context).pop(),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"取消",
|
"取消".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -531,11 +425,11 @@ Future showMonthSelectionDialog(
|
|||||||
checkChange?.call(selectedDate);
|
checkChange?.call(selectedDate);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"确定",
|
"确定".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
@@ -576,7 +470,7 @@ Future showMonthSelectionDialog(
|
|||||||
context,
|
context,
|
||||||
years,
|
years,
|
||||||
yearIndex,
|
yearIndex,
|
||||||
unit: "年",
|
unit: "年".tr,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -584,7 +478,7 @@ Future showMonthSelectionDialog(
|
|||||||
context,
|
context,
|
||||||
months, // 注意这里取 .value
|
months, // 注意这里取 .value
|
||||||
monthIndex,
|
monthIndex,
|
||||||
unit: "月",
|
unit: "月".tr,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -653,10 +547,10 @@ Future<void> showWeightPickerDialog(
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text(
|
child: Text(
|
||||||
"取消",
|
"取消".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -680,10 +574,10 @@ Future<void> showWeightPickerDialog(
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text(
|
child: Text(
|
||||||
"确定",
|
"确定".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
@@ -780,10 +674,10 @@ Future<void> showHeightPickerDialog(
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text(
|
child: Text(
|
||||||
"取消",
|
"取消".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -807,10 +701,10 @@ Future<void> showHeightPickerDialog(
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text(
|
child: Text(
|
||||||
"确定",
|
"确定".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
@@ -1046,7 +940,7 @@ Future showDayTimeSelectionDialog(
|
|||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onTap: () => Navigator.of(context).pop(),
|
onTap: () => Navigator.of(context).pop(),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text("取消".tr,
|
child: Text("取消".tr,
|
||||||
@@ -1074,7 +968,7 @@ Future showDayTimeSelectionDialog(
|
|||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text("确定".tr,
|
child: Text("确定".tr,
|
||||||
@@ -1190,7 +1084,7 @@ Future showOneSelectionDialog(
|
|||||||
onTap: () => Get.back(),
|
onTap: () => Get.back(),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text("取消".tr,
|
child: Text("取消".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -1213,7 +1107,7 @@ Future showOneSelectionDialog(
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 100.rpx,
|
width: 110.rpx,
|
||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
child: Text("确定".tr,
|
child: Text("确定".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ void showBindDoubleDialog(
|
|||||||
padding:
|
padding:
|
||||||
EdgeInsetsDirectional.fromSTEB(0.rpx, 93.rpx, 0, 0),
|
EdgeInsetsDirectional.fromSTEB(0.rpx, 93.rpx, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'蓝牙绑定.双人版绑定标题'.tr,
|
'双人版绑定标题'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -69,7 +69,7 @@ void showBindDoubleDialog(
|
|||||||
// 全选
|
// 全选
|
||||||
_buildCheckboxRow(
|
_buildCheckboxRow(
|
||||||
context,
|
context,
|
||||||
title: '蓝牙绑定.绑定全部'.tr,
|
title: '绑定全部'.tr,
|
||||||
value: () => blueteethBindController.model.deviceIndex0!,
|
value: () => blueteethBindController.model.deviceIndex0!,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
if (!blueteethBindController.model.deviceIndex0!) {
|
if (!blueteethBindController.model.deviceIndex0!) {
|
||||||
@@ -83,7 +83,7 @@ void showBindDoubleDialog(
|
|||||||
// 主设备
|
// 主设备
|
||||||
_buildCheckboxRow(
|
_buildCheckboxRow(
|
||||||
context,
|
context,
|
||||||
title: '蓝牙绑定.主设备'.tr +
|
title: '主设备'.tr +
|
||||||
"${devices[0].mac}" +
|
"${devices[0].mac}" +
|
||||||
(devices[0].bind == false ? "可绑定".tr : "已被绑定".tr),
|
(devices[0].bind == false ? "可绑定".tr : "已被绑定".tr),
|
||||||
value: () => blueteethBindController.model.deviceIndex1!,
|
value: () => blueteethBindController.model.deviceIndex1!,
|
||||||
@@ -99,7 +99,7 @@ void showBindDoubleDialog(
|
|||||||
// 从设备
|
// 从设备
|
||||||
_buildCheckboxRow(
|
_buildCheckboxRow(
|
||||||
context,
|
context,
|
||||||
title: '蓝牙绑定.从设备'.tr +
|
title: '从设备'.tr +
|
||||||
"${devices[1].mac}" +
|
"${devices[1].mac}" +
|
||||||
(devices[1].bind == false ? "可绑定".tr : "已被绑定".tr),
|
(devices[1].bind == false ? "可绑定".tr : "已被绑定".tr),
|
||||||
value: () => blueteethBindController.model.deviceIndex2!,
|
value: () => blueteethBindController.model.deviceIndex2!,
|
||||||
@@ -119,7 +119,7 @@ void showBindDoubleDialog(
|
|||||||
60.rpx, 100.rpx, 60.rpx, 0),
|
60.rpx, 100.rpx, 60.rpx, 0),
|
||||||
child: _buildActionButton(
|
child: _buildActionButton(
|
||||||
context,
|
context,
|
||||||
text: '蓝牙绑定.确定'.tr,
|
text: '确定'.tr,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ void showBindDoubleDialog(
|
|||||||
60.rpx, 19.rpx, 60.rpx, 60.rpx),
|
60.rpx, 19.rpx, 60.rpx, 60.rpx),
|
||||||
child: _buildActionButton(
|
child: _buildActionButton(
|
||||||
context,
|
context,
|
||||||
text: '蓝牙绑定.取消'.tr,
|
text: '取消'.tr,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
onCancel();
|
onCancel();
|
||||||
@@ -186,7 +186,7 @@ Future<void> showHaveBindDialog(BuildContext context) async {
|
|||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
0.rpx, 93.rpx, 0.rpx, 0.rpx),
|
0.rpx, 93.rpx, 0.rpx, 0.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
'蓝牙绑定.无法绑定'.tr,
|
'无法绑定'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -202,21 +202,21 @@ Future<void> showHaveBindDialog(BuildContext context) async {
|
|||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(children: [
|
text: TextSpan(children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "蓝牙绑定.无法绑定1".tr,
|
text: "无法绑定1".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "蓝牙绑定.无法绑定2".tr,
|
text: "无法绑定2".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc8,
|
color: themeController.currentColor.sc8,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "蓝牙绑定.无法绑定3".tr,
|
text: "无法绑定3".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
@@ -248,7 +248,7 @@ Future<void> showHaveBindDialog(BuildContext context) async {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'蓝牙绑定.知道了'.tr,
|
'知道了'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -301,7 +301,7 @@ void showLoadingDialog(BuildContext context, {String? title}) {
|
|||||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
// 0.rpx, 93.rpx, 0.rpx, 0.rpx),
|
// 0.rpx, 93.rpx, 0.rpx, 0.rpx),
|
||||||
// child: Text(
|
// child: Text(
|
||||||
// '蓝牙绑定.无法绑定'.tr,
|
// '无法绑定'.tr,
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// fontFamily: 'Inter',
|
// fontFamily: 'Inter',
|
||||||
// fontSize: 30.rpx,
|
// fontSize: 30.rpx,
|
||||||
@@ -428,7 +428,7 @@ Widget _buildActionButton(
|
|||||||
return CustomCard(
|
return CustomCard(
|
||||||
borderRadius: AppConstants().button_container_radius,
|
borderRadius: AppConstants().button_container_radius,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
colors: '蓝牙绑定.确定'.tr == text
|
colors: '确定'.tr == text
|
||||||
? [
|
? [
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
themeController.currentColor.sc2,
|
themeController.currentColor.sc2,
|
||||||
@@ -441,7 +441,7 @@ Widget _buildActionButton(
|
|||||||
minWidth: 500.rpx,
|
minWidth: 500.rpx,
|
||||||
minHeight: 90.rpx,
|
minHeight: 90.rpx,
|
||||||
),
|
),
|
||||||
decoration: '蓝牙绑定.确定'.tr == text
|
decoration: '确定'.tr == text
|
||||||
? BoxDecoration()
|
? BoxDecoration()
|
||||||
: BoxDecoration(
|
: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
@@ -579,7 +579,7 @@ void showConfirmDialog(
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"蓝牙绑定.否".tr,
|
"否".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -615,7 +615,7 @@ void showConfirmDialog(
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"蓝牙绑定.是".tr,
|
"是".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -890,7 +890,7 @@ void showWifiDialog(
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"蓝牙绑定.连接".tr,
|
"连接".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -978,7 +978,7 @@ Future<void> showTipDialog(
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'蓝牙绑定.知道了'.tr,
|
'知道了'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -1171,14 +1171,14 @@ Future<void> showUnbindConfirmDialog({
|
|||||||
style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
style: TextStyle(fontSize: 26.rpx, color: Colors.black87),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '该设备只可被一个用户绑定,',
|
text: '该设备只可被一个用户绑定,'.tr,
|
||||||
style: TextStyle(fontSize: 26.rpx)),
|
style: TextStyle(fontSize: 26.rpx)),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '解绑后',
|
text: '解绑后'.tr,
|
||||||
style: TextStyle(color: Colors.red, fontSize: 26.rpx),
|
style: TextStyle(color: Colors.red, fontSize: 26.rpx),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '其他用户才可以绑定',
|
text: '其他用户才可以绑定'.tr,
|
||||||
style: TextStyle(fontSize: 26.rpx)),
|
style: TextStyle(fontSize: 26.rpx)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -1204,7 +1204,7 @@ Future<void> showUnbindConfirmDialog({
|
|||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
'取消',
|
'取消'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx, color: Colors.white),
|
fontSize: 26.rpx, color: Colors.white),
|
||||||
),
|
),
|
||||||
@@ -1225,7 +1225,7 @@ Future<void> showUnbindConfirmDialog({
|
|||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
'解绑',
|
'解绑'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx, color: Colors.white),
|
fontSize: 26.rpx, color: Colors.white),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||||
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||||
import 'package:vbvs_app/component/tool/TopSlideNotification.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/user_info_controller.dart';
|
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||||
import 'package:vbvs_app/model/WebSocketMessage.dart';
|
import 'package:vbvs_app/model/WebSocketMessage.dart';
|
||||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||||
@@ -17,14 +18,35 @@ import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
|||||||
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
||||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||||
|
|
||||||
|
// class MainPageBBottomChange extends StatefulWidget {
|
||||||
|
// // 全局 key,用于静态访问 _HomePageState
|
||||||
|
// static final GlobalKey<_HomePageState> globalKey =
|
||||||
|
// GlobalKey<_HomePageState>();
|
||||||
|
|
||||||
|
// MainPageBBottomChange({Key? key}) : super(key: globalKey);
|
||||||
|
|
||||||
|
// // 静态方法:外部调用,跳转 tab
|
||||||
|
// static void jumpTo(int index) {
|
||||||
|
// final state = globalKey.currentState;
|
||||||
|
// if (state != null) {
|
||||||
|
// state.switchTab(index);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// static int? getCurrentIndex() {
|
||||||
|
// final state = globalKey.currentState;
|
||||||
|
// return state?.selectedIndex;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// _HomePageState createState() => _HomePageState();
|
||||||
|
// }
|
||||||
class MainPageBBottomChange extends StatefulWidget {
|
class MainPageBBottomChange extends StatefulWidget {
|
||||||
// 全局 key,用于静态访问 _HomePageState
|
final GlobalKey<_HomePageState>? externalKey;
|
||||||
static final GlobalKey<_HomePageState> globalKey =
|
|
||||||
GlobalKey<_HomePageState>();
|
|
||||||
|
|
||||||
MainPageBBottomChange({Key? key}) : super(key: globalKey);
|
MainPageBBottomChange({Key? key, this.externalKey})
|
||||||
|
: super(key: key ?? externalKey);
|
||||||
|
|
||||||
// 静态方法:外部调用,跳转 tab
|
|
||||||
static void jumpTo(int index) {
|
static void jumpTo(int index) {
|
||||||
final state = globalKey.currentState;
|
final state = globalKey.currentState;
|
||||||
if (state != null) {
|
if (state != null) {
|
||||||
@@ -37,6 +59,9 @@ class MainPageBBottomChange extends StatefulWidget {
|
|||||||
return state?.selectedIndex;
|
return state?.selectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final GlobalKey<_HomePageState> globalKey =
|
||||||
|
GlobalKey<_HomePageState>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_HomePageState createState() => _HomePageState();
|
_HomePageState createState() => _HomePageState();
|
||||||
}
|
}
|
||||||
@@ -47,8 +72,8 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
late AnimationController _controller;
|
late AnimationController _controller;
|
||||||
late Animation<double> _positionAnimation;
|
late Animation<double> _positionAnimation;
|
||||||
double currentPosition = 0.0;
|
double currentPosition = 0.0;
|
||||||
|
MHLanguageController languageController = Get.find();
|
||||||
final List<String> titles = ['首页', '报告', '控制', '我的'];
|
List<String> get titles => ['首页', '报告', '控制', '我的'];
|
||||||
final List<String> path = [
|
final List<String> path = [
|
||||||
"assets/images/bar_home.svg",
|
"assets/images/bar_home.svg",
|
||||||
"assets/images/bar_heart.svg",
|
"assets/images/bar_heart.svg",
|
||||||
@@ -113,11 +138,15 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
DateTime? _lastBackPressedTime; // 记录上一次返回的时间
|
DateTime? _lastBackPressedTime; // 记录上一次返回的时间
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return Obx(() {
|
||||||
|
final currentLanguage =
|
||||||
|
languageController.selectLanguage.value; // 监听此变量变化
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
onPopInvokedWithResult: (disposition, result) async {
|
onPopInvokedWithResult: (disposition, result) async {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
var flag = await _handleBackPressed(context); // 自定义返回逻辑
|
var flag = await _handleBackPressed(context);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
SystemNavigator.pop();
|
SystemNavigator.pop();
|
||||||
}
|
}
|
||||||
@@ -134,9 +163,13 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
animatedPosition: _positionAnimation.value,
|
animatedPosition: _positionAnimation.value,
|
||||||
onTap: _onTabTapped,
|
onTap: _onTabTapped,
|
||||||
path: path,
|
path: path,
|
||||||
titles: titles,
|
titles: titles
|
||||||
|
.map((title) => title.tr) // 这里依赖 .tr 会自动根据 Get.locale 变化刷新
|
||||||
|
.toList(),
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void switchTab(int index) {
|
void switchTab(int index) {
|
||||||
@@ -226,7 +259,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
//如果当前没有连接该设备,则返回
|
//如果当前没有连接该设备,则返回
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (webviewTestController.selectDevice['blueToothStatus']!=2) {
|
if (webviewTestController.selectDevice['blueToothStatus'] != 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
edm.EasyDartModule.websocket.sendData(jsonEncode(WebSocketMessage(
|
edm.EasyDartModule.websocket.sendData(jsonEncode(WebSocketMessage(
|
||||||
|
|||||||
@@ -994,86 +994,9 @@ class _HomePageState extends State<HomePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return Expanded(
|
|
||||||
// child: SingleChildScrollView(
|
|
||||||
// child: Column(
|
|
||||||
// children: List.generate(
|
|
||||||
// deviceList.length,
|
|
||||||
// (i) {
|
|
||||||
// String mac = macList[i];
|
|
||||||
// List<dynamic> dailyDataList =
|
|
||||||
// reportData[mac]!;
|
|
||||||
// Map? targetDevice =
|
|
||||||
// deviceList.firstWhereOrNull(
|
|
||||||
// (device) => device['mac'] == mac,
|
|
||||||
// );
|
|
||||||
// List stateModule = [];
|
|
||||||
// String currentTime = "";
|
|
||||||
// String goalMac = targetDevice?['mac'];
|
|
||||||
// var person = targetDevice?['person'];
|
|
||||||
// return DynamicReportDetailWidget(
|
|
||||||
// key: ValueKey(
|
|
||||||
// '${targetDevice!['mac']}_${homeController.model.type}'), // 添加唯一key
|
|
||||||
// targetDevice: targetDevice!,
|
|
||||||
// sleepDateWidgets: List.generate(
|
|
||||||
// dailyDataList.length,
|
|
||||||
// (j) {
|
|
||||||
// var dayData = dailyDataList[j];
|
|
||||||
// DateTime date =
|
|
||||||
// DateTime.fromMillisecondsSinceEpoch(
|
|
||||||
// dayData['time'] is String
|
|
||||||
// ? int.parse(dayData['time'])
|
|
||||||
// : dayData['time'],
|
|
||||||
// );
|
|
||||||
// if (dayData['selected'] != null &&
|
|
||||||
// dayData['selected'] == true &&
|
|
||||||
// dayData['state'] != null) {
|
|
||||||
// stateModule = dayData['state'];
|
|
||||||
// currentTime = dayData['time'];
|
|
||||||
// }
|
|
||||||
// return SleepDateWidget(
|
|
||||||
// mac: mac,
|
|
||||||
// time: dayData['time'],
|
|
||||||
// date: date,
|
|
||||||
// score: dayData['score']?['socre']
|
|
||||||
// ?.toString() ??
|
|
||||||
// '',
|
|
||||||
// comment: dayData['score']?['name'],
|
|
||||||
// textColor: dayData['score']
|
|
||||||
// ?['color'] ==
|
|
||||||
// null
|
|
||||||
// ? null
|
|
||||||
// : stringToColor(
|
|
||||||
// dayData['score']?['color']),
|
|
||||||
// isSelected: dayData['selected'],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// sleepDataModuleWidgets: stateModule
|
|
||||||
// .isNotEmpty
|
|
||||||
// ? List.generate(
|
|
||||||
// stateModule.length,
|
|
||||||
// (j) {
|
|
||||||
// stateModule[j]['onto'] = true;
|
|
||||||
// stateModule[j]['time'] =
|
|
||||||
// currentTime;
|
|
||||||
// stateModule[j]['mac'] = goalMac;
|
|
||||||
// stateModule[j]['person'] = person;
|
|
||||||
// return SleepDataModuleWidget(
|
|
||||||
// data: stateModule[j],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// )
|
|
||||||
// : [],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(child:
|
||||||
child: Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 26.rpx), // 第一个上方间距
|
SizedBox(height: 26.rpx), // 第一个上方间距
|
||||||
...List.generate(deviceList.length, (i) {
|
...List.generate(deviceList.length, (i) {
|
||||||
@@ -1097,6 +1020,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
targetDevice: targetDevice!,
|
targetDevice: targetDevice!,
|
||||||
sleepDateWidgets: List.generate(
|
sleepDateWidgets: List.generate(
|
||||||
dailyDataList.length, (j) {
|
dailyDataList.length, (j) {
|
||||||
|
|
||||||
|
|
||||||
var dayData = dailyDataList[j];
|
var dayData = dailyDataList[j];
|
||||||
DateTime date = DateTime
|
DateTime date = DateTime
|
||||||
.fromMillisecondsSinceEpoch(
|
.fromMillisecondsSinceEpoch(
|
||||||
@@ -1148,7 +1073,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'背部律动',
|
'背部律动'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -69,7 +69,7 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.rpx),
|
SizedBox(height: 30.rpx),
|
||||||
Text(
|
Text(
|
||||||
'力度调节',
|
'力度调节'.tr,
|
||||||
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
style: TextStyle(color: Colors.grey, fontSize: 30.rpx),
|
||||||
),
|
),
|
||||||
SizedBox(height: 148.rpx),
|
SizedBox(height: 148.rpx),
|
||||||
@@ -92,10 +92,10 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('强',
|
Text('强'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.grey, fontSize: 30.rpx)),
|
color: Colors.grey, fontSize: 30.rpx)),
|
||||||
Text('弱',
|
Text('弱'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.grey, fontSize: 30.rpx)),
|
color: Colors.grey, fontSize: 30.rpx)),
|
||||||
],
|
],
|
||||||
@@ -153,7 +153,7 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'按摩定时',
|
'按摩定时'.tr,
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Colors.white70, fontSize: 30.rpx),
|
TextStyle(color: Colors.white70, fontSize: 30.rpx),
|
||||||
),
|
),
|
||||||
@@ -209,7 +209,7 @@ class _BackMovementPageState extends State<BackMovementPage> {
|
|||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: const Text('恢复到默认设置'),
|
child: Text('恢复到默认设置'.tr),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'添加设备',
|
'添加设备'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -86,7 +86,7 @@ class _HomeDeviceTypeState extends State<HomeDeviceType> {
|
|||||||
padding:
|
padding:
|
||||||
EdgeInsetsDirectional.fromSTEB(48.rpx, 24.rpx, 0, 0),
|
EdgeInsetsDirectional.fromSTEB(48.rpx, 24.rpx, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'选择类型',
|
'选择类型'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -111,14 +111,14 @@ Widget _buildControlCard(BuildContext context) {
|
|||||||
final List<Map<String, dynamic>> deviceTypeList = [
|
final List<Map<String, dynamic>> deviceTypeList = [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "智能床垫",
|
"name": "智能床垫".tr,
|
||||||
"desc": "SWES01 MHT01 SWES01 MHT01 SWES01 MHT01 ",
|
"desc": "SWES01 MHT01 SWES01 MHT01 SWES01 MHT01 ",
|
||||||
"img": "assets/images/device_bed.png",
|
"img": "assets/images/device_bed.png",
|
||||||
"page": 1,
|
"page": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name": "智能电动床",
|
"name": "智能电动床".tr,
|
||||||
"desc": "M300",
|
"desc": "M300",
|
||||||
"img": "assets/images/electric_bed.png",
|
"img": "assets/images/electric_bed.png",
|
||||||
"page": 2,
|
"page": 2,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:vbvs_app/component/tool/CustomCard.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/language/AppLanguage.dart';
|
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';
|
||||||
|
|
||||||
class LanguagePage extends StatefulWidget {
|
class LanguagePage extends StatefulWidget {
|
||||||
const LanguagePage({super.key});
|
const LanguagePage({super.key});
|
||||||
@@ -19,6 +20,7 @@ class LanguagePage extends StatefulWidget {
|
|||||||
|
|
||||||
class _LanguagePageState extends State<LanguagePage> {
|
class _LanguagePageState extends State<LanguagePage> {
|
||||||
MHLanguageController languageController = Get.find();
|
MHLanguageController languageController = Get.find();
|
||||||
|
MHTHomeController deviceController = Get.find();
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// languageController.initLanuageList();
|
// languageController.initLanuageList();
|
||||||
@@ -65,7 +67,7 @@ class _LanguagePageState extends State<LanguagePage> {
|
|||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
child: returnIconButtom,
|
child: returnIconButtomNew(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -120,14 +122,20 @@ class _LanguagePageState extends State<LanguagePage> {
|
|||||||
lang.selected = (lang ==
|
lang.selected = (lang ==
|
||||||
language); // 根据选择更新状态
|
language); // 根据选择更新状态
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await AppLanguage()
|
||||||
|
.loadLanguage(
|
||||||
|
language.language_code,
|
||||||
|
project: "mht"); // 加载语言
|
||||||
|
languageController
|
||||||
|
.updateAll(); // 更新操作
|
||||||
languageController
|
languageController
|
||||||
.selectLanguage
|
.selectLanguage
|
||||||
.value = language;
|
.value = language;
|
||||||
await AppLanguage()
|
final list = deviceController
|
||||||
.loadLanguage(language
|
.personnelList.value;
|
||||||
.language_code); // 加载语言
|
deviceController.getHomeSleeps(
|
||||||
languageController
|
list[0]["mac"], context);
|
||||||
.updateAll(); // 更新操作
|
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
@@ -167,14 +175,26 @@ class _LanguagePageState extends State<LanguagePage> {
|
|||||||
lang.selected = (lang ==
|
lang.selected = (lang ==
|
||||||
language); // 更新选中状态
|
language); // 更新选中状态
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await AppLanguage()
|
||||||
|
.loadLanguage(
|
||||||
|
language
|
||||||
|
.language_code,
|
||||||
|
project:
|
||||||
|
"mht"); // 加载语言
|
||||||
|
languageController
|
||||||
|
.updateAll(); // 更新操作
|
||||||
languageController
|
languageController
|
||||||
.selectLanguage
|
.selectLanguage
|
||||||
.value = language;
|
.value = language;
|
||||||
await AppLanguage()
|
final list =
|
||||||
.loadLanguage(language
|
deviceController
|
||||||
.language_code); // 加载语言
|
.personnelList
|
||||||
languageController
|
.value;
|
||||||
.updateAll(); // 更新操作
|
deviceController
|
||||||
|
.getHomeSleeps(
|
||||||
|
list[0]["mac"],
|
||||||
|
context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
].divide(SizedBox(
|
].divide(SizedBox(
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class _MattressControlPageState extends State<MattressControlPage> {
|
|||||||
final tabWidth = screenWidth / tabCount;
|
final tabWidth = screenWidth / tabCount;
|
||||||
final sideMargin = (tabWidth - thirdWidth) / 2;
|
final sideMargin = (tabWidth - thirdWidth) / 2;
|
||||||
|
|
||||||
final labels = ['左', '全局', '右'];
|
final labels = ['左'.tr, '全局'.tr, '右'.tr];
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||||
@@ -154,15 +154,15 @@ class _MattressControlPageState extends State<MattressControlPage> {
|
|||||||
final spacing = 20.0.rpx;
|
final spacing = 20.0.rpx;
|
||||||
|
|
||||||
final List<Map<String, dynamic>> allCards = [
|
final List<Map<String, dynamic>> allCards = [
|
||||||
{'title': '一键助眠', 'time': '30:00'},
|
{'title': '一键助眠'.tr, 'time': '30:00'},
|
||||||
{'title': '疲劳缓解', 'time': '20:00'},
|
{'title': '疲劳缓解'.tr, 'time': '20:00'},
|
||||||
{'title': '全身放松', 'time': '20:00'},
|
{'title': '全身放松'.tr, 'time': '20:00'},
|
||||||
{'title': '背部律动', 'time': '10:00'},
|
{'title': '背部律动'.tr, 'time': '10:00'},
|
||||||
{'title': '腿部律动', 'time': '30:00'},
|
{'title': '腿部律动'.tr, 'time': '30:00'},
|
||||||
{'title': '垂直律动', 'time': ''},
|
{'title': '垂直律动'.tr, 'time': ''},
|
||||||
{'title': '加热', 'time': '30:00'},
|
{'title': '加热'.tr, 'time': '30:00'},
|
||||||
{'title': '柔性唤醒', 'time': 'PM 08:00'},
|
{'title': '柔性唤醒'.tr, 'time': 'PM 08:00'},
|
||||||
{'title': '记忆', 'time': ''},
|
{'title': '记忆'.tr, 'time': ''},
|
||||||
];
|
];
|
||||||
|
|
||||||
final firstRow = allCards.sublist(0, 3);
|
final firstRow = allCards.sublist(0, 3);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
// getMessageStatus(messageInfo['status']),
|
// getMessageStatus(messageInfo['status']),
|
||||||
"查看详情",
|
"查看详情".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class ShareDeviceDetailWidget extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'详情',
|
'详情'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -80,7 +80,7 @@ class ShareDeviceDetailWidget extends GetView {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"$serviceAddress$serviceName$serviceApi";
|
"$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {
|
data: {
|
||||||
@@ -129,7 +129,7 @@ class ShareDeviceDetailWidget extends GetView {
|
|||||||
String serviceApi = ServiceConstant.device_show;
|
String serviceApi = ServiceConstant.device_show;
|
||||||
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {"id": data['info'][4]["id"], "opType": opType.value},
|
data: {"id": data['info'][4]["id"], "opType": opType.value},
|
||||||
@@ -423,7 +423,7 @@ class ShareDeviceDetailWidget extends GetView {
|
|||||||
gradientDirection: GradientDirection.vertical,
|
gradientDirection: GradientDirection.vertical,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
deviceListController.unbindShareDevice(
|
deviceListController.unbindShareDevice(
|
||||||
data['info'][5]['uid'], data['mac'], context);
|
data['info'][5]['uid'], data['mac'.tr], context);
|
||||||
},
|
},
|
||||||
colors: const [
|
colors: const [
|
||||||
Color(0xFFFCFCFC),
|
Color(0xFFFCFCFC),
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ShareUserWidget extends GetView {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed('/shareDeviceDetail',
|
Get.toNamed('/shareDeviceDetail',
|
||||||
arguments: {"mac": mac, "info": info});
|
arguments: {"mac".tr: mac, "info": info});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class _VitalSignsSensorState extends State<VitalSignsSensorPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_fetchDeviceList() async {
|
_fetchDeviceList() async {
|
||||||
await controller.getVitalList(widget.data['mac']);
|
await controller.getVitalList(widget.data['mac'.tr]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -70,7 +70,7 @@ class _VitalSignsSensorState extends State<VitalSignsSensorPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
"体征传感器",
|
"体征传感器".tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -109,7 +109,8 @@ class _VitalSignsSensorState extends State<VitalSignsSensorPage> {
|
|||||||
SizedBox(height: 30.rpx),
|
SizedBox(height: 30.rpx),
|
||||||
...List.generate(dataList.length, (index) {
|
...List.generate(dataList.length, (index) {
|
||||||
final item = dataList[index];
|
final item = dataList[index];
|
||||||
final title = "体征传感器${index == 0 ? "A" : "B"}"; // ✅ 只处理 A/B 场景
|
final title =
|
||||||
|
index == 0 ? '体征传感器A'.tr : '体征传感器B'.tr; // ✅ 只处理 A/B 场景
|
||||||
return VitalWidget(title: title, data: item);
|
return VitalWidget(title: title, data: item);
|
||||||
}).divide(SizedBox(height: 30.rpx)),
|
}).divide(SizedBox(height: 30.rpx)),
|
||||||
SizedBox(height: 30.rpx),
|
SizedBox(height: 30.rpx),
|
||||||
@@ -128,7 +129,7 @@ class VitalWidget extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final String id = data['mac'] ?? '--';
|
final String id = data['mac'.tr] ?? '--';
|
||||||
final int? timestamp = data['status']['updateTime'];
|
final int? timestamp = data['status']['updateTime'];
|
||||||
final String time = (timestamp != null)
|
final String time = (timestamp != null)
|
||||||
? DateFormat('yyyy-MM-dd HH:mm')
|
? DateFormat('yyyy-MM-dd HH:mm')
|
||||||
@@ -171,7 +172,7 @@ class VitalWidget extends StatelessWidget {
|
|||||||
width: MediaQuery.sizeOf(context).width * 0.14,
|
width: MediaQuery.sizeOf(context).width * 0.14,
|
||||||
constraints: BoxConstraints(minWidth: 106.rpx),
|
constraints: BoxConstraints(minWidth: 106.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
"设备ID",
|
"设备ID".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#929699"),
|
color: stringToColor("#929699"),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -193,7 +194,7 @@ class VitalWidget extends StatelessWidget {
|
|||||||
width: MediaQuery.sizeOf(context).width * 0.14,
|
width: MediaQuery.sizeOf(context).width * 0.14,
|
||||||
constraints: BoxConstraints(minWidth: 106.rpx),
|
constraints: BoxConstraints(minWidth: 106.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
"更新时间",
|
"更新时间".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#929699"),
|
color: stringToColor("#929699"),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class _MhAboutUsPageState extends State<MhAboutUsPage> {
|
|||||||
widget.webView = MyWebView(
|
widget.webView = MyWebView(
|
||||||
url: url,
|
url: url,
|
||||||
onLoad: () {
|
onLoad: () {
|
||||||
print('网页载入完毕');
|
print('网页载入完毕'.tr);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class AddressListPage extends GetView<AddressListController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'地址管理',
|
'地址管理'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -184,7 +184,7 @@ class AddressListPage extends GetView<AddressListController> {
|
|||||||
|
|
||||||
SizedBox(width: 10), // 加号和文字间距
|
SizedBox(width: 10), // 加号和文字间距
|
||||||
Text(
|
Text(
|
||||||
'添加新地址',
|
'添加新地址'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF85F5FF),
|
color: Color(0xFF85F5FF),
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class AddressModuleWidget extends GetView {
|
|||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
child: Text(
|
child: Text(
|
||||||
'默认',
|
'默认'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0XFF6BFDAC),
|
color: Color(0XFF6BFDAC),
|
||||||
fontSize: 20.rpx,
|
fontSize: 20.rpx,
|
||||||
@@ -131,7 +131,7 @@ class AddressModuleWidget extends GetView {
|
|||||||
addressListController.model
|
addressListController.model
|
||||||
.addressList[index]['address']?.isEmpty ??
|
.addressList[index]['address']?.isEmpty ??
|
||||||
true
|
true
|
||||||
? '无详细地址'
|
? '无详细地址'.tr
|
||||||
: addressListController.model.addressList[index]
|
: addressListController.model.addressList[index]
|
||||||
['address'],
|
['address'],
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -172,7 +172,7 @@ class AddressModuleWidget extends GetView {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional(1, 0),
|
alignment: AlignmentDirectional(1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'编辑',
|
'编辑'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF84F5FF),
|
color: Color(0xFF84F5FF),
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
import 'package:map_launcher/map_launcher.dart';
|
import 'package:map_launcher/map_launcher.dart';
|
||||||
|
|
||||||
class AppMapLocation {
|
class AppMapLocation {
|
||||||
@@ -10,25 +11,25 @@ class AppMapLocation {
|
|||||||
String v = "";
|
String v = "";
|
||||||
switch (m.mapType) {
|
switch (m.mapType) {
|
||||||
case MapType.baidu:
|
case MapType.baidu:
|
||||||
v = '百度地图';
|
v = '百度地图'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.tencent:
|
case MapType.tencent:
|
||||||
v = '腾讯地图';
|
v = '腾讯地图'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.amap:
|
case MapType.amap:
|
||||||
v = '高德地图';
|
v = '高德地图'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.apple:
|
case MapType.apple:
|
||||||
v = 'Apple地图';
|
v = 'Apple地图'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.google:
|
case MapType.google:
|
||||||
v = 'Google地图';
|
v = 'Google地图'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.googleGo:
|
case MapType.googleGo:
|
||||||
v = 'Google地图Go';
|
v = 'Google地图Go'.tr;
|
||||||
break;
|
break;
|
||||||
case MapType.petal:
|
case MapType.petal:
|
||||||
v = 'Petal地图';
|
v = 'Petal地图'.tr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
v = m.mapName;
|
v = m.mapName;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'申请报修',
|
'申请报修'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -147,7 +147,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
0, -1),
|
0, -1),
|
||||||
child: Text(
|
child: Text(
|
||||||
'选择需要报修的设备',
|
'选择需要报修的设备'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
@@ -193,7 +193,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'已绑设备',
|
'已绑设备'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -201,6 +201,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
26.rpx,
|
26.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
|
height: 1,
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
),
|
),
|
||||||
@@ -221,138 +222,6 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
color: Colors
|
color: Colors
|
||||||
.white,
|
.white,
|
||||||
),
|
),
|
||||||
// child: Obx(
|
|
||||||
// () {
|
|
||||||
// List<Map<String, String>> deviceOptions = controller
|
|
||||||
// .model
|
|
||||||
// .device_list!
|
|
||||||
// .map((device) => {
|
|
||||||
// 'mac': device['mac'].toString(), // 提取设备 Mac
|
|
||||||
// 'name': device['name'].toString(), // 提取设备名称
|
|
||||||
// 'type': device['device_type'].toString()
|
|
||||||
// })
|
|
||||||
// .toList();
|
|
||||||
|
|
||||||
// // 提取 optionsLabel 和 optionsValue
|
|
||||||
// // List<String> deviceNames = deviceOptions
|
|
||||||
// // .map((device) => device['name']!) // 用于显示的名称列表
|
|
||||||
// // .toList();
|
|
||||||
// List<String>
|
|
||||||
// deviceNames =
|
|
||||||
// controller.model.device_list!.map((device) {
|
|
||||||
// final mac =
|
|
||||||
// device['mac']?.toString() ?? '';
|
|
||||||
// final name =
|
|
||||||
// device['name']?.toString() ?? '';
|
|
||||||
// final type =
|
|
||||||
// getDeviceTypeName(int.tryParse('${device['device_type']}'));
|
|
||||||
|
|
||||||
// return name.isNotEmpty
|
|
||||||
// ? '$name-MAC$mac'
|
|
||||||
// : '$type-MAC$mac';
|
|
||||||
// }).toList();
|
|
||||||
|
|
||||||
// List<String> deviceMacs = deviceOptions
|
|
||||||
// .map((device) => device['mac']!) // 用于匹配的 ID 列表
|
|
||||||
// .toList();
|
|
||||||
|
|
||||||
// return FlutterFlowDropDown<
|
|
||||||
// String>(
|
|
||||||
// controller:
|
|
||||||
// tmpcontroller,
|
|
||||||
|
|
||||||
// fillColor:
|
|
||||||
// Colors.white, // 控件区域背景色
|
|
||||||
// options:
|
|
||||||
// deviceMacs, // 下拉菜单选项为设备的 ID
|
|
||||||
// optionLabels:
|
|
||||||
// deviceNames, // 下拉菜单显示的内容为设备名称
|
|
||||||
// onChanged:
|
|
||||||
// (val) {
|
|
||||||
// // var selectedDevice = controller.model.device_list!.firstWhere((device) => device['mac'].toString() == val);
|
|
||||||
// // controller.model.select_device = val;
|
|
||||||
// // controller.model.device_type = selectedDevice['device_type'];
|
|
||||||
// // // controller.model.device_category = selectedDevice['deviceSeries']['name'] ?? '未知型号'; // 获取设备型号
|
|
||||||
// // controller.model.device_category = '未知型号';
|
|
||||||
// // controller.model.device_id = selectedDevice['mac'] ?? '未知设备mac'; // 获取设备ID
|
|
||||||
// // controller.model.device_name = selectedDevice['name'] ?? '未知设备'; // 获取设备名称
|
|
||||||
// // controller.updateAll();
|
|
||||||
|
|
||||||
// var selectedDevice = controller.model.device_list!.firstWhere((device) => device['mac'].toString() == val);
|
|
||||||
|
|
||||||
// final mac = selectedDevice['mac']?.toString() ?? '未知MAC';
|
|
||||||
// final name = selectedDevice['name']?.toString();
|
|
||||||
// final type = int.tryParse('${selectedDevice['device_type']}');
|
|
||||||
// final typeName = getDeviceTypeName(type);
|
|
||||||
|
|
||||||
// controller.model.select_device = mac;
|
|
||||||
// controller.model.device_type = selectedDevice['device_type'];
|
|
||||||
// controller.model.device_category = '未知型号'; // 后续可替换成设备系列
|
|
||||||
|
|
||||||
// // 如果 name 不为空则用 name,否则用 typeName-mac
|
|
||||||
// controller.model.device_name = (name != null && name.isNotEmpty) ? name : '$typeName-MAC$mac';
|
|
||||||
|
|
||||||
// controller.model.device_id = mac;
|
|
||||||
|
|
||||||
// controller.updateAll();
|
|
||||||
// },
|
|
||||||
// width:
|
|
||||||
// 300,
|
|
||||||
// height:
|
|
||||||
// 56,
|
|
||||||
// searchHintTextStyle:
|
|
||||||
// const TextStyle(
|
|
||||||
// fontFamily: 'Readex Pro',
|
|
||||||
// letterSpacing: 0,
|
|
||||||
// ),
|
|
||||||
|
|
||||||
// searchTextStyle:
|
|
||||||
// const TextStyle(
|
|
||||||
// fontFamily: 'Readex Pro',
|
|
||||||
// letterSpacing: 0,
|
|
||||||
// ),
|
|
||||||
// textStyle:
|
|
||||||
// TextStyle(
|
|
||||||
// fontFamily: 'Readex Pro',
|
|
||||||
// color: Colors.black,
|
|
||||||
// fontSize: 26.rpx,
|
|
||||||
// letterSpacing: 0,
|
|
||||||
// ),
|
|
||||||
// hintText:
|
|
||||||
// '请选择绑定设备',
|
|
||||||
// searchHintText:
|
|
||||||
// '查找',
|
|
||||||
// icon:
|
|
||||||
// const Icon(
|
|
||||||
// Icons.keyboard_arrow_down_rounded,
|
|
||||||
// color: Colors.black,
|
|
||||||
// size: 24,
|
|
||||||
// ),
|
|
||||||
// // fillColor:
|
|
||||||
// // FlutterFlowTheme.of(context).secondaryBackground,
|
|
||||||
// elevation:
|
|
||||||
// 2,
|
|
||||||
// borderColor:
|
|
||||||
// Colors.white,
|
|
||||||
// borderWidth:
|
|
||||||
// 0,
|
|
||||||
// borderRadius:
|
|
||||||
// 8,
|
|
||||||
// margin: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
// 10,
|
|
||||||
// 4,
|
|
||||||
// 10,
|
|
||||||
// 4),
|
|
||||||
// hidesUnderline:
|
|
||||||
// true,
|
|
||||||
// isOverButton:
|
|
||||||
// false,
|
|
||||||
// isSearchable:
|
|
||||||
// false,
|
|
||||||
// isMultiSelect:
|
|
||||||
// false,
|
|
||||||
// );
|
|
||||||
// })
|
|
||||||
child: Obx(() {
|
child: Obx(() {
|
||||||
final isDeviceListEmpty = controller
|
final isDeviceListEmpty = controller
|
||||||
.model
|
.model
|
||||||
@@ -367,7 +236,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.device_list!
|
.device_list!
|
||||||
.map((device) =>
|
.map((device) =>
|
||||||
{
|
{
|
||||||
'mac': device['mac'].toString(),
|
'mac'.tr: device['mac'.tr].toString(),
|
||||||
'name': device['name'].toString(),
|
'name': device['name'].toString(),
|
||||||
'type': device['device_type'].toString()
|
'type': device['device_type'].toString()
|
||||||
})
|
})
|
||||||
@@ -381,7 +250,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.map(
|
.map(
|
||||||
(device) {
|
(device) {
|
||||||
final mac =
|
final mac =
|
||||||
device['mac']?.toString() ??
|
device['mac'.tr]?.toString() ??
|
||||||
'';
|
'';
|
||||||
final name =
|
final name =
|
||||||
device['name']?.toString() ??
|
device['name']?.toString() ??
|
||||||
@@ -400,7 +269,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
deviceMacs =
|
deviceMacs =
|
||||||
deviceOptions
|
deviceOptions
|
||||||
.map((device) =>
|
.map((device) =>
|
||||||
device['mac']!)
|
device['mac'.tr]!)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return AbsorbPointer(
|
return AbsorbPointer(
|
||||||
@@ -428,12 +297,12 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.model
|
.model
|
||||||
.device_list!
|
.device_list!
|
||||||
.firstWhere((device) =>
|
.firstWhere((device) =>
|
||||||
device['mac'].toString() ==
|
device['mac'.tr].toString() ==
|
||||||
val);
|
val);
|
||||||
|
|
||||||
final mac =
|
final mac =
|
||||||
selectedDevice['mac']?.toString() ??
|
selectedDevice['mac'.tr]?.toString() ??
|
||||||
'未知MAC';
|
'未知MAC'.tr;
|
||||||
final name =
|
final name =
|
||||||
selectedDevice['name']?.toString();
|
selectedDevice['name']?.toString();
|
||||||
final type =
|
final type =
|
||||||
@@ -449,7 +318,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.device_type = selectedDevice['device_type'];
|
.device_type = selectedDevice['device_type'];
|
||||||
controller
|
controller
|
||||||
.model
|
.model
|
||||||
.device_category = '未知型号';
|
.device_category = '未知型号'.tr;
|
||||||
controller
|
controller
|
||||||
.model
|
.model
|
||||||
.device_name = (name != null &&
|
.device_name = (name != null &&
|
||||||
@@ -481,9 +350,11 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
),
|
),
|
||||||
hintText: isDeviceListEmpty
|
hintText: isDeviceListEmpty
|
||||||
? '暂无可选设备'
|
? '暂无可选设备'
|
||||||
: '请选择绑定设备',
|
.tr
|
||||||
|
: '请选择绑定设备'
|
||||||
|
.tr,
|
||||||
searchHintText:
|
searchHintText:
|
||||||
'查找',
|
'查找'.tr,
|
||||||
icon:
|
icon:
|
||||||
Icon(
|
Icon(
|
||||||
Icons
|
Icons
|
||||||
@@ -546,15 +417,16 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.height *
|
.height *
|
||||||
0.038,
|
0.038,
|
||||||
constraints:
|
constraints:
|
||||||
const BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth: 60,
|
minWidth: 62,
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'设备系列',
|
'设备系列'.tr,
|
||||||
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -562,6 +434,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
26.rpx,
|
26.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
|
height: 1,
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
),
|
),
|
||||||
@@ -730,7 +603,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'产品型号',
|
'产品型号'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -738,6 +611,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
26.rpx,
|
26.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
|
height: 1,
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
),
|
),
|
||||||
@@ -898,15 +772,16 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
.height *
|
.height *
|
||||||
0.038,
|
0.038,
|
||||||
constraints:
|
constraints:
|
||||||
const BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
),
|
minHeight:
|
||||||
|
60.rpx),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'序列号',
|
'序列号'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -914,6 +789,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
26.rpx,
|
26.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
|
height: 1,
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
),
|
),
|
||||||
@@ -1182,7 +1058,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
0, 0),
|
0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'上传设备故障照片',
|
'上传设备故障照片'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -1393,7 +1269,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional
|
||||||
.fromSTEB(0, 15, 0, 16),
|
.fromSTEB(0, 15, 0, 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
'请描述一下您的问题',
|
'请描述一下您的问题'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -1432,7 +1308,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '问题描述(100个字以内)',
|
hintText: '问题描述(100个字以内)'.tr,
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
@@ -1530,13 +1406,12 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
0, 48.rpx, 0, 48.rpx),
|
0, 48.rpx, 0, 48.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
'联系方式',
|
'联系方式'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1592,7 +1467,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'联系人',
|
'联系人'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -1756,7 +1631,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'手机号码',
|
'手机号码'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -1807,6 +1682,8 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
|
// hintText:
|
||||||
|
// "请输入手机号".tr,
|
||||||
hintStyle:
|
hintStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
@@ -1932,7 +1809,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
},
|
},
|
||||||
"device": [
|
"device": [
|
||||||
{
|
{
|
||||||
"mac": controller.model.device_id,
|
"mac".tr: controller.model.device_id,
|
||||||
"desc": controller.model.desc,
|
"desc": controller.model.desc,
|
||||||
"img": controller.model.issue_img,
|
"img": controller.model.issue_img,
|
||||||
"category": controller.model.device_category,
|
"category": controller.model.device_category,
|
||||||
@@ -1942,7 +1819,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
ApiResponse apiResponse = await requestWithLog(
|
ApiResponse apiResponse = await requestWithLog(
|
||||||
logTitle: "提交报修信息",
|
logTitle: "提交报修信息".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -1979,7 +1856,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"提交申请",
|
"提交申请".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#011D33"),
|
color: stringToColor("#011D33"),
|
||||||
@@ -2016,53 +1893,52 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
return images;
|
return images;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String checkRepairParam() {
|
String checkRepairParam() {
|
||||||
String message = "";
|
String message = "";
|
||||||
|
|
||||||
if (controller.model.device_type == null ||
|
if (controller.model.device_type == null ||
|
||||||
controller.model.device_series!.isEmpty) {
|
controller.model.device_series!.isEmpty) {
|
||||||
message = '请输入设备系列!';
|
message = '请输入设备系列!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (controller.model.device_category == null ||
|
if (controller.model.device_category == null ||
|
||||||
controller.model.device_category!.isEmpty) {
|
controller.model.device_category!.isEmpty) {
|
||||||
message = '请输入设备型号!';
|
message = '请输入设备型号!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (controller.model.device_id == null ||
|
if (controller.model.device_id == null ||
|
||||||
controller.model.device_id!.isEmpty) {
|
controller.model.device_id!.isEmpty) {
|
||||||
message = '请输入设备序列号id!';
|
message = '请输入设备序列号id!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (controller.model.apply_name == null ||
|
if (controller.model.apply_name == null ||
|
||||||
controller.model.apply_name!.isEmpty) {
|
controller.model.apply_name!.isEmpty) {
|
||||||
message = '请输入姓名!';
|
message = '请输入姓名!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
RegExp nameRegExp = RegExp(r'^[\u4e00-\u9fa5]{2,4}$');
|
RegExp nameRegExp = RegExp(r'^[\u4e00-\u9fa5]{2,4}$');
|
||||||
|
|
||||||
if (!nameRegExp.hasMatch(controller.model.apply_name!)) {
|
if (!nameRegExp.hasMatch(controller.model.apply_name!)) {
|
||||||
message = '姓名必须为2到4个汉字!';
|
message = '姓名必须为2到4个汉字!'.tr;
|
||||||
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (controller.model.tel == null || controller.model.tel!.isEmpty) {
|
if (controller.model.tel == null || controller.model.tel!.isEmpty) {
|
||||||
message = '请输入手机号!';
|
message = '请输入手机号!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (!MyUtils.isValidPhoneNumber(controller.model.tel!)) {
|
if (!MyUtils.isValidPhoneNumber(controller.model.tel!)) {
|
||||||
message = '无效的手机号!';
|
message = '无效的手机号!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controller.model.desc == null || controller.model.desc!.isEmpty) {
|
if (controller.model.desc == null || controller.model.desc!.isEmpty) {
|
||||||
message = '请输入问题描述!';
|
message = '请输入问题描述!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
if (controller.model.issue_img == null ||
|
if (controller.model.issue_img == null ||
|
||||||
controller.model.issue_img!.isEmpty) {
|
controller.model.issue_img!.isEmpty) {
|
||||||
message = '请至少上传一张问题图片!';
|
message = '请至少上传一张问题图片!'.tr;
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
@@ -2083,13 +1959,13 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
|||||||
if (type == null) return '';
|
if (type == null) return '';
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
return '体征检测设备';
|
return '体征检测设备'.tr;
|
||||||
case 2:
|
case 2:
|
||||||
return '智能床';
|
return '智能床'.tr;
|
||||||
case 3:
|
case 3:
|
||||||
return '智能床垫';
|
return '智能床垫'.tr;
|
||||||
default:
|
default:
|
||||||
return '未知设备';
|
return '未知设备'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'设置',
|
'设置'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -94,7 +94,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
obsData['name']?.toString() ?? '未命名',
|
obsData['name']?.toString() ?? '未命名'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 40.rpx,
|
fontSize: 40.rpx,
|
||||||
@@ -110,7 +110,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
2 +
|
2 +
|
||||||
_calculateTextHalfWidth(
|
_calculateTextHalfWidth(
|
||||||
obsData['name']?.toString() ??
|
obsData['name']?.toString() ??
|
||||||
'未命名') +
|
'未命名'.tr) +
|
||||||
22.rpx,
|
22.rpx,
|
||||||
top: 5.rpx,
|
top: 5.rpx,
|
||||||
child: ClickableContainer(
|
child: ClickableContainer(
|
||||||
@@ -141,7 +141,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(obsData['mac']?.toString() ?? '未命名',
|
Text(obsData['mac'.tr]?.toString() ?? '未命名'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white70, fontSize: 26.rpx)),
|
color: Colors.white70, fontSize: 26.rpx)),
|
||||||
|
|
||||||
@@ -165,8 +165,8 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
//下面文字和颜色也根据上面变化
|
//下面文字和颜色也根据上面变化
|
||||||
Text(
|
Text(
|
||||||
obsData['blueToothStatus'] == 2
|
obsData['blueToothStatus'] == 2
|
||||||
? '已连接'
|
? '已连接'.tr
|
||||||
: '未连接',
|
: '未连接'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: obsData['blueToothStatus'] == 2
|
color: obsData['blueToothStatus'] == 2
|
||||||
? Color(0xFF6BFDAC)
|
? Color(0xFF6BFDAC)
|
||||||
@@ -185,16 +185,16 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
children: [
|
children: [
|
||||||
if (isBind) ...[
|
if (isBind) ...[
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '详情', "/devicePeopleInfo",
|
context, '详情'.tr, "/devicePeopleInfo",
|
||||||
arguments: obsData),
|
arguments: obsData),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context,
|
context,
|
||||||
'人员资料',
|
'人员资料'.tr,
|
||||||
"/peopleInfoPage",
|
"/peopleInfoPage",
|
||||||
arguments: obsData,
|
arguments: obsData,
|
||||||
),
|
),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '房间选择', "/roomPickerPage",
|
context, '房间选择'.tr, "/roomPickerPage",
|
||||||
arguments: obsData, onResult: (result) {
|
arguments: obsData, onResult: (result) {
|
||||||
if (result != null && result is Map) {
|
if (result != null && result is Map) {
|
||||||
final Map<String, dynamic> safeMap =
|
final Map<String, dynamic> safeMap =
|
||||||
@@ -209,29 +209,29 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
}),
|
}),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context,
|
context,
|
||||||
'设备校准',
|
'设备校准'.tr,
|
||||||
"/mhtCalibrationAfterPage",
|
"/mhtCalibrationAfterPage",
|
||||||
arguments: obsData,
|
arguments: obsData,
|
||||||
),
|
),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '体征传感器', "/vitalSignsSensorPage",
|
context, '体征传感器'.tr, "/vitalSignsSensorPage",
|
||||||
arguments: obsData),
|
arguments: obsData),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context,
|
context,
|
||||||
'WIFI配置',
|
'WIFI配置'.tr,
|
||||||
"/mhtWifiAfterPage",
|
"/mhtWifiAfterPage",
|
||||||
arguments: obsData,
|
arguments: obsData,
|
||||||
),
|
),
|
||||||
// _buildMenuButton(
|
// _buildMenuButton(
|
||||||
// context, '睡眠习惯', "/sleepHabitPage"),
|
// context, '睡眠习惯', "/sleepHabitPage"),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '分享设备', "/deviceSharePage",
|
context, '分享设备'.tr, "/deviceSharePage",
|
||||||
arguments: obsData),
|
arguments: obsData),
|
||||||
],
|
],
|
||||||
if (!isBind) ...[
|
if (!isBind) ...[
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context,
|
context,
|
||||||
obsData['bind_type'] == 1 ? '解绑' : '删除',
|
obsData['bind_type'] == 1 ? '解绑'.tr : '删除'.tr,
|
||||||
"",
|
"",
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// await deviceListController
|
// await deviceListController
|
||||||
@@ -255,7 +255,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
// 解绑弹窗
|
// 解绑弹窗
|
||||||
showUnbindConfirmDialog(
|
showUnbindConfirmDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: "是否进行解绑?",
|
title: "是否进行解绑?".tr,
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.unbindDevice(obsData);
|
.unbindDevice(obsData);
|
||||||
@@ -288,7 +288,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
// 删除弹窗
|
// 删除弹窗
|
||||||
showDeleteDeviceConfirmDialog(
|
showDeleteDeviceConfirmDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: "是否进行删除?",
|
title: "是否进行删除?".tr,
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.unbindDevice(
|
.unbindDevice(
|
||||||
@@ -307,20 +307,20 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '详情', "/devicePeopleInfo",
|
context, '详情'.tr, "/devicePeopleInfo",
|
||||||
arguments: obsData),
|
arguments: obsData),
|
||||||
],
|
],
|
||||||
if (isBind) ...[
|
if (isBind) ...[
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context,
|
context,
|
||||||
obsData['bind_type'] == 1 ? '解绑' : '删除',
|
obsData['bind_type'] == 1 ? '解绑'.tr : '删除'.tr,
|
||||||
"",
|
"",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (obsData['bind_type'] == 1) {
|
if (obsData['bind_type'] == 1) {
|
||||||
// 解绑弹窗
|
// 解绑弹窗
|
||||||
showUnbindConfirmDialog(
|
showUnbindConfirmDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: "是否进行解绑?",
|
title: "是否进行解绑?".tr,
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.unbindDevice(obsData);
|
.unbindDevice(obsData);
|
||||||
@@ -353,7 +353,7 @@ class _BluetoothPageState extends State<BluetoothPage> {
|
|||||||
// 删除弹窗
|
// 删除弹窗
|
||||||
showDeleteDeviceConfirmDialog(
|
showDeleteDeviceConfirmDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: "是否进行删除?",
|
title: "是否进行删除?".tr,
|
||||||
onConfirm: () async {
|
onConfirm: () async {
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.unbindDevice(
|
.unbindDevice(
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'我要预约',
|
'我要预约'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -141,7 +141,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
height: 136.rpx,
|
height: 136.rpx,
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'体验日期',
|
'体验日期'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -178,7 +178,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'体验时段',
|
'体验时段'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -210,7 +210,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
index;
|
index;
|
||||||
|
|
||||||
controller.updateAll();
|
controller.updateAll();
|
||||||
}, title: '请选择时间');
|
}, title: '请选择时间'.tr);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -234,7 +234,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
.select_time_index !=
|
.select_time_index !=
|
||||||
null
|
null
|
||||||
? "${controller.model.time_period?[controller.model.select_time_index!]?["timeStr"]}"
|
? "${controller.model.time_period?[controller.model.select_time_index!]?["timeStr"]}"
|
||||||
: '请选择时间',
|
: '请选择时间'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -279,7 +279,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'体验人员',
|
'体验人员'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -327,7 +327,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '输入姓名',
|
hintText: '输入姓名'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
@@ -413,7 +413,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'手机号',
|
'手机号'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -462,7 +462,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '输入手机号',
|
hintText: '输入手机号'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
@@ -660,7 +660,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"提交预约",
|
"提交预约".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#011D33"),
|
color: stringToColor("#011D33"),
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ class BookSuccessPage extends GetView {
|
|||||||
Map data;
|
Map data;
|
||||||
BookSuccessPage({required this.data});
|
BookSuccessPage({required this.data});
|
||||||
final infoList = [
|
final infoList = [
|
||||||
{"label": "预约编号:", "value": "54648614654646"},
|
{"label": "预约编号:".tr, "value": "54648614654646"},
|
||||||
{"label": "预约人员:", "value": "张大大"},
|
{"label": "预约人员:".tr, "value": "张大大".tr},
|
||||||
{"label": "手机号码:", "value": "139****5699"},
|
{"label": "手机号码:".tr, "value": "139****5699"},
|
||||||
{"label": "体验时间:", "value": "2024-02-15 07:30"},
|
{"label": "体验时间:".tr, "value": "2024-02-15 07:30"},
|
||||||
{"label": "预约门店:", "value": "SWES眠花糖杭州南星桥旗舰店"},
|
{"label": "预约门店:".tr, "value": "SWES眠花糖杭州南星桥旗舰店".tr},
|
||||||
{"label": "门店地址:", "value": "浙江省杭州市上城区飞云江路45号一层"},
|
{"label": "门店地址:".tr, "value": "浙江省杭州市上城区飞云江路45号一层".tr},
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -53,7 +53,7 @@ class BookSuccessPage extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'我要预约',
|
'我要预约'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -101,7 +101,7 @@ class BookSuccessPage extends GetView {
|
|||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0, 0),
|
alignment: const AlignmentDirectional(0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'预约成功!',
|
'预约成功!'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -174,7 +174,7 @@ class BookSuccessPage extends GetView {
|
|||||||
child: Center(
|
child: Center(
|
||||||
// 保证文字居中
|
// 保证文字居中
|
||||||
child: Text(
|
child: Text(
|
||||||
"关闭",
|
"关闭".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0XFF011D33),
|
color: Color(0XFF011D33),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -199,7 +199,7 @@ class BookSuccessPage extends GetView {
|
|||||||
child: Center(
|
child: Center(
|
||||||
// 保证文字居中
|
// 保证文字居中
|
||||||
child: Text(
|
child: Text(
|
||||||
"我的预约",
|
"我的预约".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0XFF011D33),
|
color: Color(0XFF011D33),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'注销账号',
|
'注销账号'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -104,8 +104,8 @@ class DeletedAccountPage extends GetView {
|
|||||||
color: Color(0XFF84F5FF),
|
color: Color(0XFF84F5FF),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Text(
|
Text(
|
||||||
"注销智慧眠花糖账号",
|
"注销智慧眠花糖账号".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20, // 设置字体大小
|
fontSize: 20, // 设置字体大小
|
||||||
color: Color(0xFFFFFFFF),
|
color: Color(0xFFFFFFFF),
|
||||||
@@ -121,7 +121,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
RichText(
|
RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: "账号注销后,你将无法使用以下功能,",
|
text: "账号注销后,你将无法使用以下功能,".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.normal_text_size, // 设置字体大小
|
||||||
@@ -131,7 +131,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销",
|
"并且当前有绑定以及被分享的智能床、智能床垫等设备的账号不能注销".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
@@ -140,7 +140,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ",可先进行解绑后再进行注销操作。",
|
text: ",可先进行解绑后再进行注销操作。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
@@ -154,7 +154,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"无法控制智能床、智能床垫等设备",
|
"无法控制智能床、智能床垫等设备".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.title_size, // 设置字体大小
|
.title_size, // 设置字体大小
|
||||||
@@ -165,7 +165,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 6,
|
height: 6,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。",
|
"你将无法控制你的智能床、智能床垫等设备,以及与其相关的各种操作。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.normal_text_size, // 设置字体大小
|
||||||
@@ -176,7 +176,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"无法查询睡眠报告和体征数据",
|
"无法查询睡眠报告和体征数据".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.title_size, // 设置字体大小
|
.title_size, // 设置字体大小
|
||||||
@@ -187,7 +187,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 6,
|
height: 6,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"注销账号后你将查询不到你以前的睡眠报告和实时数据。",
|
"注销账号后你将查询不到你以前的睡眠报告和实时数据。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.normal_text_size, // 设置字体大小
|
||||||
@@ -198,7 +198,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"无法使用的其他功能",
|
"无法使用的其他功能".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.title_size, // 设置字体大小
|
.title_size, // 设置字体大小
|
||||||
@@ -209,7 +209,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
height: 6,
|
height: 6,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"包含设备报修、门店体验预约等。",
|
"包含设备报修、门店体验预约等。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: AppFontsize
|
fontSize: AppFontsize
|
||||||
.normal_text_size, // 设置字体大小
|
.normal_text_size, // 设置字体大小
|
||||||
@@ -278,7 +278,7 @@ class DeletedAccountPage extends GetView {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
text: '注销账号',
|
text: '注销账号'.tr,
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: 40,
|
height: 40,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Map device = {
|
Map device = {
|
||||||
"name": widget.bleDevice.name,
|
"name": widget.bleDevice.name,
|
||||||
"mac": widget.bleDevice.mac,
|
"mac".tr: widget.bleDevice.mac,
|
||||||
"rssi": widget.bleDevice.scanResult.rssi,
|
"rssi": widget.bleDevice.scanResult.rssi,
|
||||||
"bind": widget.bleDevice.bind,
|
"bind": widget.bleDevice.bind,
|
||||||
};
|
};
|
||||||
@@ -74,7 +74,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
if (blueteethBindController.currentDeviceMac.value ==
|
if (blueteethBindController.currentDeviceMac.value ==
|
||||||
device['mac']) {
|
device['mac'.tr]) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
@@ -185,7 +185,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
blueteethBindController
|
blueteethBindController
|
||||||
.currentDeviceMac!.value.isNotEmpty) {
|
.currentDeviceMac!.value.isNotEmpty) {
|
||||||
if (blueteethBindController.currentDeviceMac?.value !=
|
if (blueteethBindController.currentDeviceMac?.value !=
|
||||||
device['mac']) {
|
device['mac'.tr]) {
|
||||||
showConfirmDialog(
|
showConfirmDialog(
|
||||||
context, Container(), "其他设备正在绑定中,是否终止其他设备绑定?".tr,
|
context, Container(), "其他设备正在绑定中,是否终止其他设备绑定?".tr,
|
||||||
onConfirm: () {
|
onConfirm: () {
|
||||||
@@ -198,7 +198,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blueteethBindController.currentDeviceMac?.value =
|
blueteethBindController.currentDeviceMac?.value =
|
||||||
device['mac']!;
|
device['mac'.tr]!;
|
||||||
blueteethBindController.updateAll();
|
blueteethBindController.updateAll();
|
||||||
|
|
||||||
if (device['bind'] == true) {
|
if (device['bind'] == true) {
|
||||||
@@ -294,7 +294,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
blueteethBindController.resumeScanning();
|
blueteethBindController.resumeScanning();
|
||||||
},
|
},
|
||||||
onCancel: () {
|
onCancel: () {
|
||||||
print('用户点击了取消');
|
print('用户点击了取消'.tr);
|
||||||
blueteethBindController.currentDeviceMac.value = "";
|
blueteethBindController.currentDeviceMac.value = "";
|
||||||
blueteethBindController.resumeScanning();
|
blueteethBindController.resumeScanning();
|
||||||
blueteethBindController.updateAll();
|
blueteethBindController.updateAll();
|
||||||
@@ -347,14 +347,14 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": false,
|
"wifi": false,
|
||||||
"celibration": false,
|
"celibration": false,
|
||||||
"person_info": false,
|
"person_info": false,
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新用户绑定流程",
|
logTitle: "更新用户绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -505,14 +505,14 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
await bledevice.connect();
|
await bledevice.connect();
|
||||||
var res2 = bledevice.isConnected;
|
var res2 = bledevice.isConnected;
|
||||||
if (!res2) {
|
if (!res2) {
|
||||||
edm.EasyDartModule.logger.error("蓝牙连接失败");
|
edm.EasyDartModule.logger.error("蓝牙连接失败".tr);
|
||||||
DailyLogUtils.printLog("蓝牙连接失败");
|
DailyLogUtils.printLog("蓝牙连接失败".tr);
|
||||||
TopSlideNotification.show(
|
TopSlideNotification.show(
|
||||||
context,
|
context,
|
||||||
text: "蓝牙连接失败".tr,
|
text: "蓝牙连接失败".tr,
|
||||||
textColor: themeController.currentColor.sc9,
|
textColor: themeController.currentColor.sc9,
|
||||||
);
|
);
|
||||||
throw Exception("蓝牙连接失败");
|
throw Exception("蓝牙连接失败".tr);
|
||||||
}
|
}
|
||||||
blueteethBindController.blueConnectFlag.value = 2;
|
blueteethBindController.blueConnectFlag.value = 2;
|
||||||
blueteethBindController.currentDevice = bledevice;
|
blueteethBindController.currentDevice = bledevice;
|
||||||
@@ -525,11 +525,11 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
//智能床
|
//智能床
|
||||||
macAddress = await getMacFromType2(bledevice, timeout);
|
macAddress = await getMacFromType2(bledevice, timeout);
|
||||||
} else {
|
} else {
|
||||||
throw Exception("不支持的设备类型");
|
throw Exception("不支持的设备类型".tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (macAddress == null) {
|
if (macAddress == null) {
|
||||||
throw Exception("未能获取到MAC地址");
|
throw Exception("未能获取到MAC地址".tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// device.macA = macAddress;
|
// device.macA = macAddress;
|
||||||
@@ -565,7 +565,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "获取设备状态",
|
logTitle: "获取设备状态".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -578,11 +578,11 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
// 查找当前MAC对应的数据
|
// 查找当前MAC对应的数据
|
||||||
String macKey = mac.replaceAll(':', '').toUpperCase();
|
String macKey = mac.replaceAll(':', '').toUpperCase();
|
||||||
for (var item in responseList) {
|
for (var item in responseList) {
|
||||||
if (item['mac'].toString().toUpperCase() == macKey) {
|
if (item['mac'.tr].toString().toUpperCase() == macKey) {
|
||||||
// 更新 bleDevice 的状态
|
// 更新 bleDevice 的状态
|
||||||
//如果传感器已经绑定 暂时不处理
|
//如果传感器已经绑定 暂时不处理
|
||||||
// bleDevice.bind = item['bind'] ?? bleDevice.bind;
|
// bleDevice.bind = item['bind'] ?? bleDevice.bind;
|
||||||
bleDevice.macA = item['mac'];
|
bleDevice.macA = item['mac'.tr];
|
||||||
if (item['bindMac'] != null &&
|
if (item['bindMac'] != null &&
|
||||||
item['bindMac'].toString().isNotEmpty) {
|
item['bindMac'].toString().isNotEmpty) {
|
||||||
bleDevice.macB = item['bindMac'];
|
bleDevice.macB = item['bindMac'];
|
||||||
@@ -634,10 +634,10 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
try {
|
try {
|
||||||
final mac = await completer.future.timeout(timeout);
|
final mac = await completer.future.timeout(timeout);
|
||||||
if (mac == null || mac.isEmpty) {
|
if (mac == null || mac.isEmpty) {
|
||||||
throw Exception("获取MAC失败");
|
throw Exception("获取MAC失败".tr);
|
||||||
}
|
}
|
||||||
if (mac == "000000000000") {
|
if (mac == "000000000000") {
|
||||||
throw Exception("获取MAC失败");
|
throw Exception("获取MAC失败".tr);
|
||||||
}
|
}
|
||||||
await subscription.cancel();
|
await subscription.cancel();
|
||||||
return mac;
|
return mac;
|
||||||
@@ -646,7 +646,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
if (attempt == maxRetries - 1) rethrow;
|
if (attempt == maxRetries - 1) rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw Exception("获取MAC超时");
|
throw Exception("获取MAC超时".tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> getMacFromType2(THapp bledevice, Duration timeout) async {
|
Future<String> getMacFromType2(THapp bledevice, Duration timeout) async {
|
||||||
@@ -685,7 +685,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
ef.log("[获取设备 MAC]:失败:$e");
|
ef.log("[获取设备 MAC]:失败:$e");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw Exception("获取MAC超时");
|
throw Exception("获取MAC超时".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,18 +705,18 @@ String parseMacFromBleResponse(List<int> data) {
|
|||||||
.join('');
|
.join('');
|
||||||
return macAddress;
|
return macAddress;
|
||||||
} else {
|
} else {
|
||||||
throw Exception("BLE返回数据格式不正确");
|
throw Exception("BLE返回数据格式不正确".tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String parseMacFromTH2Response(List<int> data) {
|
String parseMacFromTH2Response(List<int> data) {
|
||||||
if (data.length < 17) {
|
if (data.length < 17) {
|
||||||
throw Exception("数据长度不足,无法解析MAC");
|
throw Exception("数据长度不足,无法解析MAC".tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int status = data[8];
|
int status = data[8];
|
||||||
if (status != 0x03 && status != 0x04) {
|
if (status != 0x03 && status != 0x04) {
|
||||||
throw Exception("未连接心率带");
|
throw Exception("未连接心率带".tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提取9~14字节的MAC地址
|
// 提取9~14字节的MAC地址
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
updateAll();
|
updateAll();
|
||||||
} else {
|
} else {
|
||||||
safeShowNotification(res.msg ?? "获取设备状态异常");
|
safeShowNotification(res.msg ?? "获取设备状态异常".tr);
|
||||||
EasyDartModule.logger.info("获取设备状态异常: $res");
|
EasyDartModule.logger.info("获取设备状态异常: $res");
|
||||||
DailyLogUtils.writeLog("获取设备状态异常: $res");
|
DailyLogUtils.writeLog("获取设备状态异常: $res");
|
||||||
}
|
}
|
||||||
@@ -89,13 +89,13 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
if (res.code == HttpStatusCodes.ok) {
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
updateAll();
|
updateAll();
|
||||||
} else {
|
} else {
|
||||||
safeShowNotification(res.msg ?? "获取设备状态异常");
|
safeShowNotification(res.msg ?? "获取设备状态异常".tr);
|
||||||
EasyDartModule.logger.info("获取设备状态异常: $res");
|
EasyDartModule.logger.info("获取设备状态异常: $res");
|
||||||
DailyLogUtils.writeLog("获取设备状态异常: $res");
|
DailyLogUtils.writeLog("获取设备状态异常: $res");
|
||||||
}
|
}
|
||||||
}).catchError((e, stack) {
|
}).catchError((e, stack) {
|
||||||
print("updateDeviceStatus 执行异常: $e\n$stack");
|
print("updateDeviceStatus 执行异常: $e\n$stack");
|
||||||
safeShowNotification("设备状态请求失败");
|
safeShowNotification("设备状态请求失败".tr);
|
||||||
EasyDartModule.logger.info("设备状态异常: $e");
|
EasyDartModule.logger.info("设备状态异常: $e");
|
||||||
DailyLogUtils.writeLog("设备状态异常: $e");
|
DailyLogUtils.writeLog("设备状态异常: $e");
|
||||||
});
|
});
|
||||||
@@ -165,7 +165,7 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
// 新建一个 Map,便于快速通过 mac 查找返回的设备状态
|
// 新建一个 Map,便于快速通过 mac 查找返回的设备状态
|
||||||
final Map<String, dynamic> responseMap = {
|
final Map<String, dynamic> responseMap = {
|
||||||
for (var item in responseList)
|
for (var item in responseList)
|
||||||
item['mac'].toString().toUpperCase(): item
|
item['mac'.tr].toString().toUpperCase(): item
|
||||||
};
|
};
|
||||||
|
|
||||||
// 遍历 blueRawData,更新 bind 状态
|
// 遍历 blueRawData,更新 bind 状态
|
||||||
@@ -214,7 +214,7 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
||||||
var data = {
|
var data = {
|
||||||
"deviceType": model.deviceType,
|
"deviceType": model.deviceType,
|
||||||
"mac": bleDevice.mac,
|
"mac".tr: bleDevice.mac,
|
||||||
"macA": bleDevice.macA,
|
"macA": bleDevice.macA,
|
||||||
if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
|
if (bleDevice.macB != null && bleDevice.macB!.isNotEmpty)
|
||||||
"macB": bleDevice.macB,
|
"macB": bleDevice.macB,
|
||||||
@@ -266,12 +266,12 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||||
var data = {
|
var data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": sleepData['mac'],
|
"mac".tr: sleepData['mac'.tr],
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
"data": sleepData,
|
"data": sleepData,
|
||||||
};
|
};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新睡眠习惯",
|
logTitle: "更新睡眠习惯".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -290,7 +290,7 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
|
|||||||
Map<String, dynamic> result = {};
|
Map<String, dynamic> result = {};
|
||||||
|
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新睡眠习惯",
|
logTitle: "更新睡眠习惯".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -319,7 +319,7 @@ void safeShowNotification(String msg) {
|
|||||||
textColor: themeController.currentColor.sc9,
|
textColor: themeController.currentColor.sc9,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
print("TopSlideNotification 未显示:context 不可用或未挂载");
|
print("TopSlideNotification 未显示:context 不可用或未挂载".tr);
|
||||||
}
|
}
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
// print("TopSlideNotification 显示异常: $e\n$stack");
|
// print("TopSlideNotification 显示异常: $e\n$stack");
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ class DeviceInfoWidget extends GetView {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
'设备ID',
|
'设备ID'.tr,
|
||||||
deviceListController
|
deviceListController
|
||||||
.model.deviceList[index]["mac"] ??
|
.model.deviceList[index]["mac".tr] ??
|
||||||
'',
|
'',
|
||||||
valueColor: (deviceListController
|
valueColor: (deviceListController
|
||||||
.model.deviceList[index]
|
.model.deviceList[index]
|
||||||
@@ -112,10 +112,10 @@ class DeviceInfoWidget extends GetView {
|
|||||||
? Color(0xFF929699)
|
? Color(0xFF929699)
|
||||||
: null),
|
: null),
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
'房间',
|
'房间'.tr,
|
||||||
deviceListController.model
|
deviceListController.model
|
||||||
.deviceList[index]["roomName"] ??
|
.deviceList[index]["roomName"] ??
|
||||||
'未分配房间',
|
'未分配房间'.tr,
|
||||||
valueColor: (deviceListController
|
valueColor: (deviceListController
|
||||||
.model.deviceList[index]
|
.model.deviceList[index]
|
||||||
["status"]?["status"]) ==
|
["status"]?["status"]) ==
|
||||||
@@ -123,13 +123,13 @@ class DeviceInfoWidget extends GetView {
|
|||||||
? Color(0xFF929699)
|
? Color(0xFF929699)
|
||||||
: null),
|
: null),
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
'设备状态',
|
'设备状态'.tr,
|
||||||
(deviceListController
|
(deviceListController
|
||||||
.model.deviceList[index]
|
.model.deviceList[index]
|
||||||
["status"]?["status"]) ==
|
["status"]?["status"]) ==
|
||||||
1
|
1
|
||||||
? '已绑定'
|
? '已绑定'.tr
|
||||||
: '已绑定',
|
: '已绑定'.tr,
|
||||||
valueColor: (deviceListController
|
valueColor: (deviceListController
|
||||||
.model.deviceList[index]
|
.model.deviceList[index]
|
||||||
["status"]?["status"]) ==
|
["status"]?["status"]) ==
|
||||||
@@ -165,7 +165,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
DailyLogUtils.writeError("发生异常: $e");
|
DailyLogUtils.writeError("发生异常: $e");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: '控制',
|
text: '控制'.tr,
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
color: Color(0XFF85F5FF),
|
color: Color(0XFF85F5FF),
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
@@ -245,7 +245,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
children: [
|
children: [
|
||||||
if (device['bind_type'] == 1)
|
if (device['bind_type'] == 1)
|
||||||
Text(
|
Text(
|
||||||
'已分享:',
|
'已分享:'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 21.rpx,
|
fontSize: 21.rpx,
|
||||||
@@ -274,7 +274,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
),
|
),
|
||||||
if (device['bind_type'] == 1)
|
if (device['bind_type'] == 1)
|
||||||
Text(
|
Text(
|
||||||
'人',
|
'人'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 21.rpx,
|
fontSize: 21.rpx,
|
||||||
@@ -284,7 +284,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
),
|
),
|
||||||
if (device['bind_type'] == 2)
|
if (device['bind_type'] == 2)
|
||||||
Text(
|
Text(
|
||||||
'来自',
|
'来自'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 21.rpx,
|
fontSize: 21.rpx,
|
||||||
@@ -309,7 +309,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
),
|
),
|
||||||
if (device['bind_type'] == 2)
|
if (device['bind_type'] == 2)
|
||||||
Text(
|
Text(
|
||||||
'的分享',
|
'的分享'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 21.rpx,
|
fontSize: 21.rpx,
|
||||||
@@ -359,7 +359,7 @@ class DeviceInfoWidget extends GetView {
|
|||||||
),
|
),
|
||||||
SizedBox(width: 5),
|
SizedBox(width: 5),
|
||||||
Text(
|
Text(
|
||||||
'睡眠报告',
|
'睡眠报告'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
children: [
|
children: [
|
||||||
/// 居中标题
|
/// 居中标题
|
||||||
Text(
|
Text(
|
||||||
'绑定成功.标题'.tr,
|
'标题'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
@@ -187,7 +187,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional(0, 0),
|
alignment: AlignmentDirectional(0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'绑定成功.绑定成功'.tr,
|
'绑定成功'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 48.rpx,
|
fontSize: 48.rpx,
|
||||||
@@ -206,7 +206,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional(0, 0),
|
alignment: AlignmentDirectional(0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'绑定成功.分享标题'.tr,
|
'分享标题'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -225,7 +225,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional(-1, 0),
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'绑定成功.分享内容'.tr,
|
'分享内容'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -245,40 +245,9 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
Map editeData;
|
Map editeData;
|
||||||
BlueToothDataModel data =
|
BlueToothDataModel data =
|
||||||
blueteethBindController.shareDevice;
|
blueteethBindController.shareDevice;
|
||||||
editeData = {"mac": data.mac};
|
editeData = {"mac".tr: data.mac};
|
||||||
Get.toNamed("/deviceSharePage", arguments: editeData);
|
Get.toNamed("/deviceSharePage", arguments: editeData);
|
||||||
// // TopSlideNotification.show(
|
|
||||||
// // context,
|
|
||||||
// // text: "功能开发中...",
|
|
||||||
// // );
|
|
||||||
// // return;
|
|
||||||
// PersonController personController = Get.find();
|
|
||||||
// String deviceID =
|
|
||||||
// personController.currentPersonId.value;
|
|
||||||
|
|
||||||
// BodyDeviceController bodyDeviceController =
|
|
||||||
// Get.find();
|
|
||||||
// await bodyDeviceController.getDeviceList();
|
|
||||||
// List deviceList =
|
|
||||||
// bodyDeviceController.deviceList.value;
|
|
||||||
|
|
||||||
// if (deviceList != null && deviceList.isNotEmpty) {
|
|
||||||
// // 查找第一个 _id 匹配的设备
|
|
||||||
// final matchedDevice = deviceList.firstWhere(
|
|
||||||
// (element) => element['_id'] == deviceID,
|
|
||||||
// orElse: () => null,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (matchedDevice != null) {
|
|
||||||
// // 跳转并传入设备
|
|
||||||
// Get.toNamed("/deviceSharePage",
|
|
||||||
// arguments: matchedDevice);
|
|
||||||
// } else {
|
|
||||||
// print("未找到匹配的设备");
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// print("设备列表为空");
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
colors: AppConstants().mhtButtongradientColors,
|
colors: AppConstants().mhtButtongradientColors,
|
||||||
gradientDirection: GradientDirection.vertical,
|
gradientDirection: GradientDirection.vertical,
|
||||||
@@ -300,7 +269,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
color: stringToColor("#003058"),
|
color: stringToColor("#003058"),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'绑定成功.立即分享'.tr,
|
'立即分享'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#003058"),
|
color: stringToColor("#003058"),
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -385,7 +354,7 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'绑定成功.返回'.tr,
|
'返回'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#003058"),
|
color: stringToColor("#003058"),
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class _MHTBindDeviceTypePageState extends State<MHTBindDeviceTypePage> {
|
|||||||
// 使用 Obx 来监听 deviceTypeList 的变化
|
// 使用 Obx 来监听 deviceTypeList 的变化
|
||||||
SizedBox(height: 26.rpx), // 开始的间隔
|
SizedBox(height: 26.rpx), // 开始的间隔
|
||||||
Text(
|
Text(
|
||||||
"选择类型",
|
"选择类型".tr,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 30.rpx),
|
style: TextStyle(color: Colors.white, fontSize: 30.rpx),
|
||||||
),
|
),
|
||||||
SizedBox(height: 32.rpx), // 开始的间隔
|
SizedBox(height: 32.rpx), // 开始的间隔
|
||||||
|
|||||||
@@ -626,7 +626,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
|||||||
padding: EdgeInsets.all(0),
|
padding: EdgeInsets.all(0),
|
||||||
keyword: mhtBlueToothController.search.value,
|
keyword: mhtBlueToothController.search.value,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
hint: "检索设备",
|
hint: "检索设备".tr,
|
||||||
onChange: (d) {
|
onChange: (d) {
|
||||||
mhtBlueToothController.search.value = d;
|
mhtBlueToothController.search.value = d;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -648,7 +648,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
|||||||
|
|
||||||
// 发起校准请求
|
// 发起校准请求
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准",
|
logTitle: "设备校准".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -711,7 +711,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
|||||||
|
|
||||||
// 发起校准请求
|
// 发起校准请求
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准",
|
logTitle: "设备校准".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -863,7 +863,7 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
|||||||
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
||||||
|
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准进度",
|
logTitle: "设备校准进度".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: progressUrl,
|
queryUrl: progressUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -1022,21 +1022,21 @@ class _MHTCalibrationPageCopyState extends State<MHTCalibrationPageCopy> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询绑定流程",
|
logTitle: "查询绑定流程".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
print(res);
|
print(res);
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": res.data['wifi'],
|
"wifi": res.data['wifi'],
|
||||||
"celibration": true,
|
"celibration": true,
|
||||||
"person_info": false,
|
"person_info": false,
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新绑定流程",
|
logTitle: "更新绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
@@ -746,7 +746,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
|||||||
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
||||||
|
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准进度",
|
logTitle: "设备校准进度".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: progressUrl,
|
queryUrl: progressUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -908,7 +908,7 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
|||||||
}
|
}
|
||||||
// data['cancel'] = true;
|
// data['cancel'] = true;
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准",
|
logTitle: "设备校准".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -982,20 +982,20 @@ class _MHTCalibrationPageState extends State<MHTCalibrationPage> {
|
|||||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||||
|
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询绑定流程",
|
logTitle: "查询绑定流程".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": res.data['wifi'],
|
"wifi": res.data['wifi'],
|
||||||
"celibration": true,
|
"celibration": true,
|
||||||
"person_info": false,
|
"person_info": false,
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新绑定流程",
|
logTitle: "更新绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
@@ -753,7 +753,7 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
|||||||
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
String progressUrl = "$serviceAddress$progressApi?id=$cid";
|
||||||
|
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准进度",
|
logTitle: "设备校准进度".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: progressUrl,
|
queryUrl: progressUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -915,7 +915,7 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
|||||||
}
|
}
|
||||||
// data['cancel'] = true;
|
// data['cancel'] = true;
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "设备校准",
|
logTitle: "设备校准".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -989,20 +989,20 @@ class _MHTCalibrationAfterPageState extends State<MHTCalibrationAfterPage> {
|
|||||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||||
|
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询绑定流程",
|
logTitle: "查询绑定流程".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": res.data['wifi'],
|
"wifi": res.data['wifi'],
|
||||||
"celibration": true,
|
"celibration": true,
|
||||||
"person_info": false,
|
"person_info": false,
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新绑定流程",
|
logTitle: "更新绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
//todo 初始化传感器id
|
//todo 初始化传感器id
|
||||||
// Initialize person A
|
// Initialize person A
|
||||||
peopleList.add({
|
peopleList.add({
|
||||||
'mac': device?.macA,
|
'mac'.tr: device?.macA,
|
||||||
'gender': 1,
|
'gender': 1,
|
||||||
'id': device!.macAID,
|
'id': device!.macAID,
|
||||||
});
|
});
|
||||||
@@ -46,7 +46,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
// Initialize person B if exists
|
// Initialize person B if exists
|
||||||
if (device?.macB != null && device!.macB!.isNotEmpty) {
|
if (device?.macB != null && device!.macB!.isNotEmpty) {
|
||||||
peopleList.add({
|
peopleList.add({
|
||||||
'mac': device.macB,
|
'mac'.tr: device.macB,
|
||||||
'gender': 1,
|
'gender': 1,
|
||||||
'id': device!.macBID,
|
'id': device!.macBID,
|
||||||
});
|
});
|
||||||
@@ -105,7 +105,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
var body = {
|
var body = {
|
||||||
'mac': personData['mac'],
|
'mac'.tr: personData['mac'.tr],
|
||||||
'name': personData['name'],
|
'name': personData['name'],
|
||||||
'gender': personData['gender'],
|
'gender': personData['gender'],
|
||||||
'height': personData['height'],
|
'height': personData['height'],
|
||||||
@@ -117,7 +117,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
'id': personData['id'],
|
'id': personData['id'],
|
||||||
};
|
};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "保存用户信息",
|
logTitle: "保存用户信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: body,
|
data: body,
|
||||||
@@ -171,7 +171,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'人员资料',
|
'人员资料'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -192,7 +192,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
for (var person in peopleList) {
|
for (var person in peopleList) {
|
||||||
await _savePersonData(person, context);
|
await _savePersonData(person, context);
|
||||||
}
|
}
|
||||||
TopSlideNotification.show(context, text: "保存成功");
|
TopSlideNotification.show(context, text: "保存成功".tr);
|
||||||
MHTHomeController mhtHomeController = Get.find();
|
MHTHomeController mhtHomeController = Get.find();
|
||||||
mhtHomeController.getPersonList();
|
mhtHomeController.getPersonList();
|
||||||
// Get.offNamed("/bindDeviceSuccess");
|
// Get.offNamed("/bindDeviceSuccess");
|
||||||
@@ -214,7 +214,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"下一步",
|
"下一步".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0XFF011D33),
|
color: Color(0XFF011D33),
|
||||||
@@ -251,7 +251,9 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
top: index == 0 ? 30.rpx : 90.rpx,
|
top: index == 0 ? 30.rpx : 90.rpx,
|
||||||
bottom: 20.rpx),
|
bottom: 20.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
"人员资料${index == 0 ? "A" : "B"}",
|
index == 0
|
||||||
|
? 'person_info_A'.tr
|
||||||
|
: 'person_info_B'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 30.rpx),
|
color: Colors.white, fontSize: 30.rpx),
|
||||||
),
|
),
|
||||||
@@ -272,7 +274,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'姓名',
|
'姓名'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -289,10 +291,10 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
decoration: const InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
filled: true,
|
filled: true,
|
||||||
hintText: "请输入姓名",
|
hintText: "请输入姓名".tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
@@ -323,12 +325,11 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
const Duration(milliseconds: 250),
|
const Duration(milliseconds: 250),
|
||||||
() {
|
() {
|
||||||
showOneSelectionDialog(context,
|
showOneSelectionDialog(context,
|
||||||
arr: ["女", "男"],
|
title: "选择性别".tr,
|
||||||
|
arr: ["女".tr, "男".tr],
|
||||||
checkIndex: peopleList[index]
|
checkIndex: peopleList[index]
|
||||||
['gender'] ==
|
['gender'],
|
||||||
"女"
|
checkChange: (sindex) {
|
||||||
? 0
|
|
||||||
: 1, checkChange: (sindex) {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
peopleList[index]['gender'] =
|
peopleList[index]['gender'] =
|
||||||
sindex;
|
sindex;
|
||||||
@@ -342,7 +343,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'性别',
|
'性别'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -356,7 +357,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
Container(
|
Container(
|
||||||
width: 200.rpx,
|
width: 200.rpx,
|
||||||
child: Text(
|
child: Text(
|
||||||
'${peopleList[index]['gender'] == 1 ? '男' : '女'}',
|
'${peopleList[index]['gender'] == 1 ? '男'.tr : '女'.tr}',
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
@@ -413,7 +414,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'身高(cm)',
|
'身高(cm)'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -476,7 +477,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'体重(kg)',
|
'体重(kg)'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -543,7 +544,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'生日',
|
'生日'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -563,7 +564,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
? time_08_Formatter_pattern(
|
? time_08_Formatter_pattern(
|
||||||
peopleList[index]
|
peopleList[index]
|
||||||
['birthday'],
|
['birthday'],
|
||||||
"yyyy年MM月dd日")
|
"yyyy年MM月dd日".tr)
|
||||||
: '',
|
: '',
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -622,7 +623,7 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
filled: true,
|
filled: true,
|
||||||
hintText: "请输入联系方式",
|
hintText: "请输入联系方式".tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
|
|||||||
@@ -587,7 +587,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
TopSlideNotification
|
TopSlideNotification
|
||||||
.show(
|
.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网成功".tr,
|
text: "配网成功".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -597,7 +597,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
TopSlideNotification
|
TopSlideNotification
|
||||||
.show(
|
.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网失败".tr,
|
text: "配网失败".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -607,7 +607,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
} else {
|
} else {
|
||||||
TopSlideNotification.show(
|
TopSlideNotification.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网失败".tr,
|
text: "配网失败".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -1078,21 +1078,21 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询绑定流程",
|
logTitle: "查询绑定流程".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
print(res);
|
print(res);
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": true,
|
"wifi": true,
|
||||||
"celibration": res.data['celibration'],
|
"celibration": res.data['celibration'],
|
||||||
"person_info": res.data['person_info'],
|
"person_info": res.data['person_info'],
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新绑定流程",
|
logTitle: "更新绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -1108,7 +1108,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
try {
|
try {
|
||||||
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
||||||
await bledevice.disconnect();
|
await bledevice.disconnect();
|
||||||
DailyLogUtils.writeLog("关闭蓝牙连接成功");
|
DailyLogUtils.writeLog("关闭蓝牙连接成功".tr);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
TopSlideNotification
|
TopSlideNotification
|
||||||
.show(
|
.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网成功".tr,
|
text: "配网成功".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -570,7 +570,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
TopSlideNotification
|
TopSlideNotification
|
||||||
.show(
|
.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网失败".tr,
|
text: "配网失败".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -580,7 +580,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
} else {
|
} else {
|
||||||
TopSlideNotification.show(
|
TopSlideNotification.show(
|
||||||
context,
|
context,
|
||||||
text: "wifi页.配网失败".tr,
|
text: "配网失败".tr,
|
||||||
textColor:
|
textColor:
|
||||||
themeController
|
themeController
|
||||||
.currentColor
|
.currentColor
|
||||||
@@ -1051,21 +1051,21 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询绑定流程",
|
logTitle: "查询绑定流程".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
print(res);
|
print(res);
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"mac": mac,
|
"mac".tr: mac,
|
||||||
"wifi": true,
|
"wifi": true,
|
||||||
"celibration": res.data['celibration'],
|
"celibration": res.data['celibration'],
|
||||||
"person_info": res.data['person_info'],
|
"person_info": res.data['person_info'],
|
||||||
"time": DateTime.now().millisecondsSinceEpoch,
|
"time": DateTime.now().millisecondsSinceEpoch,
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新绑定流程",
|
logTitle: "更新绑定流程".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -1081,7 +1081,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
try {
|
try {
|
||||||
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
||||||
await bledevice.disconnect();
|
await bledevice.disconnect();
|
||||||
DailyLogUtils.writeLog("关闭蓝牙连接成功");
|
DailyLogUtils.writeLog("关闭蓝牙连接成功".tr);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class _DeviceListPageState extends State<DeviceListPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'设备列表',
|
'设备列表'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -90,7 +90,7 @@ class _DeviceListPageState extends State<DeviceListPage> {
|
|||||||
child: SearchWidget(
|
child: SearchWidget(
|
||||||
keyword: controller.model.keyword,
|
keyword: controller.model.keyword,
|
||||||
color: controller.model.color,
|
color: controller.model.color,
|
||||||
hint: "检索设备",
|
hint: "检索设备".tr,
|
||||||
onChange: (d) {
|
onChange: (d) {
|
||||||
controller.model.keyword = d;
|
controller.model.keyword = d;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
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:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/ServiceConstant.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/component/tool/ClickableContainer.dart';
|
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
|
||||||
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
||||||
|
|
||||||
class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
||||||
@@ -15,28 +11,59 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
DevicePeopleInfo({required this.data});
|
DevicePeopleInfo({required this.data});
|
||||||
|
|
||||||
PeopleInfoController controller = Get.put(PeopleInfoController());
|
PeopleInfoController controller = Get.put(PeopleInfoController());
|
||||||
getInfoRow(context, String str) {
|
getInfoRow(context, String k, String str) {
|
||||||
return Container(
|
return Row(
|
||||||
width: double.infinity,
|
mainAxisSize: MainAxisSize.max,
|
||||||
height: 60.rpx,
|
children: [
|
||||||
decoration: BoxDecoration(),
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 30.rpx,
|
||||||
|
maxWidth: 140.rpx,
|
||||||
|
minHeight: 62.rpx,
|
||||||
|
),
|
||||||
|
child: Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'$str',
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 2,
|
||||||
|
k,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0.0,
|
||||||
|
color: Color(0xFF929699),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 30.rpx,
|
||||||
|
minHeight: 62.rpx,
|
||||||
|
),
|
||||||
|
child: Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Text(
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
str,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
].divide(SizedBox(width: 0.rpx)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
controller.getPeoples(data['mac']);
|
controller.getPeoples(data['mac'.tr]);
|
||||||
});
|
});
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, boxConstraints) => GestureDetector(
|
builder: (context, boxConstraints) => GestureDetector(
|
||||||
@@ -68,7 +95,7 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'详情',
|
'详情'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -123,7 +150,7 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'设备信息',
|
'设备信息'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -131,16 +158,17 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
getInfoRow(
|
getInfoRow(context, "设备名称".tr,
|
||||||
context, "名称:${data["name"] ?? "-"}"),
|
"${data["name"] ?? "-"}"),
|
||||||
getInfoRow(
|
getInfoRow(context, "房间".tr,
|
||||||
context, "房间:${data["roomName"] ?? "-"}"),
|
"${data["roomName"] ?? "-"}"),
|
||||||
getInfoRow(
|
getInfoRow(
|
||||||
context,
|
context,
|
||||||
"设备状态:${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
|
"设备状态".tr,
|
||||||
|
"${data["status"]?["status"] == 1 ? "已绑定" : data["status"]?["status"] == 0 ? "已绑定" : "-"}",
|
||||||
),
|
),
|
||||||
getInfoRow(
|
getInfoRow(
|
||||||
context, "MAC:${data["mac"] ?? "-"}"),
|
context, "MAC", "${data["mac"] ?? "-"}"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
@@ -169,7 +197,9 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
'人员资料${index == 0 ? "A" : "B"}',
|
index == 0
|
||||||
|
? 'person_info_A'.tr
|
||||||
|
: 'person_info_B'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -178,18 +208,18 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
getInfoRow(
|
getInfoRow(context, "姓名".tr,
|
||||||
context, "姓名:${person["name"] ?? "-"}"),
|
"${person["name"] ?? "-"}"),
|
||||||
getInfoRow(context,
|
getInfoRow(context, "性别".tr,
|
||||||
"性别:${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"),
|
"${person["gender"] == null ? "-" : (person["gender"] == 1 ? "男" : "女")}"),
|
||||||
getInfoRow(context,
|
getInfoRow(context, "身高".tr,
|
||||||
"身高:${person["height"] == null ? "-" : "${person["height"]}cm"}"),
|
"${person["height"] == null ? "-" : "${person["height"]}cm"}"),
|
||||||
getInfoRow(context,
|
getInfoRow(context, "体重".tr,
|
||||||
"体重:${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
|
"${person["weight"] == null ? "-" : "${person["weight"]}kg"}"),
|
||||||
getInfoRow(context,
|
getInfoRow(context, "生日".tr,
|
||||||
"生日:${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
|
"${person["birthday"] == null ? "-" : time_08_Formatter_pattern(person["birthday"], "yyyy年MM月dd日")}"),
|
||||||
getInfoRow(context,
|
getInfoRow(context, "联系方式".tr,
|
||||||
"联系方式:${person["contact"] ?? "-"}"),
|
"${person["contact"] ?? "-"}"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
final _phoneController = TextEditingController();
|
final _phoneController = TextEditingController();
|
||||||
|
|
||||||
fetchData() async {
|
fetchData() async {
|
||||||
await controller.shareDeviceList(data["mac"]);
|
await controller.shareDeviceList(data["mac".tr]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -56,7 +56,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'分享设备',
|
'分享设备'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -105,7 +105,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'将以下设备分享给您的家人或朋友 ',
|
'将以下设备分享给您的家人或朋友'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -114,8 +114,11 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
height: 1,
|
height: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设备ID:${data['mac']}',
|
"设备ID:".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: const Color(0xFF6BFDAC),
|
color: const Color(0xFF6BFDAC),
|
||||||
@@ -123,6 +126,17 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
height: 1),
|
height: 1),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
data['mac'],
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: const Color(0xFF6BFDAC),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
height: 1),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
].divide(SizedBox(height: 65.rpx)),
|
].divide(SizedBox(height: 65.rpx)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -145,7 +159,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
controller: _phoneController,
|
controller: _phoneController,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '请输入对方手机号/邮箱号',
|
hintText: '请输入对方手机号/邮箱号'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: const Color(0xFF929699),
|
color: const Color(0xFF929699),
|
||||||
@@ -204,7 +218,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'点击复制APP下载链接',
|
'点击复制APP下载链接'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFF85F5FF), // 蓝色文字
|
color: Color(0xFF85F5FF), // 蓝色文字
|
||||||
|
|
||||||
@@ -366,7 +380,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
//todo 1:验证用户是否存在 2:发送邀请
|
//todo 1:验证用户是否存在 2:发送邀请
|
||||||
ApiResponse apiResponse =
|
ApiResponse apiResponse =
|
||||||
await controller
|
await controller
|
||||||
.shareDevice(data['mac']);
|
.shareDevice(data['mac'.tr]);
|
||||||
if (apiResponse.code ==
|
if (apiResponse.code ==
|
||||||
HttpStatusCodes.ok) {
|
HttpStatusCodes.ok) {
|
||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
@@ -464,7 +478,7 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
|||||||
.entries
|
.entries
|
||||||
.map((e) => ShareUserWidget(
|
.map((e) => ShareUserWidget(
|
||||||
index: e.key,
|
index: e.key,
|
||||||
mac: data['mac'],
|
mac: data['mac'.tr],
|
||||||
repairListController:
|
repairListController:
|
||||||
controller))
|
controller))
|
||||||
.toList() as List<Widget>)
|
.toList() as List<Widget>)
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
/// 2: 地区
|
/// 2: 地区
|
||||||
/// 3: 街道
|
/// 3: 街道
|
||||||
|
|
||||||
String _addressProvince = "请选择省";
|
String _addressProvince = "请选择省".tr;
|
||||||
String _addressCity = "请选择市";
|
String _addressCity = "请选择市".tr;
|
||||||
String _addressArea = "请选择地区";
|
String _addressArea = "请选择地区".tr;
|
||||||
String _addressStreet = "请选择街道";
|
String _addressStreet = "请选择街道".tr;
|
||||||
List<AddressNode> _selectProvince = [];
|
List<AddressNode> _selectProvince = [];
|
||||||
List<AddressNode> _selectCity = [];
|
List<AddressNode> _selectCity = [];
|
||||||
List<AddressNode> _selectArea = [];
|
List<AddressNode> _selectArea = [];
|
||||||
@@ -71,7 +71,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'编辑地址',
|
'编辑地址'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -133,16 +133,15 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// color: Color(0XFF003058),
|
// color: Color(0XFF003058),
|
||||||
// ),
|
// ),
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: MediaQuery.sizeOf(
|
width:
|
||||||
context)
|
MediaQuery.sizeOf(context)
|
||||||
.width,
|
.width,
|
||||||
height: MediaQuery.sizeOf(
|
height:
|
||||||
context)
|
MediaQuery.sizeOf(context)
|
||||||
.height *
|
.height *
|
||||||
0.038,
|
0.038,
|
||||||
constraints:
|
constraints:
|
||||||
@@ -163,8 +162,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery
|
width:
|
||||||
.sizeOf(
|
MediaQuery.sizeOf(
|
||||||
context)
|
context)
|
||||||
.width *
|
.width *
|
||||||
0.1,
|
0.1,
|
||||||
@@ -176,9 +175,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'地址信息',
|
'地址信息'.tr,
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(
|
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
color: Colors
|
color: Colors
|
||||||
@@ -210,8 +208,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
BoxDecoration(),
|
BoxDecoration(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize:
|
mainAxisSize:
|
||||||
MainAxisSize
|
MainAxisSize.max,
|
||||||
.max,
|
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment
|
MainAxisAlignment
|
||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
@@ -230,14 +227,12 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
0),
|
0),
|
||||||
child:
|
child:
|
||||||
Container(
|
Container(
|
||||||
width:
|
width: 60.rpx,
|
||||||
60.rpx,
|
|
||||||
height:
|
height:
|
||||||
60.rpx,
|
60.rpx,
|
||||||
decoration:
|
decoration:
|
||||||
const BoxDecoration(),
|
const BoxDecoration(),
|
||||||
child:
|
child: Align(
|
||||||
Align(
|
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
0,
|
0,
|
||||||
@@ -254,7 +249,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
MaterialTapTargetSize.shrinkWrap,
|
MaterialTapTargetSize.shrinkWrap,
|
||||||
shape:
|
shape:
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(64),
|
borderRadius:
|
||||||
|
BorderRadius.circular(64),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
unselectedWidgetColor:
|
unselectedWidgetColor:
|
||||||
@@ -267,13 +263,17 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
controller.model.default_ == 1,
|
controller.model.default_ == 1,
|
||||||
onChanged:
|
onChanged:
|
||||||
(newValue) {
|
(newValue) {
|
||||||
controller.model.default_ = (newValue ?? false) ? 1 : 0;
|
controller.model.default_ = (newValue ?? false)
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
controller.updateAll();
|
controller.updateAll();
|
||||||
},
|
},
|
||||||
side:
|
side:
|
||||||
const BorderSide(
|
const BorderSide(
|
||||||
width: 1.5,
|
width:
|
||||||
color: Colors.white,
|
1.5,
|
||||||
|
color:
|
||||||
|
Colors.white,
|
||||||
),
|
),
|
||||||
activeColor:
|
activeColor:
|
||||||
const Color(0xFF84F5FF),
|
const Color(0xFF84F5FF),
|
||||||
@@ -291,7 +291,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
),
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
'默认',
|
'默认'.tr,
|
||||||
style:
|
style:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
@@ -300,7 +300,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
26.rpx,
|
26.rpx,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
color: controller.model.default_ ==
|
color: controller
|
||||||
|
.model.default_ ==
|
||||||
1
|
1
|
||||||
? const Color(
|
? const Color(
|
||||||
0XFF84F5FF)
|
0XFF84F5FF)
|
||||||
@@ -312,16 +313,16 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(
|
],
|
||||||
width: 12)),
|
// .divide(const SizedBox(
|
||||||
|
// width: 12)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
// width: MediaQuery.sizeOf(
|
// width: MediaQuery.sizeOf(
|
||||||
// context)
|
// context)
|
||||||
// .width,
|
// .width,
|
||||||
height:
|
height: bodysize!.maxHeight *
|
||||||
bodysize!.maxHeight *
|
|
||||||
0.038,
|
0.038,
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: 61.rpx,
|
minHeight: 61.rpx,
|
||||||
@@ -332,46 +333,37 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width:
|
// width:
|
||||||
MediaQuery.sizeOf(
|
// MediaQuery.sizeOf(
|
||||||
context)
|
// context)
|
||||||
.width *
|
// .width *
|
||||||
0.17,
|
// 0.17,
|
||||||
decoration:
|
decoration:
|
||||||
BoxDecoration(),
|
BoxDecoration(),
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth:
|
minWidth:
|
||||||
105.rpx,
|
145.rpx,
|
||||||
maxWidth:
|
maxWidth:
|
||||||
105.rpx),
|
145.rpx),
|
||||||
child: Row(
|
child: Text(
|
||||||
mainAxisSize:
|
'收件人'.tr,
|
||||||
MainAxisSize
|
maxLines: 2,
|
||||||
.max,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'收件人',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
fontSize:
|
fontSize: AppFontsize
|
||||||
AppFontsize
|
|
||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing:
|
letterSpacing: 0,
|
||||||
0,
|
color:
|
||||||
color: Colors
|
Colors.white),
|
||||||
.white),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration:
|
decoration:
|
||||||
BoxDecoration(
|
BoxDecoration(
|
||||||
color:
|
color: Colors.white,
|
||||||
Colors.white,
|
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius
|
BorderRadius
|
||||||
.circular(
|
.circular(
|
||||||
@@ -400,7 +392,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
Container(
|
Container(
|
||||||
child:
|
child:
|
||||||
Align(
|
Align(
|
||||||
alignment: AlignmentDirectional(
|
alignment:
|
||||||
|
AlignmentDirectional(
|
||||||
-1,
|
-1,
|
||||||
0),
|
0),
|
||||||
child:
|
child:
|
||||||
@@ -409,8 +402,9 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
address['name'],
|
address['name'],
|
||||||
onChanged:
|
onChanged:
|
||||||
(value) {
|
(value) {
|
||||||
controller.model.name =
|
controller
|
||||||
value;
|
.model
|
||||||
|
.name = value;
|
||||||
},
|
},
|
||||||
autofocus:
|
autofocus:
|
||||||
false,
|
false,
|
||||||
@@ -424,48 +418,63 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
true,
|
true,
|
||||||
labelStyle:
|
labelStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily:
|
||||||
fontSize: 26.rpx,
|
'Inter',
|
||||||
letterSpacing: 0.0,
|
fontSize:
|
||||||
|
26.rpx,
|
||||||
|
letterSpacing:
|
||||||
|
0.0,
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily:
|
||||||
fontSize: 26.rpx,
|
'Inter',
|
||||||
letterSpacing: 0.0,
|
fontSize:
|
||||||
color: themeController.currentColor.sc4,
|
26.rpx,
|
||||||
|
letterSpacing:
|
||||||
|
0.0,
|
||||||
|
color:
|
||||||
|
themeController.currentColor.sc4,
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Color(0x00000000),
|
color: Color(0x00000000),
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Color(0x00000000),
|
color: Color(0x00000000),
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
filled:
|
filled:
|
||||||
false,
|
false,
|
||||||
@@ -497,16 +506,16 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(
|
],
|
||||||
width: 15)),
|
// .divide(const SizedBox(
|
||||||
|
// width: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
// width: MediaQuery.sizeOf(
|
// width: MediaQuery.sizeOf(
|
||||||
// context)
|
// context)
|
||||||
// .width,
|
// .width,
|
||||||
height:
|
height: bodysize!.maxHeight *
|
||||||
bodysize!.maxHeight *
|
|
||||||
0.038,
|
0.038,
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: 61.rpx,
|
minHeight: 61.rpx,
|
||||||
@@ -517,46 +526,36 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width:
|
// width:
|
||||||
MediaQuery.sizeOf(
|
// MediaQuery.sizeOf(
|
||||||
context)
|
// context)
|
||||||
.width *
|
// .width *
|
||||||
0.17,
|
// 0.17,
|
||||||
decoration:
|
decoration:
|
||||||
BoxDecoration(),
|
BoxDecoration(),
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth:
|
minWidth:
|
||||||
105.rpx,
|
145.rpx,
|
||||||
maxWidth:
|
maxWidth:
|
||||||
105.rpx),
|
145.rpx),
|
||||||
child: Row(
|
child: Text(
|
||||||
mainAxisSize:
|
'手机号'.tr,
|
||||||
MainAxisSize
|
|
||||||
.max,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'手机号',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
fontSize:
|
fontSize: AppFontsize
|
||||||
AppFontsize
|
|
||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing:
|
letterSpacing: 0,
|
||||||
0,
|
color:
|
||||||
color: Colors
|
Colors.white),
|
||||||
.white),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration:
|
decoration:
|
||||||
BoxDecoration(
|
BoxDecoration(
|
||||||
color:
|
color: Colors.white,
|
||||||
Colors.white,
|
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius
|
BorderRadius
|
||||||
.circular(
|
.circular(
|
||||||
@@ -585,7 +584,8 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
Container(
|
Container(
|
||||||
child:
|
child:
|
||||||
Align(
|
Align(
|
||||||
alignment: AlignmentDirectional(
|
alignment:
|
||||||
|
AlignmentDirectional(
|
||||||
-1,
|
-1,
|
||||||
0),
|
0),
|
||||||
child:
|
child:
|
||||||
@@ -594,8 +594,9 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
address['tel'],
|
address['tel'],
|
||||||
onChanged:
|
onChanged:
|
||||||
(value) {
|
(value) {
|
||||||
controller.model.tel =
|
controller
|
||||||
value;
|
.model
|
||||||
|
.tel = value;
|
||||||
},
|
},
|
||||||
autofocus:
|
autofocus:
|
||||||
false,
|
false,
|
||||||
@@ -609,48 +610,63 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
true,
|
true,
|
||||||
labelStyle:
|
labelStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily:
|
||||||
fontSize: 26.rpx,
|
'Inter',
|
||||||
letterSpacing: 0.0,
|
fontSize:
|
||||||
|
26.rpx,
|
||||||
|
letterSpacing:
|
||||||
|
0.0,
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily:
|
||||||
fontSize: 26.rpx,
|
'Inter',
|
||||||
letterSpacing: 0.0,
|
fontSize:
|
||||||
color: themeController.currentColor.sc4,
|
26.rpx,
|
||||||
|
letterSpacing:
|
||||||
|
0.0,
|
||||||
|
color:
|
||||||
|
themeController.currentColor.sc4,
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Color(0x00000000),
|
color: Color(0x00000000),
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Color(0x00000000),
|
color: Color(0x00000000),
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide:
|
||||||
|
BorderSide(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
width: 1.rpx,
|
width: 1.rpx,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.rpx),
|
borderRadius:
|
||||||
|
BorderRadius.circular(8.rpx),
|
||||||
),
|
),
|
||||||
filled:
|
filled:
|
||||||
false,
|
false,
|
||||||
@@ -682,16 +698,17 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(
|
],
|
||||||
width: 15)),
|
// .divide(const SizedBox(
|
||||||
|
// width: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: MediaQuery.sizeOf(
|
width:
|
||||||
context)
|
MediaQuery.sizeOf(context)
|
||||||
.width,
|
.width,
|
||||||
height: MediaQuery.sizeOf(
|
height:
|
||||||
context)
|
MediaQuery.sizeOf(context)
|
||||||
.height *
|
.height *
|
||||||
0.038,
|
0.038,
|
||||||
constraints:
|
constraints:
|
||||||
@@ -703,11 +720,11 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width:
|
// width:
|
||||||
MediaQuery.sizeOf(
|
// MediaQuery.sizeOf(
|
||||||
context)
|
// context)
|
||||||
.width *
|
// .width *
|
||||||
0.17,
|
// 0.17,
|
||||||
height:
|
height:
|
||||||
MediaQuery.sizeOf(
|
MediaQuery.sizeOf(
|
||||||
context)
|
context)
|
||||||
@@ -716,49 +733,27 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth:
|
minWidth:
|
||||||
105.rpx,
|
145.rpx,
|
||||||
maxWidth:
|
maxWidth:
|
||||||
105.rpx),
|
145.rpx),
|
||||||
child: Row(
|
|
||||||
mainAxisSize:
|
|
||||||
MainAxisSize
|
|
||||||
.max,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
// CityPicker
|
|
||||||
// .show(
|
|
||||||
// context:
|
|
||||||
// context,
|
|
||||||
// cityPickerListener:
|
|
||||||
// this,
|
|
||||||
// );
|
|
||||||
},
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'所在地区',
|
'所在地区'.tr,
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(
|
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
fontSize:
|
fontSize: AppFontsize
|
||||||
AppFontsize
|
|
||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing:
|
letterSpacing: 0,
|
||||||
0,
|
color: Colors.white,
|
||||||
color: Colors
|
|
||||||
.white,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
CityPicker.show(
|
CityPicker.show(
|
||||||
context:
|
context: context,
|
||||||
context,
|
|
||||||
cityPickerListener:
|
cityPickerListener:
|
||||||
this,
|
this,
|
||||||
);
|
);
|
||||||
@@ -775,8 +770,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
.circular(
|
.circular(
|
||||||
8),
|
8),
|
||||||
),
|
),
|
||||||
alignment:
|
alignment: Alignment
|
||||||
Alignment
|
|
||||||
.center,
|
.center,
|
||||||
child: Obx(() {
|
child: Obx(() {
|
||||||
return Row(
|
return Row(
|
||||||
@@ -787,38 +781,42 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 27
|
left: 27
|
||||||
.rpx,
|
.rpx,
|
||||||
right:
|
right: 10
|
||||||
10.rpx),
|
.rpx),
|
||||||
child:
|
child: Text(
|
||||||
Text(
|
controller
|
||||||
controller.model.all_address ??
|
.model
|
||||||
|
.all_address ??
|
||||||
'',
|
'',
|
||||||
maxLines:
|
maxLines:
|
||||||
1,
|
1,
|
||||||
overflow:
|
overflow:
|
||||||
TextOverflow.ellipsis,
|
TextOverflow
|
||||||
|
.ellipsis,
|
||||||
style:
|
style:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
color:
|
color: Color(
|
||||||
Color(0xFF333333),
|
0xFF333333),
|
||||||
fontSize:
|
fontSize:
|
||||||
26.rpx,
|
26.rpx,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: EdgeInsets.only(
|
||||||
EdgeInsets.only(right: 27.rpx),
|
right:
|
||||||
|
27.rpx),
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 30.rpx,
|
height: 30.rpx,
|
||||||
width: 30.rpx,
|
width: 30.rpx,
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
'assets/img/icon/expand_more.svg',
|
'assets/img/icon/expand_more.svg',
|
||||||
color: Colors.black,
|
color:
|
||||||
|
Colors.black,
|
||||||
)))
|
)))
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -826,8 +824,9 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
].divide(const SizedBox(
|
],
|
||||||
width: 15)),
|
// .divide(const SizedBox(
|
||||||
|
// width: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -852,15 +851,13 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
MainAxisSize.max,
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: Alignment
|
||||||
const AlignmentDirectional(
|
.topLeft,
|
||||||
-1, -1),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery
|
// width: MediaQuery.sizeOf(
|
||||||
.sizeOf(
|
// context)
|
||||||
context)
|
// .width *
|
||||||
.width *
|
// 0.17,
|
||||||
0.17,
|
|
||||||
height: MediaQuery
|
height: MediaQuery
|
||||||
.sizeOf(
|
.sizeOf(
|
||||||
context)
|
context)
|
||||||
@@ -868,17 +865,13 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
0.038,
|
0.038,
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(
|
BoxConstraints(
|
||||||
minWidth: 105
|
minWidth: 145
|
||||||
.rpx,
|
.rpx,
|
||||||
maxWidth:
|
maxWidth:
|
||||||
105.rpx),
|
145.rpx),
|
||||||
child: Row(
|
child: Text(
|
||||||
mainAxisSize:
|
'详细地址'.tr,
|
||||||
MainAxisSize
|
maxLines: 2,
|
||||||
.max,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'详细地址',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -887,24 +880,10 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0,
|
0,
|
||||||
|
height: 1,
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
),
|
),
|
||||||
// Align(
|
|
||||||
// alignment:
|
|
||||||
// AlignmentDirectional(
|
|
||||||
// 0,
|
|
||||||
// -0.1),
|
|
||||||
// child: Icon(
|
|
||||||
// Icons
|
|
||||||
// .star_rate_sharp,
|
|
||||||
// color: Color(
|
|
||||||
// 0xFFE50012),
|
|
||||||
// size: 8,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -1030,14 +1009,11 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(
|
]),
|
||||||
width: 15)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(
|
].divide(
|
||||||
const SizedBox(height: 15)),
|
SizedBox(height: 30.rpx)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1060,27 +1036,27 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (controller.model.all_address == null ||
|
if (controller.model.all_address == null ||
|
||||||
controller.model.all_address!.isEmpty) {
|
controller.model.all_address!.isEmpty) {
|
||||||
showToast("地址不能为空");
|
showToast("地址不能为空".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (controller.model.name == null ||
|
if (controller.model.name == null ||
|
||||||
controller.model.name!.isEmpty) {
|
controller.model.name!.isEmpty) {
|
||||||
showToast("名字不能为空");
|
showToast("名字不能为空".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (controller.model.address == null ||
|
if (controller.model.address == null ||
|
||||||
controller.model.address!.isEmpty) {
|
controller.model.address!.isEmpty) {
|
||||||
showToast("详细地址不能为空");
|
showToast("详细地址不能为空".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (controller.model.tel == null ||
|
if (controller.model.tel == null ||
|
||||||
controller.model.tel!.isEmpty) {
|
controller.model.tel!.isEmpty) {
|
||||||
showToast("手机号不能为空");
|
showToast("手机号不能为空".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!MyUtils.isValidPhoneNumber(
|
if (!MyUtils.isValidPhoneNumber(
|
||||||
controller.model.tel!)) {
|
controller.model.tel!)) {
|
||||||
showToast("无效的手机号码");
|
showToast("无效的手机号码".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (addressListController.model.type == 1) {
|
if (addressListController.model.type == 1) {
|
||||||
@@ -1110,7 +1086,7 @@ class EditAddressPage extends GetView<AddressController>
|
|||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"保存",
|
"保存".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#011D33"),
|
color: stringToColor("#011D33"),
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'智能设备名称',
|
'智能设备名称'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -103,9 +103,9 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
if (editedData['name'] == null ||
|
if (editedData['name'] == null ||
|
||||||
editedData['name'] == '') {
|
editedData['name'] == '') {
|
||||||
if (device!.type == 2) {
|
if (device!.type == 2) {
|
||||||
editedData['name'] = '智能电动床';
|
editedData['name'] = '智能电动床'.tr;
|
||||||
} else {
|
} else {
|
||||||
editedData['name'] = '律动智能床垫';
|
editedData['name'] = '律动智能床垫'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String serviceAddress =
|
String serviceAddress =
|
||||||
@@ -115,7 +115,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"$serviceAddress$serviceName$serviceApi";
|
"$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {
|
data: {
|
||||||
@@ -145,7 +145,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"下一步",
|
"下一步".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0XFF011D33),
|
color: Color(0XFF011D33),
|
||||||
@@ -201,7 +201,7 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLength: AppConstants().text_length,
|
maxLength: AppConstants().text_length,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "请输入设备的名称",
|
hintText: "请输入设备的名称".tr,
|
||||||
contentPadding:
|
contentPadding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(10, 0, 10, 0),
|
.fromSTEB(10, 0, 10, 0),
|
||||||
@@ -282,13 +282,13 @@ class _EditBedPageState extends State<EditBedPage> {
|
|||||||
if (editedData['name'] == null ||
|
if (editedData['name'] == null ||
|
||||||
editedData['name'] == '') {
|
editedData['name'] == '') {
|
||||||
if (editedData['device_type'] == 2) {
|
if (editedData['device_type'] == 2) {
|
||||||
editedData['name'] = '智能电动床';
|
editedData['name'] = '智能电动床'.tr;
|
||||||
} else {
|
} else {
|
||||||
editedData['name'] = '律动智能床垫';
|
editedData['name'] = '律动智能床垫'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'预约体验',
|
'预约体验'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -135,7 +135,7 @@ class _ExperienceStorePageState extends State<ExperienceStorePage> {
|
|||||||
child: SearchWidget(
|
child: SearchWidget(
|
||||||
keyword: controller.model.keyword,
|
keyword: controller.model.keyword,
|
||||||
color: controller.model.color,
|
color: controller.model.color,
|
||||||
hint: "请输入门店名称",
|
hint: "请输入门店名称".tr,
|
||||||
onChange: (d) {
|
onChange: (d) {
|
||||||
controller.model.keyword = d;
|
controller.model.keyword = d;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width * 0.105,
|
width: MediaQuery.sizeOf(context).width * 0.105,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.038,
|
height: MediaQuery.sizeOf(context).height * 0.038,
|
||||||
constraints: const BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minWidth: 50,
|
minWidth: 150.rpx,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
@@ -166,7 +166,7 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'咨询',
|
'咨询'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -185,10 +185,10 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
AppMapLocation.checkInstalledApps().then((d) {
|
AppMapLocation.checkInstalledApps().then((d) {
|
||||||
if (AppMapLocation
|
if (AppMapLocation
|
||||||
.availableMapsToNames.isEmpty) {
|
.availableMapsToNames.isEmpty) {
|
||||||
showToast("未检测到导航软件");
|
showToast("未检测到导航软件".tr);
|
||||||
} else {
|
} else {
|
||||||
showOneSelectionDialog(context,
|
showOneSelectionDialog(context,
|
||||||
title: "选择地图",
|
title: "选择地图".tr,
|
||||||
arr: AppMapLocation.availableMapsToNames,
|
arr: AppMapLocation.availableMapsToNames,
|
||||||
checkChange: (index) {
|
checkChange: (index) {
|
||||||
AppMapLocation.launchMap(
|
AppMapLocation.launchMap(
|
||||||
@@ -203,8 +203,8 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.sizeOf(context).width * 0.105,
|
width: MediaQuery.sizeOf(context).width * 0.105,
|
||||||
height: MediaQuery.sizeOf(context).height * 0.038,
|
height: MediaQuery.sizeOf(context).height * 0.038,
|
||||||
constraints: const BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minWidth: 50,
|
minWidth: 150.rpx,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
@@ -223,7 +223,7 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'导航',
|
'导航'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -255,7 +255,7 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
Get.toNamed("/bookInfoPage",
|
Get.toNamed("/bookInfoPage",
|
||||||
arguments: {"data": data});
|
arguments: {"data": data});
|
||||||
},
|
},
|
||||||
text: '预约',
|
text: '预约'.tr,
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
0, 0, 0, 0),
|
0, 0, 0, 0),
|
||||||
@@ -275,7 +275,7 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(width: 26)),
|
].divide(SizedBox(width: 26.rpx)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class _HelpArticleState extends State<HelpArticle> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'问题与帮助',
|
'问题与帮助'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final data = {
|
final data = {
|
||||||
"mac": device['mac'],
|
"mac".tr: device['mac'.tr],
|
||||||
};
|
};
|
||||||
var response =
|
var response =
|
||||||
await EasyDartModule.dio.delete(queryUrl, data: jsonEncode(data));
|
await EasyDartModule.dio.delete(queryUrl, data: jsonEncode(data));
|
||||||
@@ -251,8 +251,8 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
EasyDartModule.logger.info("解绑设备: $e");
|
EasyDartModule.logger.info("解绑设备: $e");
|
||||||
DailyLogUtils.writeLog("解绑设备: $e");
|
DailyLogUtils.writeLog("解绑设备: $e");
|
||||||
} finally {
|
} finally {
|
||||||
EasyDartModule.logger.info("用户操作:解绑设备");
|
EasyDartModule.logger.info("用户操作:解绑设备".tr);
|
||||||
DailyLogUtils.writeLog("用户操作:解绑设备");
|
DailyLogUtils.writeLog("用户操作:解绑设备".tr);
|
||||||
}
|
}
|
||||||
return ApiResponse(code: -1, msg: "未知错误".tr); // Default return statement
|
return ApiResponse(code: -1, msg: "未知错误".tr); // Default return statement
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
// 初始URL
|
// 初始URL
|
||||||
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "请求人员信息列表",
|
logTitle: "请求人员信息列表".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -436,7 +436,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "请求睡眠信息列表",
|
logTitle: "请求睡眠信息列表".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -504,7 +504,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "请求睡眠信息列表",
|
logTitle: "请求睡眠信息列表".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -563,11 +563,11 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
var data = {
|
var data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"duration": tmp['duration'],
|
"duration": tmp['duration'],
|
||||||
"mac": tmp['mac'],
|
"mac".tr: tmp['mac'.tr],
|
||||||
"time": tmp['startTime'],
|
"time": tmp['startTime'],
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "更新控制倒计时",
|
logTitle: "更新控制倒计时".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -585,11 +585,11 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
var data = {
|
var data = {
|
||||||
"type": type,
|
"type": type,
|
||||||
"duration": 0,
|
"duration": 0,
|
||||||
"mac": tmp['mac'],
|
"mac".tr: tmp['mac'.tr],
|
||||||
"time": tmp['startTime'],
|
"time": tmp['startTime'],
|
||||||
};
|
};
|
||||||
requestWithLog(
|
requestWithLog(
|
||||||
logTitle: "查询控制倒计时",
|
logTitle: "查询控制倒计时".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -608,7 +608,7 @@ class MHTHomeController extends GetControllerEx<MHTHomeModel> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"${serviceAddress}${serviceName}${serviceApi}?type=$type";
|
"${serviceAddress}${serviceName}${serviceApi}?type=$type";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "查询控制倒计时",
|
logTitle: "查询控制倒计时".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "请先",
|
text: "请先".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -113,7 +113,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"登录",
|
"登录".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -132,7 +132,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "后,再查看睡眠报告",
|
text: "后,再查看睡眠报告".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -153,10 +153,10 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
final list = deviceController.personnelList.value;
|
final list = deviceController.personnelList.value;
|
||||||
if (list.isNotEmpty) {
|
if (list.isNotEmpty) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
formFieldController.value = list[0]["mac"];
|
formFieldController.value = list[0]["mac".tr];
|
||||||
personInfo.value = list[0];
|
personInfo.value = list[0];
|
||||||
homeController.selectPerson.value = list[0];
|
homeController.selectPerson.value = list[0];
|
||||||
homeController.selectDevcie.value = list[0]["mac"];
|
homeController.selectDevcie.value = list[0]["mac".tr];
|
||||||
deviceController
|
deviceController
|
||||||
.getSleeps(formFieldController.value);
|
.getSleeps(formFieldController.value);
|
||||||
homeController.updateAll();
|
homeController.updateAll();
|
||||||
@@ -236,7 +236,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
.personnelList.value
|
.personnelList.value
|
||||||
.map<String>((d) {
|
.map<String>((d) {
|
||||||
var s =
|
var s =
|
||||||
d["name"] ?? d["mac"];
|
d["name"] ?? d["mac".tr];
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
@@ -251,7 +251,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
final selectedPerson =
|
final selectedPerson =
|
||||||
list.firstWhere(
|
list.firstWhere(
|
||||||
(element) =>
|
(element) =>
|
||||||
element['mac'] ==
|
element['mac'.tr] ==
|
||||||
val,
|
val,
|
||||||
orElse: () => null,
|
orElse: () => null,
|
||||||
);
|
);
|
||||||
@@ -342,7 +342,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
|||||||
data: {
|
data: {
|
||||||
"tag": "123",
|
"tag": "123",
|
||||||
'date': DateTime.now().millisecondsSinceEpoch,
|
'date': DateTime.now().millisecondsSinceEpoch,
|
||||||
'mac': homeController.selectDevcie.value,
|
'mac'.tr: homeController.selectDevcie.value,
|
||||||
'person': homeController.selectPerson.value,
|
'person': homeController.selectPerson.value,
|
||||||
'backgroundImg':
|
'backgroundImg':
|
||||||
'assets/images/new_background.png',
|
'assets/images/new_background.png',
|
||||||
|
|||||||
@@ -79,18 +79,18 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
|||||||
final list = deviceController.personnelList.value;
|
final list = deviceController.personnelList.value;
|
||||||
final filteredList = list
|
final filteredList = list
|
||||||
.where(
|
.where(
|
||||||
(p) => p['mac'] == macA || p['mac'] == macB)
|
(p) => p['mac'.tr] == macA || p['mac'.tr] == macB)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
// 默认只赋值一次
|
// 默认只赋值一次
|
||||||
if (formFieldController.value == null &&
|
if (formFieldController.value == null &&
|
||||||
filteredList.isNotEmpty) {
|
filteredList.isNotEmpty) {
|
||||||
final defaultMac = filteredList.first['mac'];
|
final defaultMac = filteredList.first['mac'.tr];
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
formFieldController.value = defaultMac;
|
formFieldController.value = defaultMac;
|
||||||
|
|
||||||
final selectedPerson = filteredList.firstWhere(
|
final selectedPerson = filteredList.firstWhere(
|
||||||
(element) => element['mac'] == defaultMac,
|
(element) => element['mac'.tr] == defaultMac,
|
||||||
orElse: () => null,
|
orElse: () => null,
|
||||||
);
|
);
|
||||||
homeController.selectPerson.value =
|
homeController.selectPerson.value =
|
||||||
@@ -118,14 +118,14 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
|||||||
.map<String>((d) => "${d["mac"]}")
|
.map<String>((d) => "${d["mac"]}")
|
||||||
.toList(),
|
.toList(),
|
||||||
optionLabels: filteredList
|
optionLabels: filteredList
|
||||||
.map<String>((d) => d["name"] ?? d["mac"])
|
.map<String>((d) => d["name"] ?? d["mac".tr])
|
||||||
.toList(),
|
.toList(),
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
WidgetsBinding.instance
|
WidgetsBinding.instance
|
||||||
.addPostFrameCallback((_) {
|
.addPostFrameCallback((_) {
|
||||||
final selectedPerson =
|
final selectedPerson =
|
||||||
filteredList.firstWhere(
|
filteredList.firstWhere(
|
||||||
(element) => element['mac'] == val,
|
(element) => element['mac'.tr] == val,
|
||||||
orElse: () => null,
|
orElse: () => null,
|
||||||
);
|
);
|
||||||
homeController.selectPerson.value =
|
homeController.selectPerson.value =
|
||||||
@@ -238,7 +238,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
|||||||
data: {
|
data: {
|
||||||
"tag": "444",
|
"tag": "444",
|
||||||
'date': DateTime.now().millisecondsSinceEpoch,
|
'date': DateTime.now().millisecondsSinceEpoch,
|
||||||
'mac': device['bind_mac_a'],
|
'mac'.tr: device['bind_mac_a'],
|
||||||
'person': homeController.selectPerson.value,
|
'person': homeController.selectPerson.value,
|
||||||
'backgroundImg': 'assets/images/new_background.png',
|
'backgroundImg': 'assets/images/new_background.png',
|
||||||
'arrow': false,
|
'arrow': false,
|
||||||
@@ -251,7 +251,7 @@ class _MhtSleepReportReturnPageState extends State<MhtSleepReportReturnPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Center(
|
return Center(
|
||||||
child: Text('暂无数据', style: TextStyle(color: Colors.white)),
|
child: Text('暂无数据'.tr, style: TextStyle(color: Colors.white)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ 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/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/controller/main_bottom/global_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/pages/mh_page/FloatingSvgIcon.dart';
|
import 'package:vbvs_app/pages/mh_page/FloatingSvgIcon.dart';
|
||||||
@@ -34,7 +32,7 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
var formFieldController = FormFieldController<String>(null);
|
var formFieldController = FormFieldController<String>(null);
|
||||||
var personInfo = {}.obs;
|
var personInfo = {}.obs;
|
||||||
|
|
||||||
GlobalController gloablController = Get.find();
|
// GlobalController gloablController = Get.find();
|
||||||
WeatherModelController weatherModelController = Get.find();
|
WeatherModelController weatherModelController = Get.find();
|
||||||
// var selectedDayIndex = (6).obs;
|
// var selectedDayIndex = (6).obs;
|
||||||
StreamSubscription? _newVersionSubscription;
|
StreamSubscription? _newVersionSubscription;
|
||||||
@@ -82,12 +80,12 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text("发现新版本"),
|
title: Text("发现新版本".tr),
|
||||||
content: Text("新版本号:${pkg.version}"),
|
content: Text("新版本号:${pkg.version}"),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
child: Text("知道了"),
|
child: Text("知道了".tr),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -103,25 +101,25 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
String v = "";
|
String v = "";
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
v = "周一";
|
v = "周一".tr;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
v = "周二";
|
v = "周二".tr;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
v = "周三";
|
v = "周三".tr;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
v = "周四";
|
v = "周四".tr;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
v = "周五";
|
v = "周五".tr;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
v = "周六";
|
v = "周六".tr;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
v = "周日";
|
v = "周日".tr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
@@ -308,63 +306,6 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
if (userInfoController.model.login! == null ||
|
if (userInfoController.model.login! == null ||
|
||||||
userInfoController.model.login! == 0) {
|
userInfoController.model.login! == 0) {
|
||||||
// return Padding(
|
|
||||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
// 30.rpx, 0, 30.rpx, 80.rpx),
|
|
||||||
// child: ClickableContainer(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// highlightColor: Colors.transparent,
|
|
||||||
// padding: EdgeInsets.all(0),
|
|
||||||
// onTap: () {
|
|
||||||
// if (userInfoController.model.login == null ||
|
|
||||||
// userInfoController.model.login == 0) {
|
|
||||||
// TopSlideNotification.show(context,
|
|
||||||
// text: "请先登录".tr,
|
|
||||||
// textColor: themeController.currentColor.sc9);
|
|
||||||
// Get.toNamed("/loginPage");
|
|
||||||
// } else {
|
|
||||||
// Get.toNamed("/mHTDeviceTypePage");
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: Container(
|
|
||||||
// width: MediaQuery.sizeOf(context).width,
|
|
||||||
// height: 302.rpx,
|
|
||||||
// padding:
|
|
||||||
// EdgeInsets.only(top: 90.rpx, bottom: 80.rpx),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// borderRadius: BorderRadius.circular(borderRadius),
|
|
||||||
// border: Border.all(
|
|
||||||
// color: stringToColor("#85F5FF"), // 边框颜色
|
|
||||||
// width: 1.rpx, // 边框宽度
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// SvgPicture.asset(
|
|
||||||
// 'assets/images/icon/add.svg',
|
|
||||||
// width: 42.rpx,
|
|
||||||
// height: 42.rpx,
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 32.rpx,
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// '添加一台新设备'.tr,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: stringToColor("#85F5FF"),
|
|
||||||
// fontSize:
|
|
||||||
// AppConstants().normal_text_fontSize,
|
|
||||||
// letterSpacing: 0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
30.rpx, 0.rpx, 30.rpx, 100.rpx),
|
30.rpx, 0.rpx, 30.rpx, 100.rpx),
|
||||||
@@ -500,8 +441,8 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
deviceController
|
deviceController
|
||||||
.personnelList.value
|
.personnelList.value
|
||||||
.map<String>((d) {
|
.map<String>((d) {
|
||||||
var s =
|
var s = d["name"] ??
|
||||||
d["name"] ?? d["mac"];
|
d["mac"];
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
@@ -795,67 +736,6 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (homeController.bindDeviceNum.value == 0)
|
if (homeController.bindDeviceNum.value == 0)
|
||||||
// Padding(
|
|
||||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
|
||||||
// 30.rpx, 0, 30.rpx, 80.rpx),
|
|
||||||
// child: ClickableContainer(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// highlightColor: Colors.transparent,
|
|
||||||
// padding: EdgeInsets.all(0),
|
|
||||||
// onTap: () {
|
|
||||||
// if (userInfoController.model.login ==
|
|
||||||
// null ||
|
|
||||||
// userInfoController.model.login == 0) {
|
|
||||||
// TopSlideNotification.show(context,
|
|
||||||
// text: "请先登录".tr,
|
|
||||||
// textColor:
|
|
||||||
// themeController.currentColor.sc9);
|
|
||||||
// Get.toNamed("/loginPage");
|
|
||||||
// } else {
|
|
||||||
// Get.toNamed("/mHTDeviceTypePage");
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: Container(
|
|
||||||
// width: MediaQuery.sizeOf(context).width,
|
|
||||||
// height: 302.rpx,
|
|
||||||
// padding: EdgeInsets.only(
|
|
||||||
// top: 90.rpx, bottom: 80.rpx),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// borderRadius:
|
|
||||||
// BorderRadius.circular(borderRadius),
|
|
||||||
// border: Border.all(
|
|
||||||
// color: stringToColor("#85F5FF"), // 边框颜色
|
|
||||||
// width: 1.rpx, // 边框宽度
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// mainAxisAlignment:
|
|
||||||
// MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// SvgPicture.asset(
|
|
||||||
// 'assets/images/icon/add.svg',
|
|
||||||
// width: 42.rpx,
|
|
||||||
// height: 42.rpx,
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 32.rpx,
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// '添加一台新设备'.tr,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: stringToColor("#85F5FF"),
|
|
||||||
// fontSize: AppConstants()
|
|
||||||
// .normal_text_fontSize,
|
|
||||||
// letterSpacing: 0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
30.rpx, 0.rpx, 30.rpx, 100.rpx),
|
30.rpx, 0.rpx, 30.rpx, 100.rpx),
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class IssueListPage extends GetView<IssueListController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'问题与帮助',
|
'问题与帮助'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -95,7 +95,7 @@ class IssueListPage extends GetView<IssueListController> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional(-1, 0),
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'暂无内容!',
|
'暂无内容!'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'消息详情',
|
'消息详情'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -291,13 +291,13 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
|
|||||||
String getStatusText(int status) {
|
String getStatusText(int status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 1:
|
case 1:
|
||||||
return '同意';
|
return '同意'.tr;
|
||||||
case 2:
|
case 2:
|
||||||
return '已同意';
|
return '已同意'.tr;
|
||||||
case 3:
|
case 3:
|
||||||
return '已过期';
|
return '已过期'.tr;
|
||||||
default:
|
default:
|
||||||
return '未知状态';
|
return '未知状态'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'消息中心',
|
'消息中心'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -233,7 +233,7 @@ class _MessagePageState extends State<MessagePage> {
|
|||||||
)),
|
)),
|
||||||
SizedBox(width: 14.rpx), // 加号和文字间距
|
SizedBox(width: 14.rpx), // 加号和文字间距
|
||||||
Text(
|
Text(
|
||||||
'全部已读',
|
'全部已读'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class _MyExperiencePageState extends State<MyExperiencePage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'我的预约',
|
'我的预约'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class MyExperienceWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'咨询',
|
'咨询'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
// color: Color(0xFF9EA4B7),
|
// color: Color(0xFF9EA4B7),
|
||||||
@@ -229,10 +229,10 @@ class MyExperienceWidget extends GetView {
|
|||||||
.then((d) {
|
.then((d) {
|
||||||
if (AppMapLocation
|
if (AppMapLocation
|
||||||
.availableMapsToNames.isEmpty) {
|
.availableMapsToNames.isEmpty) {
|
||||||
showToast("未检测到导航软件");
|
showToast("未检测到导航软件".tr);
|
||||||
} else {
|
} else {
|
||||||
showOneSelectionDialog(context,
|
showOneSelectionDialog(context,
|
||||||
title: "选择地图",
|
title: "选择地图".tr,
|
||||||
arr: AppMapLocation
|
arr: AppMapLocation
|
||||||
.availableMapsToNames,
|
.availableMapsToNames,
|
||||||
checkChange: (index) {
|
checkChange: (index) {
|
||||||
@@ -268,7 +268,7 @@ class MyExperienceWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'导航',
|
'导航'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
// color: Color(0xFF9EA4B7),
|
// color: Color(0xFF9EA4B7),
|
||||||
@@ -330,7 +330,7 @@ class MyExperienceWidget extends GetView {
|
|||||||
.model.bookInfoList[index]
|
.model.bookInfoList[index]
|
||||||
["status"] ==
|
["status"] ==
|
||||||
2
|
2
|
||||||
? '取消预约'
|
? '取消预约'.tr
|
||||||
: bookExperienceListController
|
: bookExperienceListController
|
||||||
.model.bookInfoList[index]
|
.model.bookInfoList[index]
|
||||||
["statusName"],
|
["statusName"],
|
||||||
|
|||||||
@@ -290,36 +290,36 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildListTile('assets/img/icon/mydevice.svg',
|
_buildListTile('assets/img/icon/mydevice.svg',
|
||||||
"我的智能设备", "我绑定或关联的智能床,智能床垫等智能设备",
|
"我的智能设备".tr, "我绑定或关联的智能床,智能床垫等智能设备".tr,
|
||||||
showTopLine: true, path: "/deviceListPage"),
|
showTopLine: true, path: "/deviceListPage"),
|
||||||
// _buildListTile('assets/img/icon/order.svg',
|
// _buildListTile('assets/img/icon/order.svg',
|
||||||
// '我的订单', '快捷查看我在网上的订单记录',
|
// '我的订单', '快捷查看我在网上的订单记录',
|
||||||
// path: ""),
|
// path: ""),
|
||||||
_buildListTile('assets/img/icon/store.svg',
|
_buildListTile('assets/img/icon/store.svg',
|
||||||
'门店体验', '如果想免费体验智能设备,可在此进行提前预约',
|
'门店体验'.tr, '如果想免费体验智能设备,可在此进行提前预约'.tr,
|
||||||
path: "/experienceStorePage"),
|
path: "/experienceStorePage"),
|
||||||
_buildListTile(
|
_buildListTile(
|
||||||
'assets/img/icon/repair.svg',
|
'assets/img/icon/repair.svg',
|
||||||
'设备报修',
|
'设备报修'.tr,
|
||||||
'当您的智能设备需要报修时,可以通过该功能联系解决,',
|
'当您的智能设备需要报修时,可以通过该功能联系解决,'.tr,
|
||||||
path: '/deviceRepairPage',
|
path: '/deviceRepairPage',
|
||||||
),
|
),
|
||||||
_buildListTile('assets/img/icon/mall.svg', '网上商城',
|
_buildListTile('assets/img/icon/mall.svg', '网上商城'.tr,
|
||||||
'最新的智能产品线上购买服务',
|
'最新的智能产品线上购买服务'.tr,
|
||||||
path: "", onTap: () {
|
path: "", onTap: () {
|
||||||
JDLauncher.openShop(
|
JDLauncher.openShop(
|
||||||
"https://mall.jd.com/index-14587480.html");
|
"https://mall.jd.com/index-14587480.html");
|
||||||
}),
|
}),
|
||||||
_buildListTile('assets/img/icon/address.svg',
|
_buildListTile('assets/img/icon/address.svg',
|
||||||
'地址管理', '用于收货和报修时联系您',
|
'地址管理'.tr, '用于收货和报修时联系您'.tr,
|
||||||
path: "/addressListPage"),
|
path: "/addressListPage"),
|
||||||
_buildListTile('assets/img/icon/help.svg',
|
_buildListTile('assets/img/icon/help.svg',
|
||||||
'问题与帮助', '常见的问题汇总,如:智能床连接流程、如何查看睡眠报告',
|
'问题与帮助'.tr, '常见的问题汇总,如:智能床连接流程、如何查看睡眠报告'.tr,
|
||||||
path: "/issueListpage"),
|
path: "/issueListpage"),
|
||||||
_buildListTile(
|
_buildListTile(
|
||||||
'assets/img/icon/customer_service.svg',
|
'assets/img/icon/customer_service.svg',
|
||||||
'在线客服',
|
'在线客服'.tr,
|
||||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系'.tr,
|
||||||
path: "",
|
path: "",
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
UserInfoController userInfoController =
|
UserInfoController userInfoController =
|
||||||
@@ -475,7 +475,7 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
borderRadius: BorderRadius.circular(10.rpx)),
|
borderRadius: BorderRadius.circular(10.rpx)),
|
||||||
),
|
),
|
||||||
child:
|
child:
|
||||||
Text('设置', style: TextStyle(fontSize: 26.rpx, color: Colors.white)),
|
Text('设置'.tr, style: TextStyle(fontSize: 26.rpx, color: Colors.white)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'设置',
|
'设置'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -117,7 +117,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text('修改密码',
|
Text('修改密码'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -164,7 +164,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
print('点击了容器');
|
print('点击了容器'.tr);
|
||||||
Get.toNamed("/aboutUsPage");
|
Get.toNamed("/aboutUsPage");
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -180,7 +180,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'当前版本',
|
'当前版本'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -235,7 +235,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'切换语言',
|
'切换语言'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -256,7 +256,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
.selectLanguage
|
.selectLanguage
|
||||||
.value
|
.value
|
||||||
?.language_name ??
|
?.language_name ??
|
||||||
'简体中文',
|
'简体中文'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Color(0xFFD9E3EB),
|
color: Color(0xFFD9E3EB),
|
||||||
@@ -304,7 +304,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设置页.关于我们'.tr,
|
'关于我们'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -352,7 +352,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设置页.用户协议'.tr,
|
'用户协议'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -400,7 +400,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设置页.隐私协议'.tr,
|
'隐私协议'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -471,7 +471,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设置页.退出登录'.tr,
|
'退出登录'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFF003058),
|
color: Color(0xFF003058),
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -516,7 +516,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'设置页.注销账号'.tr,
|
'注销账号'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc9,
|
color: themeController.currentColor.sc9,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -571,7 +571,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
AppConstants().ent_type == 1
|
AppConstants().ent_type == 1
|
||||||
? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
|
? 'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
|
||||||
.tr
|
.tr
|
||||||
: "Copyright © 202-2025 杭州欢睡科技有限公司 版权所有",
|
: "Copyright © 202-2025 杭州欢睡科技有限公司 版权所有".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
i < controller.model.peopleList.length;
|
i < controller.model.peopleList.length;
|
||||||
i++) {
|
i++) {
|
||||||
var d = controller.model.peopleList[i];
|
var d = controller.model.peopleList[i];
|
||||||
String prefix = "人员信息${i == 0 ? "A" : "B"}:";
|
// String prefix = "人员信息${i == 0 ? "A" : "B"}:";
|
||||||
|
|
||||||
if (d['height'] != null &&
|
if (d['height'] != null &&
|
||||||
d['height'].toString().isNotEmpty &&
|
d['height'].toString().isNotEmpty &&
|
||||||
@@ -216,12 +216,13 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
top: index == 0 ? 30.rpx : 90.rpx,
|
top: index == 0 ? 30.rpx : 90.rpx,
|
||||||
bottom: 20.rpx),
|
bottom: 20.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
"人员资料${index == 0 ? "A" : "B"}",
|
index == 0
|
||||||
|
? 'person_info_A'.tr
|
||||||
|
: 'person_info_B'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx),
|
fontSize: 30.rpx),
|
||||||
),
|
)),
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -242,7 +243,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'姓名',
|
'姓名'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -262,22 +263,19 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
color:
|
color:
|
||||||
Colors.white),
|
Colors.white),
|
||||||
decoration:
|
decoration: InputDecoration(
|
||||||
const InputDecoration(
|
|
||||||
fillColor: Colors
|
fillColor: Colors
|
||||||
.transparent,
|
.transparent,
|
||||||
filled: true,
|
filled: true,
|
||||||
hintText:
|
hintText:
|
||||||
"请输入姓名",
|
"请输入姓名".tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Colors
|
color: Colors
|
||||||
.white),
|
.white),
|
||||||
border:
|
border: InputBorder
|
||||||
InputBorder
|
|
||||||
.none,
|
.none,
|
||||||
contentPadding:
|
contentPadding:
|
||||||
EdgeInsets
|
EdgeInsets.all(
|
||||||
.all(
|
|
||||||
0)),
|
0)),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
controller.model
|
controller.model
|
||||||
@@ -321,7 +319,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
() {
|
() {
|
||||||
showOneSelectionDialog(
|
showOneSelectionDialog(
|
||||||
context,
|
context,
|
||||||
arr: ["女", "男"],
|
title: "选择性别".tr,
|
||||||
|
arr: ["女".tr, "男".tr],
|
||||||
checkIndex: controller
|
checkIndex: controller
|
||||||
.model
|
.model
|
||||||
.peopleList[
|
.peopleList[
|
||||||
@@ -349,7 +348,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'性别',
|
'性别'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -371,8 +370,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
[
|
[
|
||||||
'gender'] ==
|
'gender'] ==
|
||||||
0
|
0
|
||||||
? '女'
|
? '女'.tr
|
||||||
: '男',
|
: '男'.tr,
|
||||||
textAlign:
|
textAlign:
|
||||||
TextAlign
|
TextAlign
|
||||||
.right,
|
.right,
|
||||||
@@ -429,6 +428,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
milliseconds: 250), () {
|
milliseconds: 250), () {
|
||||||
showHeightPickerDialog(
|
showHeightPickerDialog(
|
||||||
context,
|
context,
|
||||||
|
title: "选择身高".tr,
|
||||||
initialHeight:
|
initialHeight:
|
||||||
initialHeight,
|
initialHeight,
|
||||||
onConfirm:
|
onConfirm:
|
||||||
@@ -459,7 +459,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'身高(cm)',
|
'身高(cm)'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -515,6 +515,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
() {
|
() {
|
||||||
showWeightPickerDialog(
|
showWeightPickerDialog(
|
||||||
context,
|
context,
|
||||||
|
title: "选择体重".tr,
|
||||||
initialWeight: controller
|
initialWeight: controller
|
||||||
.model
|
.model
|
||||||
.peopleList[
|
.peopleList[
|
||||||
@@ -547,7 +548,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'体重(kg)',
|
'体重(kg)'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -606,6 +607,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
() {
|
() {
|
||||||
showDateSelectionDialog(
|
showDateSelectionDialog(
|
||||||
context,
|
context,
|
||||||
|
title: "选择生日".tr,
|
||||||
checkDate: controller
|
checkDate: controller
|
||||||
.model
|
.model
|
||||||
.peopleList[index]
|
.peopleList[index]
|
||||||
@@ -642,7 +644,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'生日',
|
'生日'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -662,15 +664,14 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
minWidth:
|
minWidth:
|
||||||
200.rpx),
|
200.rpx),
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.model.peopleList[index]
|
controller.model.peopleList[index]['birthday'] !=
|
||||||
[
|
|
||||||
'birthday'] !=
|
|
||||||
null
|
null
|
||||||
? time_08_Formatter_pattern(
|
? time_08_Formatter_pattern(
|
||||||
controller
|
controller.model.peopleList[index]
|
||||||
.model
|
[
|
||||||
.peopleList[index]['birthday'],
|
'birthday'],
|
||||||
"yyyy年MM月dd日")
|
"yyyy年MM月dd日"
|
||||||
|
.tr)
|
||||||
: '',
|
: '',
|
||||||
textAlign:
|
textAlign:
|
||||||
TextAlign
|
TextAlign
|
||||||
@@ -721,7 +722,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
.spaceBetween,
|
.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'联系方式',
|
'联系方式'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
@@ -746,7 +747,8 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
fillColor: Colors
|
fillColor: Colors
|
||||||
.transparent,
|
.transparent,
|
||||||
filled: true,
|
filled: true,
|
||||||
hintText: "请输入联系方式",
|
hintText:
|
||||||
|
"请输入联系方式".tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color:
|
color:
|
||||||
Colors.white),
|
Colors.white),
|
||||||
@@ -814,6 +816,7 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
|
|||||||
|
|
||||||
Future<void> getPersonData() async {
|
Future<void> getPersonData() async {
|
||||||
PeopleInfoController peopleInfoController = Get.find();
|
PeopleInfoController peopleInfoController = Get.find();
|
||||||
await peopleInfoController.getPeoples(Get.arguments['mac']); // 控制器创建时立即执行
|
await peopleInfoController
|
||||||
|
.getPeoples(Get.arguments['mac'.tr]); // 控制器创建时立即执行
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,14 +15,15 @@ class PrivacyPolicyPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
|
||||||
PrivacyPdfController pdfController = Get.find();
|
PrivacyPdfController pdfController = Get.find();
|
||||||
|
// MHLanguageController languageController = Get.find();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
String language = "zh_CN"; // 默认语言
|
String language = "zh_CN"; // 默认语言
|
||||||
int ent_type = AppConstants().ent_type;
|
int ent_type = AppConstants().ent_type;
|
||||||
if (languageController.selectLanguage?.value?.language_code != null) {
|
if (mhLanguageController.selectLanguage.value?.language_code != null) {
|
||||||
language = languageController.selectLanguage!.value!.language_code!;
|
language = mhLanguageController.selectLanguage.value!.language_code!;
|
||||||
} // 根据 ent_type 拼接不同的文件名
|
} // 根据 ent_type 拼接不同的文件名
|
||||||
String pdfName =
|
String pdfName =
|
||||||
ent_type == 1 ? "$language.pdf" : "${language}_$ent_type.pdf";
|
ent_type == 1 ? "$language.pdf" : "${language}_$ent_type.pdf";
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'详情',
|
'详情'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -125,7 +125,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'系列:' +
|
'系列:'.tr +
|
||||||
(data['device'][0]
|
(data['device'][0]
|
||||||
['category'] ??
|
['category'] ??
|
||||||
'-'),
|
'-'),
|
||||||
@@ -143,7 +143,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'型号:' +
|
'型号:'.tr +
|
||||||
(data['device'][0]
|
(data['device'][0]
|
||||||
['series'] ??
|
['series'] ??
|
||||||
'-'),
|
'-'),
|
||||||
@@ -161,8 +161,9 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'序列号:' +
|
'序列号:'.tr +
|
||||||
(data['device'][0]['mac'] ??
|
(data['device'][0]
|
||||||
|
['mac'.tr] ??
|
||||||
'-'),
|
'-'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
@@ -178,7 +179,8 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'报修单号:' + (data['_id'] ?? '-'),
|
'报修单号:'.tr +
|
||||||
|
(data['_id'] ?? '-'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color:
|
color:
|
||||||
@@ -193,7 +195,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'提交时间:' +
|
'提交时间:'.tr +
|
||||||
(MyUtils
|
(MyUtils
|
||||||
.timestampToDateString(
|
.timestampToDateString(
|
||||||
data[
|
data[
|
||||||
@@ -212,10 +214,10 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'问题描述:' +
|
'问题描述:'.tr +
|
||||||
(data['device'][0]
|
(data['device'][0]
|
||||||
['desc'] ??
|
['desc'] ??
|
||||||
'未命名'),
|
'未命名'.tr),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color:
|
color:
|
||||||
@@ -278,7 +280,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
alignment:
|
alignment:
|
||||||
AlignmentDirectional.centerStart, // 文字左对齐
|
AlignmentDirectional.centerStart, // 文字左对齐
|
||||||
child: Text(
|
child: Text(
|
||||||
'报修状态',
|
'报修状态'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -640,7 +642,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
|||||||
)),
|
)),
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
// 处理返回事件,比如弹出提示框等
|
// 处理返回事件,比如弹出提示框等
|
||||||
print("页面返回事件");
|
print("页面返回事件".tr);
|
||||||
return true; // 返回 true 允许页面返回,返回 false 阻止页面返回
|
return true; // 返回 true 允许页面返回,返回 false 阻止页面返回
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class RepairHistoryWidget extends GetView<RepairInfoController> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
"提交时间:" +
|
"提交时间:".tr +
|
||||||
(MyUtils.formatTimestamp(repairListController
|
(MyUtils.formatTimestamp(repairListController
|
||||||
.model.repairList[index]["create_time"]) ??
|
.model.repairList[index]["create_time"]) ??
|
||||||
''),
|
''),
|
||||||
@@ -116,19 +116,19 @@ class RepairHistoryWidget extends GetView<RepairInfoController> {
|
|||||||
String getStatusText(dynamic status) {
|
String getStatusText(dynamic status) {
|
||||||
switch (status?.toString()) {
|
switch (status?.toString()) {
|
||||||
case '1':
|
case '1':
|
||||||
return '审核中';
|
return '审核中'.tr;
|
||||||
case '2':
|
case '2':
|
||||||
return '审核通过';
|
return '审核通过'.tr;
|
||||||
case '3':
|
case '3':
|
||||||
return '维修中';
|
return '维修中'.tr;
|
||||||
case '4':
|
case '4':
|
||||||
return '维修完成';
|
return '维修完成'.tr;
|
||||||
case '5':
|
case '5':
|
||||||
return '已完成';
|
return '已完成'.tr;
|
||||||
case '6':
|
case '6':
|
||||||
return '已评价';
|
return '已评价'.tr;
|
||||||
default:
|
default:
|
||||||
return '未知状态';
|
return '未知状态'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'设备报修',
|
'设备报修'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -107,7 +107,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
children: [
|
children: [
|
||||||
// 固定的标题部分
|
// 固定的标题部分
|
||||||
Text(
|
Text(
|
||||||
"报修须知",
|
"报修须知".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -128,7 +128,8 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 ",
|
"尊敬的用户,感谢您选择我司产品。在使用过程中,如果设备出现故障需要维修,请首先确认设备是否正确连接控制器或网络,检查设置是否正常,排除误操作问题。若问题依然存在,请记录下设备名称、设备编号、和具体故障内容,方便我们快速地为您提供帮助。您可以通过智慧棉花糖APP保修页面直接报修或拨打 "
|
||||||
|
.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0XFF929699),
|
color: Color(0XFF929699),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -150,7 +151,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: " 反馈。",
|
text: " 反馈。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0XFF929699),
|
color: Color(0XFF929699),
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -186,7 +187,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"我要报修",
|
"我要报修".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#011D33"),
|
color: stringToColor("#011D33"),
|
||||||
@@ -200,7 +201,7 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
|||||||
// 报修历史标题
|
// 报修历史标题
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Text("报修历史",
|
child: Text("报修历史".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class RepairStatusWidget extends GetView {
|
|||||||
MyUtils.timestampToDateString(data["create_time"]),
|
MyUtils.timestampToDateString(data["create_time"]),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 21.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
// index ==
|
// index ==
|
||||||
@@ -36,7 +36,7 @@ class RepairStatusWidget extends GetView {
|
|||||||
mapStatusText(data['status']),
|
mapStatusText(data['status']),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 26.rpx,
|
fontSize: 30.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
// repairInfoController
|
// repairInfoController
|
||||||
@@ -85,19 +85,19 @@ class RepairStatusWidget extends GetView {
|
|||||||
static String mapStatusText(int status) {
|
static String mapStatusText(int status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 1:
|
case 1:
|
||||||
return '审核中';
|
return '审核中'.tr;
|
||||||
case 2:
|
case 2:
|
||||||
return '亩核通过';
|
return '亩核通过'.tr;
|
||||||
case 3:
|
case 3:
|
||||||
return '维修中';
|
return '维修中'.tr;
|
||||||
case 4:
|
case 4:
|
||||||
return '维修完成';
|
return '维修完成'.tr;
|
||||||
case 5:
|
case 5:
|
||||||
return '已完成';
|
return '已完成'.tr;
|
||||||
case 6:
|
case 6:
|
||||||
return '已评价';
|
return '已评价'.tr;
|
||||||
default:
|
default:
|
||||||
return '未知状态';
|
return '未知状态'.tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
String queryUrl = "$serviceAddress$serviceName$serviceApi";
|
||||||
|
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: '查询房间列表',
|
logTitle: '查询房间列表'.tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -93,7 +93,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'房间选择',
|
'房间选择'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -125,7 +125,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"$serviceAddress$serviceName$serviceApi";
|
"$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {
|
data: {
|
||||||
@@ -163,7 +163,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
height: 60.rpx,
|
height: 60.rpx,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"下一步",
|
"下一步".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0XFF011D33),
|
color: Color(0XFF011D33),
|
||||||
@@ -274,7 +274,7 @@ class _RoomPickerPageState extends State<RoomPickerPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"$serviceAddress$serviceName$serviceApi";
|
"$serviceAddress$serviceName$serviceApi";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "更新设备信息",
|
logTitle: "更新设备信息".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -244,31 +244,31 @@ class ScorePage extends GetView<mh.ScoreController> {
|
|||||||
String scoreText;
|
String scoreText;
|
||||||
Color scoreColor;
|
Color scoreColor;
|
||||||
if (controller.model.score == 1) {
|
if (controller.model.score == 1) {
|
||||||
scoreText = '差';
|
scoreText = '差'.tr;
|
||||||
scoreColor =
|
scoreColor =
|
||||||
stringToColor("#E55E92");
|
stringToColor("#E55E92");
|
||||||
} else if (controller.model.score ==
|
} else if (controller.model.score ==
|
||||||
2) {
|
2) {
|
||||||
scoreText = '较差';
|
scoreText = '较差'.tr;
|
||||||
scoreColor =
|
scoreColor =
|
||||||
stringToColor("#E55E92");
|
stringToColor("#E55E92");
|
||||||
} else if (controller.model.score ==
|
} else if (controller.model.score ==
|
||||||
3) {
|
3) {
|
||||||
scoreText = '一般';
|
scoreText = '一般'.tr;
|
||||||
scoreColor =
|
scoreColor =
|
||||||
stringToColor("#07C160");
|
stringToColor("#07C160");
|
||||||
} else if (controller.model.score ==
|
} else if (controller.model.score ==
|
||||||
4) {
|
4) {
|
||||||
scoreText = '优秀';
|
scoreText = '优秀'.tr;
|
||||||
scoreColor =
|
scoreColor =
|
||||||
stringToColor("#F8AE00");
|
stringToColor("#F8AE00");
|
||||||
} else if (controller.model.score ==
|
} else if (controller.model.score ==
|
||||||
5) {
|
5) {
|
||||||
scoreText = '完美';
|
scoreText = '完美'.tr;
|
||||||
scoreColor =
|
scoreColor =
|
||||||
stringToColor("#F8AE00");
|
stringToColor("#F8AE00");
|
||||||
} else {
|
} else {
|
||||||
scoreText = '未评分'; // 如果没有评分显示默认文字
|
scoreText = '未评分'.tr; // 如果没有评分显示默认文字
|
||||||
scoreColor = Colors.grey; // 默认颜色
|
scoreColor = Colors.grey; // 默认颜色
|
||||||
}
|
}
|
||||||
return Text(
|
return Text(
|
||||||
@@ -289,7 +289,7 @@ class ScorePage extends GetView<mh.ScoreController> {
|
|||||||
EdgeInsetsDirectional.fromSTEB(
|
EdgeInsetsDirectional.fromSTEB(
|
||||||
0, 17, 0, 0),
|
0, 17, 0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!',
|
'再多的溢美之词,都比不上您真心的评价。我们愿付出200%的努力,只为您100%的满意~感谢您的支持与厚爱!'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
@@ -409,7 +409,7 @@ class ScorePage extends GetView<mh.ScoreController> {
|
|||||||
borderRadius: BorderRadius.circular(16.rpx),
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"提交",
|
"提交".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#011D33"),
|
color: stringToColor("#011D33"),
|
||||||
|
|||||||
@@ -68,13 +68,13 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
await queryPersonInfoByMac();
|
await queryPersonInfoByMac();
|
||||||
if (selectDevice != null &&
|
if (selectDevice != null &&
|
||||||
selectDevice.isNotEmpty &&
|
selectDevice.isNotEmpty &&
|
||||||
selectDevice['mac'] != null &&
|
selectDevice['mac'.tr] != null &&
|
||||||
(selectDevice['mac'] != args[0]['mac'])) {
|
(selectDevice['mac'.tr] != args[0]['mac'.tr])) {
|
||||||
lastSelectDevice = selectDevice;
|
lastSelectDevice = selectDevice;
|
||||||
}
|
}
|
||||||
edm.EasyDartModule.websocket.sendData(jsonEncode(
|
edm.EasyDartModule.websocket.sendData(jsonEncode(
|
||||||
WebSocketMessage(path: "/smartbed/connect", type: 5, data: {
|
WebSocketMessage(path: "/smartbed/connect", type: 5, data: {
|
||||||
'mac': selectDevice['mac'],
|
'mac'.tr: selectDevice['mac'.tr],
|
||||||
})));
|
})));
|
||||||
dealInstantData(selectDevice);
|
dealInstantData(selectDevice);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -201,7 +201,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
"${serviceAddress}${serviceName}${serviceApi}?mac=${selectDevice['mac']}";
|
"${serviceAddress}${serviceName}${serviceApi}?mac=${selectDevice['mac']}";
|
||||||
try {
|
try {
|
||||||
final res = await requestWithLog(
|
final res = await requestWithLog(
|
||||||
logTitle: "查询设备绑定人员列表",
|
logTitle: "查询设备绑定人员列表".tr,
|
||||||
method: MyHttpMethod.get,
|
method: MyHttpMethod.get,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -229,14 +229,14 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
} else if (data is Map<String, dynamic>) {
|
} else if (data is Map<String, dynamic>) {
|
||||||
tmp = data; // 直接用
|
tmp = data; // 直接用
|
||||||
} else {
|
} else {
|
||||||
print("未知数据格式");
|
print("未知数据格式".tr);
|
||||||
}
|
}
|
||||||
if (tmp['data'] != null && tmp['data'] is Map) {
|
if (tmp['data'] != null && tmp['data'] is Map) {
|
||||||
var newData = tmp['data'];
|
var newData = tmp['data'];
|
||||||
var mac = newData['mac'];
|
var mac = newData['mac'.tr];
|
||||||
if (mac != null) {
|
if (mac != null) {
|
||||||
// 删除已有的同 mac 项
|
// 删除已有的同 mac 项
|
||||||
instantData.removeWhere((element) => element['mac'] == mac);
|
instantData.removeWhere((element) => element['mac'.tr] == mac);
|
||||||
// 添加新的数据
|
// 添加新的数据
|
||||||
instantData.add(newData);
|
instantData.add(newData);
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
bool success = ws.send({
|
bool success = ws.send({
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"path": "/vsbs/web/rt/marttress",
|
"path": "/vsbs/web/rt/marttress",
|
||||||
"data": {"mac": mac},
|
"data": {"mac".tr: mac},
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
ef.log("✅ 已取消监听:$mac");
|
ef.log("✅ 已取消监听:$mac");
|
||||||
@@ -282,7 +282,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
bool success = ws.send({
|
bool success = ws.send({
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"path": "/vsbs/web/rt/marttress",
|
"path": "/vsbs/web/rt/marttress",
|
||||||
"data": {"mac": mac},
|
"data": {"mac".tr: mac},
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
ef.log("✅ 开始监听新设备:$mac");
|
ef.log("✅ 开始监听新设备:$mac");
|
||||||
@@ -329,10 +329,12 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
|||||||
@override
|
@override
|
||||||
WebviewTestController newinstance() {
|
WebviewTestController newinstance() {
|
||||||
if (ef.kvRoot.WebviewTestController == null) {
|
if (ef.kvRoot.WebviewTestController == null) {
|
||||||
|
|
||||||
ef.kvRoot.WebviewTestController = WebviewTestController();
|
ef.kvRoot.WebviewTestController = WebviewTestController();
|
||||||
if (Get.isRegistered<WebviewTestController>() == false) {
|
if (Get.isRegistered<WebviewTestController>() == false) {
|
||||||
Get.put<WebviewTestController>(ef.kvRoot.WebviewTestController);
|
Get.put<WebviewTestController>(ef.kvRoot.WebviewTestController);
|
||||||
WebviewTestController webviewTestController = Get.find();
|
WebviewTestController webviewTestController = Get.find();
|
||||||
|
webviewTestController.global=true;
|
||||||
return webviewTestController;
|
return webviewTestController;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -346,8 +348,8 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
|||||||
deviceController.getDeviceList().then((x) {
|
deviceController.getDeviceList().then((x) {
|
||||||
if (controller.web.jsbridge!.inited) {
|
if (controller.web.jsbridge!.inited) {
|
||||||
//发送测试消息给webview
|
//发送测试消息给webview
|
||||||
controller.web.jsbridge!.dart
|
// controller.web.jsbridge!.dart
|
||||||
.updateDeviceList(deviceController.deviceList.values);
|
// .updateDeviceList(deviceController.deviceList.values);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -371,7 +373,7 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
|||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "请先",
|
text: "请先".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -381,7 +383,7 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"登录",
|
"登录".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: stringToColor("#84F5FF"),
|
color: stringToColor("#84F5FF"),
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
@@ -400,7 +402,7 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "后,再进行设备控制",
|
text: "后,再进行设备控制".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
|
|||||||
String serviceApi = ServiceConstant.login;
|
String serviceApi = ServiceConstant.login;
|
||||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "用户登录",
|
logTitle: "用户登录".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -206,7 +206,7 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
|
|||||||
data['code'] = "mht";
|
data['code'] = "mht";
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
data: data,
|
data: data,
|
||||||
logTitle: "发送验证码",
|
logTitle: "发送验证码".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
@@ -233,7 +233,7 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
|
|||||||
bool isWeChatInstalled = await fluwx.isWeChatInstalled;
|
bool isWeChatInstalled = await fluwx.isWeChatInstalled;
|
||||||
debugPrint('is wechat installed: $isWeChatInstalled');
|
debugPrint('is wechat installed: $isWeChatInstalled');
|
||||||
if (!isWeChatInstalled) {
|
if (!isWeChatInstalled) {
|
||||||
showToast("请先安装微信APP,再使用微信登录");
|
showToast("请先安装微信APP,再使用微信登录".tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ class MHTLoginController extends GetControllerEx<LoginModel> {
|
|||||||
"khCode": "mht",
|
"khCode": "mht",
|
||||||
};
|
};
|
||||||
ApiResponse apiResponse = await requestWithLog(
|
ApiResponse apiResponse = await requestWithLog(
|
||||||
logTitle: "微信登录",
|
logTitle: "微信登录".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data);
|
data: data);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class MHTRegisterController extends GetControllerEx<RegisterModel> {
|
|||||||
"verify": model.register_code!
|
"verify": model.register_code!
|
||||||
};
|
};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "用户注册",
|
logTitle: "用户注册".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -154,7 +154,7 @@ class MHTRegisterController extends GetControllerEx<RegisterModel> {
|
|||||||
'type':4,
|
'type':4,
|
||||||
};
|
};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "获取验证码",
|
logTitle: "获取验证码".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class UpdatePasswordController extends GetControllerEx<UpdatePasswordModel> {
|
|||||||
"verify": model.code
|
"verify": model.code
|
||||||
};
|
};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
logTitle: "修改密码",
|
logTitle: "修改密码".tr,
|
||||||
method: MyHttpMethod.put,
|
method: MyHttpMethod.put,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -146,7 +146,7 @@ class UpdatePasswordController extends GetControllerEx<UpdatePasswordModel> {
|
|||||||
var data = {"userName": model.phone, "type": 3};
|
var data = {"userName": model.phone, "type": 3};
|
||||||
await requestWithLog(
|
await requestWithLog(
|
||||||
data: data,
|
data: data,
|
||||||
logTitle: "发送验证码",
|
logTitle: "发送验证码".tr,
|
||||||
method: MyHttpMethod.post,
|
method: MyHttpMethod.post,
|
||||||
queryUrl: queryUrl,
|
queryUrl: queryUrl,
|
||||||
onSuccess: (res) {
|
onSuccess: (res) {
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class FindPasswordPage extends GetView<FindPasswordController> {
|
|||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '确认新密码',
|
hintText: '确认新密码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF929699),
|
color: Color(0xFF929699),
|
||||||
@@ -527,7 +527,7 @@ class FindPasswordPage extends GetView<FindPasswordController> {
|
|||||||
BorderRadius.circular(16.rpx),
|
BorderRadius.circular(16.rpx),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"提交",
|
"提交".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0XFF003058),
|
color: Color(0XFF003058),
|
||||||
|
|||||||
@@ -123,10 +123,10 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
Future.delayed(const Duration(milliseconds: 300), () {
|
Future.delayed(const Duration(milliseconds: 300), () {
|
||||||
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
||||||
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
||||||
String btnName = "同意";
|
String btnName = "同意".tr;
|
||||||
String cancelName = "取消";
|
String cancelName = "取消".tr;
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
cancelName = "退出";
|
cancelName = "退出".tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -696,7 +696,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请输入账号',
|
hintText: '请输入账号'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFFD2D2D2),
|
color: Color(0xFFD2D2D2),
|
||||||
@@ -778,7 +778,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请输入密码',
|
hintText: '请输入密码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -1082,7 +1082,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请输入验证码',
|
hintText: '请输入验证码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -1198,7 +1198,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
.countdown
|
.countdown
|
||||||
.value ==
|
.value ==
|
||||||
0
|
0
|
||||||
? '获取验证码'
|
? '获取验证码'.tr
|
||||||
: '${countdownController.countdown.value}' +
|
: '${countdownController.countdown.value}' +
|
||||||
'秒'.tr,
|
'秒'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -1700,7 +1700,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
TextSpan(
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "还没有账号? ".tr,
|
text: "还没有账号?".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors
|
color: Colors
|
||||||
.white, // 设置"还没有账号?"为白色
|
.white, // 设置"还没有账号?"为白色
|
||||||
@@ -1731,7 +1731,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
"/findPasswordPage");
|
"/findPasswordPage");
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'找回密码 '.tr,
|
'找回密码'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor(
|
color: stringToColor(
|
||||||
@@ -1872,7 +1872,7 @@ class MHTLoginPage extends GetView<MHTLoginController> {
|
|||||||
Align(
|
Align(
|
||||||
alignment: AlignmentDirectional(0, 0),
|
alignment: AlignmentDirectional(0, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'合肥眠花糖家具有限责任公司版权所有',
|
'合肥眠花糖家具有限责任公司版权所有'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF9EA4B7),
|
color: Color(0xFF9EA4B7),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'用户注册',
|
'用户注册'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -191,7 +191,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请输入密码',
|
hintText: '请输入密码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -387,7 +387,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请确认密码',
|
hintText: '请确认密码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -680,7 +680,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
.normal_text_size,
|
.normal_text_size,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
hintText: '请输入验证码',
|
hintText: '请输入验证码'.tr,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF929699),
|
color: Color(0xFF929699),
|
||||||
@@ -786,7 +786,7 @@ class RegisterPage extends GetView<MHTRegisterController> {
|
|||||||
.countdown
|
.countdown
|
||||||
.value ==
|
.value ==
|
||||||
0
|
0
|
||||||
? '获取验证码'
|
? '获取验证码'.tr
|
||||||
: '${countdownController.countdown.value}' +
|
: '${countdownController.countdown.value}' +
|
||||||
'秒'.tr,
|
'秒'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class RxhxMht extends StatefulWidget {
|
|||||||
class _RxhxMhtState extends State<RxhxMht> {
|
class _RxhxMhtState extends State<RxhxMht> {
|
||||||
get controller => Get.find<SleepingHabitController>();
|
get controller => Get.find<SleepingHabitController>();
|
||||||
get bedController => Get.find<BedController>();
|
get bedController => Get.find<BedController>();
|
||||||
List location = ["床垫全局", "床垫左侧", "床垫右侧"];
|
List location = ["床垫全局".tr, "床垫左侧".tr, "床垫右侧".tr];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -175,7 +175,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List weeks = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
List weeks = ["周一".tr, "周二".tr, "周三".tr, "周四".tr, "周五".tr, "周六".tr, "周日".tr];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -204,7 +204,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
children: [
|
children: [
|
||||||
// 中间居中的标题
|
// 中间居中的标题
|
||||||
Text(
|
Text(
|
||||||
'柔性唤醒',
|
'柔性唤醒'.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -242,7 +242,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'柔性唤醒功能',
|
'柔性唤醒功能'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -301,7 +301,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
showDayTimeSelectionDialog(context,
|
showDayTimeSelectionDialog(context,
|
||||||
dayTimeArr: controller.model.rxhxWakeTime,
|
dayTimeArr: controller.model.rxhxWakeTime,
|
||||||
title: "唤醒时间", checkChange: (d) {
|
title: "唤醒时间".tr, checkChange: (d) {
|
||||||
controller.attr.update((getmodel) {
|
controller.attr.update((getmodel) {
|
||||||
getmodel.model.rxhxWakeTime = [
|
getmodel.model.rxhxWakeTime = [
|
||||||
int.parse("${d[0]}"),
|
int.parse("${d[0]}"),
|
||||||
@@ -321,7 +321,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'唤醒时间',
|
'唤醒时间'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -362,9 +362,9 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
showOneSelectionDialog(
|
showOneSelectionDialog(
|
||||||
context,
|
context,
|
||||||
arr: ['开', "关"],
|
arr: ['开'.tr, "关".tr],
|
||||||
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
checkIndex: controller.model.rxhxIsAnMo ? 0 : 1,
|
||||||
title: "按摩",
|
title: "按摩".tr,
|
||||||
checkChange: (index) {
|
checkChange: (index) {
|
||||||
controller.attr.update((getmodel) {
|
controller.attr.update((getmodel) {
|
||||||
getmodel.model.rxhxIsAnMo =
|
getmodel.model.rxhxIsAnMo =
|
||||||
@@ -383,7 +383,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'按摩',
|
'按摩'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -395,7 +395,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
controller.model.rxhxIsAnMo ? '开' : '关',
|
controller.model.rxhxIsAnMo ? '开'.tr : '关'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -425,7 +425,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
context,
|
context,
|
||||||
arr: location,
|
arr: location,
|
||||||
checkIndex: controller.model.rxhxLocation,
|
checkIndex: controller.model.rxhxLocation,
|
||||||
title: "唤醒部位",
|
title: "唤醒部位".tr,
|
||||||
checkChange: (index) {
|
checkChange: (index) {
|
||||||
controller.attr.update((getmodel) {
|
controller.attr.update((getmodel) {
|
||||||
getmodel.model.rxhxLocation = index;
|
getmodel.model.rxhxLocation = index;
|
||||||
@@ -443,7 +443,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'唤醒部位',
|
'唤醒部位'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -493,7 +493,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'自定义',
|
'自定义'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -622,7 +622,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Text(
|
child: Text(
|
||||||
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。',
|
'*注:开启该功能后,在设置的时间点,设备将启动一段固定时长的柔性唤醒功能。'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Color(0xFF929699),
|
color: Color(0xFF929699),
|
||||||
@@ -652,7 +652,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
child: Text("完成",
|
child: Text("完成".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: const Color(0xFF003058),
|
color: const Color(0xFF003058),
|
||||||
fontSize: 26.rpx)),
|
fontSize: 26.rpx)),
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
AlignmentDirectional(
|
AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'输入验证码',
|
'输入验证码'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -346,7 +346,8 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
hintText:
|
hintText:
|
||||||
'请输验证码',
|
'请输验证码'
|
||||||
|
.tr,
|
||||||
hintStyle:
|
hintStyle:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
@@ -465,7 +466,7 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
Text(
|
Text(
|
||||||
countdownController.countdown.value ==
|
countdownController.countdown.value ==
|
||||||
0
|
0
|
||||||
? '获取验证码'
|
? '获取验证码'.tr
|
||||||
: '${countdownController.countdown.value}秒',
|
: '${countdownController.countdown.value}秒',
|
||||||
style:
|
style:
|
||||||
TextStyle(
|
TextStyle(
|
||||||
@@ -497,15 +498,16 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minWidth:
|
minWidth: 158.rpx,
|
||||||
158.rpx, // 设置最小宽度为 100
|
maxWidth:
|
||||||
|
158.rpx // 设置最小宽度为 100
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment:
|
||||||
AlignmentDirectional(
|
AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'输入新密码',
|
'输入新密码'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
@@ -661,15 +663,17 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minWidth:
|
minWidth: 158.rpx,
|
||||||
158.rpx, // 设置最小宽度为 100
|
maxWidth:
|
||||||
|
158.rpx // 设置最小宽度为 100
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment:
|
||||||
AlignmentDirectional(
|
AlignmentDirectional(
|
||||||
-1, 0),
|
-1, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'确认新密码',
|
'确认新密码'.tr,
|
||||||
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ class _UserAgreementPageState extends State<UserAgreementPage> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
String language = "zh_CN"; // 默认语言
|
String language = "zh_CN"; // 默认语言
|
||||||
|
|
||||||
if (languageController.selectLanguage?.value?.language_code != null) {
|
if (mhLanguageController.selectLanguage?.value?.language_code != null) {
|
||||||
language = languageController.selectLanguage!.value!.language_code!;
|
language = mhLanguageController.selectLanguage!.value!.language_code!;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ent_type = AppConstants().ent_type;
|
int ent_type = AppConstants().ent_type;
|
||||||
|
|||||||
@@ -6,6 +6,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/component/tool/CustomCard.dart';
|
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
||||||
import 'package:vbvs_app/controller/setting/language/language_controller.dart';
|
import 'package:vbvs_app/controller/setting/language/language_controller.dart';
|
||||||
import 'package:vbvs_app/language/AppLanguage.dart';
|
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';
|
||||||
@@ -18,7 +19,7 @@ class LanguageSetting extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LanguageSettingState extends State<LanguageSetting> {
|
class _LanguageSettingState extends State<LanguageSetting> {
|
||||||
LanguageController languageController = Get.find();
|
MHLanguageController languageController = Get.find();
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// languageController.initLanuageList();
|
// languageController.initLanuageList();
|
||||||
|
|||||||
@@ -115,28 +115,28 @@ class _HeartChangeWidgetState extends State<HeartChangeWidget> {
|
|||||||
DataShowWidget(
|
DataShowWidget(
|
||||||
alignment: MainAxisAlignment.center,
|
alignment: MainAxisAlignment.center,
|
||||||
widget1: Text(
|
widget1: Text(
|
||||||
"名称",
|
"名称".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
widget2: Text(
|
widget2: Text(
|
||||||
"测量值",
|
"测量值".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
widget3: Text(
|
widget3: Text(
|
||||||
"参考范围",
|
"参考范围".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
widget4: Text(
|
widget4: Text(
|
||||||
"趋势",
|
"趋势".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController.currentColor.sc4,
|
||||||
fontSize: AppConstants().normal_text_fontSize,
|
fontSize: AppConstants().normal_text_fontSize,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:ef/base/chart/drawer.dart';
|
import 'package:ef/base/chart/drawer.dart';
|
||||||
|
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/pages/mh_page/component/easychart.dart';
|
import 'package:vbvs_app/pages/mh_page/component/easychart.dart';
|
||||||
@@ -19,11 +20,11 @@ Widget MonthDataWidget(
|
|||||||
return [
|
return [
|
||||||
AvgSleepScoreWidget(
|
AvgSleepScoreWidget(
|
||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
mediumLabel: "本月平均分",
|
mediumLabel: "本月平均分".tr,
|
||||||
), //睡眠评分
|
), //睡眠评分
|
||||||
SleepChartContainer(
|
SleepChartContainer(
|
||||||
title: "每日得分",
|
title: "每日得分".tr,
|
||||||
tipText: "用户本月睡眠分数的汇总。",
|
tipText: "用户本月睡眠分数的汇总。".tr,
|
||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
chartContent: LineView(
|
chartContent: LineView(
|
||||||
xLabels: [
|
xLabels: [
|
||||||
@@ -75,7 +76,7 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['scoreList']['data'], '分', 1),
|
tips: buildValueTexts(sleepReport['scoreList']['data'], '分'.tr, 1),
|
||||||
xCount: buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
xCount: buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
yCount: sleepReport['scoreList']['yLable'].length,
|
yCount: sleepReport['scoreList']['yLable'].length,
|
||||||
@@ -92,9 +93,9 @@ Widget MonthDataWidget(
|
|||||||
highlightItem: data['itemName'],
|
highlightItem: data['itemName'],
|
||||||
),
|
),
|
||||||
IndicatorCompareCard(
|
IndicatorCompareCard(
|
||||||
title: "与上月对比",
|
title: "与上月对比".tr,
|
||||||
headers: ["名称", "上月", "本月", "参考范围"],
|
headers: ["名称".tr, "上月".tr, "本月".tr, "参考范围".tr],
|
||||||
tooltip: "睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
tooltip: "睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。".tr,
|
||||||
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
||||||
return [
|
return [
|
||||||
Text(
|
Text(
|
||||||
@@ -120,8 +121,8 @@ Widget MonthDataWidget(
|
|||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
SleepChartContainer(
|
SleepChartContainer(
|
||||||
title: "本月睡眠时长",
|
title: "本月睡眠时长".tr,
|
||||||
tipText: "本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和。",
|
tipText: "本月睡眠时长是指从月初到月末,用户每天实际睡眠的时间总和".tr,
|
||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
chartContent: LineView(
|
chartContent: LineView(
|
||||||
xLabels: [
|
xLabels: [
|
||||||
@@ -172,7 +173,14 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildSleepValueTexts(sleepReport['csd']['data'], '小时', 1),
|
tips: buildSleepValueTexts(
|
||||||
|
sleepReport['csd']['data'],
|
||||||
|
'小时'.tr,
|
||||||
|
1,
|
||||||
|
sleepDurationLabel: 'sleep_duration'.tr,
|
||||||
|
deepSleepLabel: 'deep_sleep'.tr,
|
||||||
|
lightSleepLabel: 'light_sleep'.tr,
|
||||||
|
),
|
||||||
xCount: buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
xCount: buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
yCount: sleepReport['csd']['yLable'].length,
|
yCount: sleepReport['csd']['yLable'].length,
|
||||||
@@ -239,7 +247,8 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][0]['value'], '入睡时间:', 0),
|
tips:
|
||||||
|
buildValueTexts(sleepReport['dysp'][0]['value'], '入睡时间:'.tr, 0),
|
||||||
xCount:
|
xCount:
|
||||||
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
@@ -305,7 +314,8 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][1]['value'], '起床时间:', 0),
|
tips:
|
||||||
|
buildValueTexts(sleepReport['dysp'][1]['value'], '起床时间:'.tr, 0),
|
||||||
xCount:
|
xCount:
|
||||||
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
@@ -371,7 +381,7 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][2]['value'], '次', 1),
|
tips: buildValueTexts(sleepReport['dysp'][2]['value'], '次'.tr, 1),
|
||||||
xCount:
|
xCount:
|
||||||
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
@@ -437,7 +447,7 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][3]['value'], '毫秒', 1),
|
tips: buildValueTexts(sleepReport['dysp'][3]['value'], '毫秒'.tr, 1),
|
||||||
xCount:
|
xCount:
|
||||||
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
@@ -503,7 +513,7 @@ Widget MonthDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][4]['value'], '次/分', 1),
|
tips: buildValueTexts(sleepReport['dysp'][4]['value'], '次/分'.tr, 1),
|
||||||
xCount:
|
xCount:
|
||||||
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
buildMonthlyChartData(sleepReport['scoreList'])['daysInMonth']
|
||||||
.toInt(),
|
.toInt(),
|
||||||
@@ -561,10 +571,10 @@ List<String> buildValueTexts(
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> buildSleepValueTexts(
|
List<String> buildSleepValueTexts(
|
||||||
List<dynamic> data,
|
List<dynamic> data, String unit, int direction, // 0 左侧,1 右侧
|
||||||
String unit,
|
{required String sleepDurationLabel,
|
||||||
int direction, // 0 左侧,1 右侧
|
required String deepSleepLabel,
|
||||||
) {
|
required String lightSleepLabel}) {
|
||||||
if (data.isEmpty) return [];
|
if (data.isEmpty) return [];
|
||||||
|
|
||||||
return data.map((item) {
|
return data.map((item) {
|
||||||
@@ -575,22 +585,13 @@ List<String> buildSleepValueTexts(
|
|||||||
final prefix = direction == 1 ? '' : unit;
|
final prefix = direction == 1 ? '' : unit;
|
||||||
final suffix = direction == 1 ? unit : '';
|
final suffix = direction == 1 ? unit : '';
|
||||||
|
|
||||||
// 格式化日期(不带时间)
|
var lines = [
|
||||||
String dateStr = '';
|
'$sleepDurationLabel:$prefix$slt$suffix',
|
||||||
if (item['st'] != null) {
|
'$deepSleepLabel:$prefix$dst$suffix',
|
||||||
final dt = DateTime.fromMillisecondsSinceEpoch(item['st']);
|
'$lightSleepLabel:$prefix$lst$suffix',
|
||||||
dateStr =
|
].join('\n');
|
||||||
"${dt.year}年${dt.month.toString().padLeft(2, '0')}月${dt.day.toString().padLeft(2, '0')}日";
|
|
||||||
}
|
|
||||||
|
|
||||||
var q = [
|
return lines;
|
||||||
"睡眠时长:$prefix$slt$suffix",
|
|
||||||
"深睡:$prefix$dst$suffix",
|
|
||||||
"浅睡:$prefix$lst$suffix",
|
|
||||||
dateStr,
|
|
||||||
].join("\n");
|
|
||||||
print(q);
|
|
||||||
return q;
|
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,104 +174,6 @@ class _SleepScoreWidgetState extends State<SleepScoreWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
// Row(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// children: [
|
|
||||||
// Container(
|
|
||||||
// decoration: BoxDecoration(),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Container(
|
|
||||||
// constraints: BoxConstraints(maxWidth: 150.rpx),
|
|
||||||
// child: Text(
|
|
||||||
// '30天平均分'.tr,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: Color(0xFFD3D3D3),
|
|
||||||
// fontSize: 26.rpx,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// ),
|
|
||||||
// maxLines: 1,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// '${widget.sleepReport['score']?['avg']}',
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: Colors.white,
|
|
||||||
// fontSize: 48.rpx,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ].divide(SizedBox(height: 56.rpx)),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Container(
|
|
||||||
// decoration: BoxDecoration(),
|
|
||||||
// child: SegmentedCircleWithCenterWidget(
|
|
||||||
// // segments: [
|
|
||||||
// // SegmentData(color: Colors.red, value: 30),
|
|
||||||
// // SegmentData(color: Colors.green, value: 20),
|
|
||||||
// // SegmentData(color: Colors.blue, value: 40),
|
|
||||||
// // SegmentData(color: Colors.orange, value: 10),
|
|
||||||
// // ],
|
|
||||||
// segments: segments,
|
|
||||||
// strokeWidth: 8,
|
|
||||||
// gapAngle: 8,
|
|
||||||
// centerWidget: Container(
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Text(
|
|
||||||
// "睡眠评分".tr,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: stringToColor("#FFFFFF"),
|
|
||||||
// fontSize:
|
|
||||||
// AppConstants().normal_text_fontSize),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// '${widget.sleepReport['score']?['score']}',
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: stringToColor("#FF9F66"),
|
|
||||||
// fontSize: 100.rpx),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// trend: widget.sleepReport['score']?['trend'],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Container(
|
|
||||||
// decoration: BoxDecoration(),
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Text(
|
|
||||||
// '睡眠等级'.tr,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: Color(0xFFD3D3D3),
|
|
||||||
// fontSize: 26.rpx,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Text(
|
|
||||||
// '${getSleepLevel(widget.sleepReport)}',
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: stringToColor("#FF9F66"),
|
|
||||||
// fontSize: 48.rpx,
|
|
||||||
// letterSpacing: 0.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ].divide(SizedBox(height: 56.rpx)),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ].divide(SizedBox(
|
|
||||||
// width: 33.rpx,
|
|
||||||
// )),
|
|
||||||
// ),
|
|
||||||
|
|
||||||
),
|
),
|
||||||
SizedBox(height: 50.rpx),
|
SizedBox(height: 50.rpx),
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
context,
|
context,
|
||||||
Container(
|
Container(
|
||||||
child: Text(
|
child: Text(
|
||||||
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。",
|
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
@@ -194,7 +194,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "小时",
|
text: "小时".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontSize:
|
fontSize:
|
||||||
@@ -210,7 +210,7 @@ class _SleepViewWidgetState extends State<SleepViewWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "分钟",
|
text: "分钟".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
fontSize:
|
fontSize:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:ef/base/chart/drawer.dart';
|
import 'package:ef/base/chart/drawer.dart';
|
||||||
|
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/pages/mh_page/component/easychart.dart';
|
import 'package:vbvs_app/pages/mh_page/component/easychart.dart';
|
||||||
@@ -22,8 +23,8 @@ Widget WeekDataWidget(
|
|||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
),
|
),
|
||||||
SleepChartContainer(
|
SleepChartContainer(
|
||||||
title: "每日得分",
|
title: "每日得分".tr,
|
||||||
tipText: "用户本周睡眠分数的汇总。",
|
tipText: "用户本周睡眠分数的汇总".tr,
|
||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
chartContent: LineView(
|
chartContent: LineView(
|
||||||
xLabels: [
|
xLabels: [
|
||||||
@@ -51,7 +52,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -105,9 +114,9 @@ Widget WeekDataWidget(
|
|||||||
highlightItem: data['itemName'],
|
highlightItem: data['itemName'],
|
||||||
),
|
),
|
||||||
IndicatorCompareCard(
|
IndicatorCompareCard(
|
||||||
title: "与上周对比",
|
title: "与上周对比".tr,
|
||||||
headers: ["名称", "上周", "本周", "参考范围"],
|
headers: ["名称".tr, "上周".tr, "本周".tr, "参考范围".tr],
|
||||||
tooltip: "睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。",
|
tooltip: "睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。".tr,
|
||||||
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
rows: (sleepReport['cwl'] ?? []).map<List<Widget>>((item) {
|
||||||
return [
|
return [
|
||||||
Text(
|
Text(
|
||||||
@@ -133,8 +142,8 @@ Widget WeekDataWidget(
|
|||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
SleepChartContainer(
|
SleepChartContainer(
|
||||||
title: "本周睡眠时长",
|
title: "本周睡眠时长".tr,
|
||||||
tipText: "本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。",
|
tipText: "本周睡眠时长是指从周一到周日内,每天实际睡眠的时间总和。".tr,
|
||||||
sleepReport: sleepReport,
|
sleepReport: sleepReport,
|
||||||
chartContent: LineView(
|
chartContent: LineView(
|
||||||
xLabels: [
|
xLabels: [
|
||||||
@@ -162,7 +171,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -204,7 +221,14 @@ Widget WeekDataWidget(
|
|||||||
dualBarPoints: buildTripleBarData(sleepReport['csd']),
|
dualBarPoints: buildTripleBarData(sleepReport['csd']),
|
||||||
displayMode: ChartDisplayMode.dualBar,
|
displayMode: ChartDisplayMode.dualBar,
|
||||||
xUnit: sleepReport['csd']['yUnit'],
|
xUnit: sleepReport['csd']['yUnit'],
|
||||||
tips: buildSleepValueTexts(sleepReport['csd']['data'], '小时', 1),
|
tips: buildSleepValueTexts(
|
||||||
|
sleepReport['csd']['data'],
|
||||||
|
'小时'.tr,
|
||||||
|
1,
|
||||||
|
sleepDurationLabel: 'sleep_duration'.tr,
|
||||||
|
deepSleepLabel: 'deep_sleep'.tr,
|
||||||
|
lightSleepLabel: 'light_sleep'.tr,
|
||||||
|
),
|
||||||
barWidth: 0.2,
|
barWidth: 0.2,
|
||||||
),
|
),
|
||||||
showLabel: sleepReport['csd']['type'],
|
showLabel: sleepReport['csd']['type'],
|
||||||
@@ -239,7 +263,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -277,7 +309,8 @@ Widget WeekDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][0]['value'], '入睡时间:', 0),
|
tips:
|
||||||
|
buildValueTexts(sleepReport['dysp'][0]['value'], '入睡时间:'.tr, 0),
|
||||||
xCount: 7,
|
xCount: 7,
|
||||||
yCount: sleepReport['dysp'][0]['yLable'].length,
|
yCount: sleepReport['dysp'][0]['yLable'].length,
|
||||||
points: buildGeneralPoints(sleepReport['dysp'][0]),
|
points: buildGeneralPoints(sleepReport['dysp'][0]),
|
||||||
@@ -317,7 +350,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -355,7 +396,8 @@ Widget WeekDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][1]['value'], '起床时间:', 0),
|
tips:
|
||||||
|
buildValueTexts(sleepReport['dysp'][1]['value'], '起床时间:'.tr, 0),
|
||||||
xCount: 7,
|
xCount: 7,
|
||||||
yCount: sleepReport['dysp'][1]['yLable'].length,
|
yCount: sleepReport['dysp'][1]['yLable'].length,
|
||||||
points: buildGeneralPoints(sleepReport['dysp'][1]),
|
points: buildGeneralPoints(sleepReport['dysp'][1]),
|
||||||
@@ -395,7 +437,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -433,7 +483,7 @@ Widget WeekDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][2]['value'], '次', 1),
|
tips: buildValueTexts(sleepReport['dysp'][2]['value'], '次'.tr, 1),
|
||||||
xCount: 7,
|
xCount: 7,
|
||||||
yCount: sleepReport['dysp'][2]['yLable'].length,
|
yCount: sleepReport['dysp'][2]['yLable'].length,
|
||||||
points: buildGeneralPoints(sleepReport['dysp'][2]),
|
points: buildGeneralPoints(sleepReport['dysp'][2]),
|
||||||
@@ -473,7 +523,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -511,7 +569,7 @@ Widget WeekDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][3]['value'], '毫秒', 1),
|
tips: buildValueTexts(sleepReport['dysp'][3]['value'], '毫秒'.tr, 1),
|
||||||
xCount: 7,
|
xCount: 7,
|
||||||
yCount: sleepReport['dysp'][3]['yLable'].length,
|
yCount: sleepReport['dysp'][3]['yLable'].length,
|
||||||
points: buildGeneralPoints(sleepReport['dysp'][3]),
|
points: buildGeneralPoints(sleepReport['dysp'][3]),
|
||||||
@@ -551,7 +609,15 @@ Widget WeekDataWidget(
|
|||||||
min: 0, //最小值0
|
min: 0, //最小值0
|
||||||
max: 7, //最大值30
|
max: 7, //最大值30
|
||||||
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
q: 6, //labels第一个与最后一个的真实距离,也就是30-1 = 29
|
||||||
labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
labels: [
|
||||||
|
'周一'.tr,
|
||||||
|
'周二'.tr,
|
||||||
|
'周三'.tr,
|
||||||
|
'周四'.tr,
|
||||||
|
'周五'.tr,
|
||||||
|
'周六'.tr,
|
||||||
|
'周日'.tr
|
||||||
|
],
|
||||||
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
indexs: [0, 1, 2, 3, 4, 5, 6], //每一个标签的对应在X轴的真实位置
|
||||||
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
offset: Offset(0, -50.rpx), //标签相对于原点的偏移,下方60像素位置
|
||||||
ondrawer: (canvas, offset, index, label, align, style) {
|
ondrawer: (canvas, offset, index, label, align, style) {
|
||||||
@@ -589,7 +655,7 @@ Widget WeekDataWidget(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
tips: buildValueTexts(sleepReport['dysp'][4]['value'], '次/分', 1),
|
tips: buildValueTexts(sleepReport['dysp'][4]['value'], '次/分'.tr, 1),
|
||||||
xCount: 7,
|
xCount: 7,
|
||||||
yCount: sleepReport['dysp'][4]['yLable'].length,
|
yCount: sleepReport['dysp'][4]['yLable'].length,
|
||||||
points: buildGeneralPoints(sleepReport['dysp'][4]),
|
points: buildGeneralPoints(sleepReport['dysp'][4]),
|
||||||
@@ -653,10 +719,10 @@ List<String> buildValueTexts(
|
|||||||
|
|
||||||
//多个关键点标签
|
//多个关键点标签
|
||||||
List<String> buildSleepValueTexts(
|
List<String> buildSleepValueTexts(
|
||||||
List<dynamic> data,
|
List<dynamic> data, String unit, int direction, // 0 左侧,1 右侧
|
||||||
String unit,
|
{required String sleepDurationLabel,
|
||||||
int direction, // 0 左侧,1 右侧
|
required String deepSleepLabel,
|
||||||
) {
|
required String lightSleepLabel}) {
|
||||||
if (data.isEmpty) return [];
|
if (data.isEmpty) return [];
|
||||||
|
|
||||||
return data.map((item) {
|
return data.map((item) {
|
||||||
@@ -667,13 +733,13 @@ List<String> buildSleepValueTexts(
|
|||||||
final prefix = direction == 1 ? '' : unit;
|
final prefix = direction == 1 ? '' : unit;
|
||||||
final suffix = direction == 1 ? unit : '';
|
final suffix = direction == 1 ? unit : '';
|
||||||
|
|
||||||
var q = [
|
var lines = [
|
||||||
"睡眠时长:$prefix$slt$suffix",
|
'$sleepDurationLabel:$prefix$slt$suffix',
|
||||||
"深睡:$prefix$dst$suffix",
|
'$deepSleepLabel:$prefix$dst$suffix',
|
||||||
"浅睡:$prefix$lst$suffix",
|
'$lightSleepLabel:$prefix$lst$suffix',
|
||||||
].join("\n");
|
].join('\n');
|
||||||
print(q);
|
|
||||||
return q;
|
return lines;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class AvgSleepScoreWidget extends StatelessWidget {
|
|||||||
Key? key,
|
Key? key,
|
||||||
required this.sleepReport,
|
required this.sleepReport,
|
||||||
this.leftLabel = '最低分',
|
this.leftLabel = '最低分',
|
||||||
this.mediumLabel = '本周评分',
|
this.mediumLabel = '本周平均分',
|
||||||
this.rightLabel = '最高分',
|
this.rightLabel = '最高分',
|
||||||
this.unknownText = '未知数据',
|
this.unknownText = '未知数据',
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|||||||
@@ -84,16 +84,20 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
_scrollToTargetComponent(sleepReportController.sleepReport);
|
_scrollToTargetComponent(sleepReportController.sleepReport);
|
||||||
},
|
},
|
||||||
onFailure: (res) {
|
onFailure: (res) {
|
||||||
|
try {
|
||||||
if (MainPageBBottomChange.getCurrentIndex() != null) {
|
if (MainPageBBottomChange.getCurrentIndex() != null) {
|
||||||
if (MainPageBBottomChange.getCurrentIndex() == 1) {
|
if (MainPageBBottomChange.getCurrentIndex() == 1) {
|
||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
text: res.msg!,
|
||||||
|
textColor: themeController.currentColor.sc9);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
e;
|
||||||
|
}
|
||||||
sleepReportController.sleepReport.value = {};
|
sleepReportController.sleepReport.value = {};
|
||||||
sleepReportController.updateAll();
|
sleepReportController.updateAll();
|
||||||
print(res);
|
print(res);
|
||||||
@@ -144,10 +148,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||||
}
|
}
|
||||||
} else {
|
} else {}
|
||||||
TopSlideNotification.show(context,
|
|
||||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
|
||||||
}
|
|
||||||
sleepReportController.sleepReport.value = {};
|
sleepReportController.sleepReport.value = {};
|
||||||
sleepReportController.updateAll();
|
sleepReportController.updateAll();
|
||||||
print(res);
|
print(res);
|
||||||
@@ -441,7 +442,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
30.rpx, 32.rpx, 30.rpx, 32.rpx),
|
0.rpx, 32.rpx, 30.rpx, 32.rpx),
|
||||||
child: getTimeWidget(),
|
child: getTimeWidget(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1332,21 +1333,6 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ClickableContainer(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// highlightColor: themeController.currentColor.sc3,
|
|
||||||
// padding: EdgeInsets.all(10.rpx),
|
|
||||||
// borderRadius: 8.rpx,
|
|
||||||
// onTap: onRightArrowTap,
|
|
||||||
// child: Container(
|
|
||||||
// width: 30.rpx,
|
|
||||||
// height: 30.rpx,
|
|
||||||
// child: SvgPicture.asset(
|
|
||||||
// 'assets/img/icon/arrow_right.svg',
|
|
||||||
// color: themeController.currentColor.sc3,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
Obx(() => ClickableContainer(
|
Obx(() => ClickableContainer(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
highlightColor: themeController.currentColor.sc3,
|
highlightColor: themeController.currentColor.sc3,
|
||||||
@@ -1371,8 +1357,9 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
sleepReportController.model.type == 3
|
sleepReportController.model.type == 3
|
||||||
? showMonthSelectionDialog(context, checkDate: selectedDate,
|
? showMonthSelectionDialog(context,
|
||||||
checkChange: (DateTime d) {
|
checkDate: selectedDate,
|
||||||
|
title: "选择月份".tr, checkChange: (DateTime d) {
|
||||||
sleepReportController.selectedDate.value = d;
|
sleepReportController.selectedDate.value = d;
|
||||||
calendarController.selectedDate.value = d;
|
calendarController.selectedDate.value = d;
|
||||||
|
|
||||||
|
|||||||
48
pubspec.lock
48
pubspec.lock
@@ -211,10 +211,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27"
|
sha256: "0b1b12a0a549605e5f04476031cd0bc91ead1d7c8e830773a18ee54179b3cb62"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.10.1"
|
version: "8.11.0"
|
||||||
cached_network_image:
|
cached_network_image:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -444,7 +444,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: main
|
||||||
resolved-ref: "494ff9d2b803522745d88061791be1072a617afd"
|
resolved-ref: d2ed03c1b1ca4db4a0bdbdc443d3c86d08048003
|
||||||
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easydevice.git"
|
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easydevice.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@@ -453,7 +453,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: main
|
||||||
resolved-ref: a6e0ac89b5408ae55421331a6019defb26f4110b
|
resolved-ref: e78402ccfdadfa7700d297a929dcb7e32347d2b5
|
||||||
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easyweb.git"
|
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easyweb.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@@ -470,7 +470,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: main
|
||||||
resolved-ref: b8455ecd8caf09e8d9ce09167d8a633d554381fb
|
resolved-ref: "6f4f561aec070bc0912e6138ea91835e6348a11a"
|
||||||
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/ef.git"
|
url: "https://gitea.wslpc.real.he-info.cn:94/flutter/ef.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@@ -591,6 +591,14 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.34.5"
|
version: "1.34.5"
|
||||||
|
flutter_bmflocation:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_bmflocation
|
||||||
|
sha256: "9d5e8cd8df4a50f41bf167ff7fb3e285e372413935c03fbae3862e58cd7926cd"
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "3.8.0"
|
||||||
flutter_cache_manager:
|
flutter_cache_manager:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -704,7 +712,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.3"
|
version: "0.3.3"
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
@@ -787,10 +795,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: fluwx
|
name: fluwx
|
||||||
sha256: "61e572248c38a775ad44731e2ec7c4b52cae673eda58222b5432ed721205471c"
|
sha256: "9db31d54043363c9c8283b5f0bc4df982edb45ba19d800df9d7de96a205371ae"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.6.0"
|
version: "5.7.0"
|
||||||
font_awesome_flutter:
|
font_awesome_flutter:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -835,10 +843,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: geocoding_ios
|
name: geocoding_ios
|
||||||
sha256: "43bde988312feb1a3cb6c3d514e9f4b04b564d1884fa56bd8241030bbb3bde36"
|
sha256: "18ab1c8369e2b0dcb3a8ccc907319334f35ee8cf4cfef4d9c8e23b13c65cb825"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.1.0"
|
||||||
geocoding_platform_interface:
|
geocoding_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1007,6 +1015,22 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.0"
|
version: "4.1.0"
|
||||||
|
hive:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: hive
|
||||||
|
sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941"
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.3"
|
||||||
|
hive_flutter:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: hive_flutter
|
||||||
|
sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
html:
|
html:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -2048,10 +2072,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: unorm_dart
|
name: unorm_dart
|
||||||
sha256: "23d8bf65605401a6a32cff99435fed66ef3dab3ddcad3454059165df46496a3b"
|
sha256: "8e3870a1caa60bde8352f9597dd3535d8068613269444f8e35ea8925ec84c1f5"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.1+1"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -1,232 +1,120 @@
|
|||||||
// import 'dart:io';
|
|
||||||
|
|
||||||
// void main(List<String> args) async {
|
|
||||||
// final targetPath = args.isNotEmpty ? args[0] : Directory.current.path;
|
|
||||||
// final type = FileSystemEntity.typeSync(targetPath);
|
|
||||||
|
|
||||||
// if (type == FileSystemEntityType.notFound) {
|
|
||||||
// print('路径不存在: $targetPath');
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (type == FileSystemEntityType.file && targetPath.endsWith('.dart')) {
|
|
||||||
// await processDartFile(File(targetPath));
|
|
||||||
// } else if (type == FileSystemEntityType.directory) {
|
|
||||||
// final directory = Directory(targetPath);
|
|
||||||
// print('扫描目录: $targetPath');
|
|
||||||
|
|
||||||
// await for (final entity
|
|
||||||
// in directory.list(recursive: true, followLinks: false)) {
|
|
||||||
// if (entity is File && entity.path.endsWith('.dart')) {
|
|
||||||
// await processDartFile(entity);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// print('处理完成');
|
|
||||||
// } else {
|
|
||||||
// print('不支持的路径类型: $targetPath');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future<void> processDartFile(File file) async {
|
|
||||||
// final content = await file.readAsString();
|
|
||||||
|
|
||||||
// // 获取注释范围
|
|
||||||
// final commentRanges = getCommentRanges(content);
|
|
||||||
|
|
||||||
// // 匹配带中文的引号字符串(单/双引号)
|
|
||||||
// final regex = RegExp(r'''(['"])([^'"]*?[\u4e00-\u9fa5][^'"]*?)\1''');
|
|
||||||
|
|
||||||
// final matches = regex.allMatches(content).toList();
|
|
||||||
// if (matches.isEmpty) return;
|
|
||||||
|
|
||||||
// final sb = StringBuffer();
|
|
||||||
// int lastIndex = 0;
|
|
||||||
|
|
||||||
// for (final match in matches) {
|
|
||||||
// final start = match.start;
|
|
||||||
// final end = match.end;
|
|
||||||
|
|
||||||
// // 跳过注释中的内容
|
|
||||||
// if (commentRanges.any((range) => start >= range[0] && start < range[1])) {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 插入上次结束到当前匹配之间的代码
|
|
||||||
// sb.write(content.substring(lastIndex, start));
|
|
||||||
|
|
||||||
// final fullMatch = match.group(0)!;
|
|
||||||
|
|
||||||
// // 判断是否已处于 .tr 表达式中
|
|
||||||
// if (isAlreadyTrCall(content, start, end)) {
|
|
||||||
// sb.write(fullMatch); // 不修改
|
|
||||||
// } else {
|
|
||||||
// sb.write('$fullMatch.tr'); // 添加 .tr
|
|
||||||
// }
|
|
||||||
|
|
||||||
// lastIndex = end;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// sb.write(content.substring(lastIndex));
|
|
||||||
|
|
||||||
// final result = sb.toString();
|
|
||||||
// if (result != content) {
|
|
||||||
// await file.writeAsString(result);
|
|
||||||
// print('✅ 修改完成: ${file.path}');
|
|
||||||
// } else {
|
|
||||||
// print('✔ 无需修改: ${file.path}');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// 判断该字符串是否已是 .tr 调用的一部分
|
|
||||||
// bool isAlreadyTrCall(String content, int start, int end) {
|
|
||||||
// final after = content.substring(end);
|
|
||||||
// final before = content.substring(0, start);
|
|
||||||
|
|
||||||
// // 检查匹配后是否直接跟 .tr (允许空格)
|
|
||||||
// final hasTrAfter = RegExp(r'^\s*\.tr\b').hasMatch(after);
|
|
||||||
|
|
||||||
// // 检查匹配前是否已经出现 .tr (形如 .tr'xxx' 也考虑在内)
|
|
||||||
// final hasTrBefore = RegExp(r'\.tr\s*$').hasMatch(before);
|
|
||||||
|
|
||||||
// return hasTrAfter || hasTrBefore;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// 找出所有注释区间 (start, end)
|
|
||||||
// List<List<int>> getCommentRanges(String content) {
|
|
||||||
// final ranges = <List<int>>[];
|
|
||||||
|
|
||||||
// final multiLine = RegExp(r'/\*[\s\S]*?\*/');
|
|
||||||
// final singleLine = RegExp(r'//.*');
|
|
||||||
|
|
||||||
// for (final m in multiLine.allMatches(content)) {
|
|
||||||
// ranges.add([m.start, m.end]);
|
|
||||||
// }
|
|
||||||
// for (final m in singleLine.allMatches(content)) {
|
|
||||||
// ranges.add([m.start, m.end]);
|
|
||||||
// }
|
|
||||||
// return ranges;
|
|
||||||
// }
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
void main(List<String> args) async {
|
void main(List<String> args) async {
|
||||||
if (args.length < 2) {
|
// 默认使用当前目录和同级目录下的 chinese_texts.json
|
||||||
print('Usage: dart script.dart <target_path> <json_file_path>');
|
final targetPath = args.isNotEmpty ? args[0] : Directory.current.path;
|
||||||
return;
|
final jsonFilePath = args.length > 1 ? args[1] : 'chinese_texts.json';
|
||||||
}
|
|
||||||
|
|
||||||
final targetPath = args[0];
|
print('目标路径: $targetPath');
|
||||||
final jsonFilePath = args[1];
|
print('JSON文件: $jsonFilePath');
|
||||||
|
|
||||||
// 加载JSON文件
|
// 加载JSON文件
|
||||||
final jsonFile = File(jsonFilePath);
|
final jsonFile = File(jsonFilePath);
|
||||||
if (!jsonFile.existsSync()) {
|
if (!jsonFile.existsSync()) {
|
||||||
print('JSON file not found: $jsonFilePath');
|
print('错误: JSON文件不存在: $jsonFilePath');
|
||||||
return;
|
print('请确保文件存在或提供完整路径');
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
final jsonContent = await jsonFile.readAsString();
|
final jsonContent = await jsonFile.readAsString();
|
||||||
final jsonMap = json.decode(jsonContent) as Map<String, dynamic>;
|
final jsonMap = json.decode(jsonContent) as Map<String, dynamic>;
|
||||||
final targetKeys = jsonMap.keys.toSet();
|
final targetKeys = jsonMap.keys.toSet();
|
||||||
|
|
||||||
|
// 检查目标路径类型
|
||||||
final type = FileSystemEntity.typeSync(targetPath);
|
final type = FileSystemEntity.typeSync(targetPath);
|
||||||
|
|
||||||
if (type == FileSystemEntityType.notFound) {
|
if (type == FileSystemEntityType.notFound) {
|
||||||
print('Path not found: $targetPath');
|
print('错误: 目标路径不存在: $targetPath');
|
||||||
return;
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int modifiedCount = 0;
|
||||||
|
int processedCount = 0;
|
||||||
|
|
||||||
if (type == FileSystemEntityType.file && targetPath.endsWith('.dart')) {
|
if (type == FileSystemEntityType.file && targetPath.endsWith('.dart')) {
|
||||||
await processDartFile(File(targetPath), targetKeys);
|
// 处理单个文件
|
||||||
|
processedCount = 1;
|
||||||
|
if (await processDartFile(File(targetPath), targetKeys)) {
|
||||||
|
modifiedCount++;
|
||||||
|
}
|
||||||
} else if (type == FileSystemEntityType.directory) {
|
} else if (type == FileSystemEntityType.directory) {
|
||||||
final directory = Directory(targetPath);
|
// 处理目录
|
||||||
print('Scanning directory: $targetPath');
|
print('开始扫描Dart文件...');
|
||||||
|
await for (final entity in Directory(targetPath).list(recursive: true)) {
|
||||||
await for (final entity
|
|
||||||
in directory.list(recursive: true, followLinks: false)) {
|
|
||||||
if (entity is File && entity.path.endsWith('.dart')) {
|
if (entity is File && entity.path.endsWith('.dart')) {
|
||||||
await processDartFile(entity, targetKeys);
|
processedCount++;
|
||||||
|
if (await processDartFile(entity, targetKeys)) {
|
||||||
|
modifiedCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print('Processing completed');
|
|
||||||
} else {
|
} else {
|
||||||
print('Unsupported path type: $targetPath');
|
print('错误: 不支持的路径类型: $targetPath');
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print('\n处理结果:');
|
||||||
|
print('扫描文件: $processedCount');
|
||||||
|
print('修改文件: $modifiedCount');
|
||||||
|
print('未修改文件: ${processedCount - modifiedCount}');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> processDartFile(File file, Set<String> targetKeys) async {
|
Future<bool> processDartFile(File file, Set<String> targetKeys) async {
|
||||||
|
try {
|
||||||
final content = await file.readAsString();
|
final content = await file.readAsString();
|
||||||
final commentRanges = getCommentRanges(content);
|
final commentRanges = getCommentRanges(content);
|
||||||
final regex = RegExp(r'''(['"])([^'"]*?[\u4e00-\u9fa5][^'"]*?)\1''');
|
final regex = RegExp(r'''(['"])((?:\\.|[^\\])*?)\1''');
|
||||||
|
|
||||||
final matches = regex.allMatches(content).toList();
|
final buffer = StringBuffer();
|
||||||
if (matches.isEmpty) {
|
|
||||||
print('✓ No matches in: ${file.path}');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final sb = StringBuffer();
|
|
||||||
int lastIndex = 0;
|
int lastIndex = 0;
|
||||||
bool hasChanges = false;
|
bool hasChanges = false;
|
||||||
|
|
||||||
for (final match in matches) {
|
for (final match in regex.allMatches(content)) {
|
||||||
final start = match.start;
|
final start = match.start;
|
||||||
final end = match.end;
|
final end = match.end;
|
||||||
|
final text = match.group(2)!;
|
||||||
|
|
||||||
// 跳过注释中的内容
|
// 跳过注释
|
||||||
if (commentRanges.any((range) => start >= range[0] && start < range[1])) {
|
if (commentRanges.any((r) => start >= r[0] && start < r[1])) {
|
||||||
sb.write(content.substring(lastIndex, end));
|
buffer.write(content.substring(lastIndex, end));
|
||||||
lastIndex = end;
|
lastIndex = end;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final fullMatch = match.group(0)!;
|
// 检查是否是需要国际化的字符串
|
||||||
final textContent = match.group(2)!;
|
if (targetKeys.contains(text) && !isAlreadyTrCall(content, end)) {
|
||||||
|
buffer.write(content.substring(lastIndex, end));
|
||||||
// 检查是否在目标keys中
|
buffer.write('.tr');
|
||||||
if (targetKeys.contains(textContent)) {
|
lastIndex = end;
|
||||||
// 检查是否已经包含.tr
|
|
||||||
if (!isAlreadyTrCall(content, start, end)) {
|
|
||||||
sb.write(content.substring(lastIndex, start));
|
|
||||||
sb.write('$fullMatch.tr');
|
|
||||||
hasChanges = true;
|
hasChanges = true;
|
||||||
lastIndex = end;
|
|
||||||
} else {
|
|
||||||
sb.write(content.substring(lastIndex, end));
|
|
||||||
lastIndex = end;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sb.write(content.substring(lastIndex, end));
|
|
||||||
lastIndex = end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.write(content.substring(lastIndex));
|
|
||||||
|
|
||||||
if (hasChanges) {
|
if (hasChanges) {
|
||||||
await file.writeAsString(sb.toString());
|
buffer.write(content.substring(lastIndex));
|
||||||
print('✓ Modified: ${file.path}');
|
await file.writeAsString(buffer.toString());
|
||||||
} else {
|
print('已修改: ${file.path}');
|
||||||
print('✓ No changes needed: ${file.path}');
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} catch (e) {
|
||||||
|
print('处理 ${file.path} 出错: $e');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAlreadyTrCall(String content, int start, int end) {
|
bool isAlreadyTrCall(String content, int endIndex) {
|
||||||
// 检查字符串后面是否紧跟.tr
|
return endIndex < content.length &&
|
||||||
final afterString = content.substring(end);
|
content.substring(endIndex).trim().startsWith('.tr');
|
||||||
return RegExp(r'^\s*\.tr\b').hasMatch(afterString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<List<int>> getCommentRanges(String content) {
|
List<List<int>> getCommentRanges(String content) {
|
||||||
final ranges = <List<int>>[];
|
final ranges = <List<int>>[];
|
||||||
final multiLine = RegExp(r'/\*[\s\S]*?\*/');
|
ranges.addAll(RegExp(r'/\*.*?\*/', dotAll: true)
|
||||||
final singleLine = RegExp(r'//.*');
|
.allMatches(content)
|
||||||
|
.map((m) => [m.start, m.end]));
|
||||||
for (final m in multiLine.allMatches(content)) {
|
ranges.addAll(RegExp(r'//.*?$', multiLine: true)
|
||||||
ranges.add([m.start, m.end]);
|
.allMatches(content)
|
||||||
}
|
.map((m) => [m.start, m.end]));
|
||||||
for (final m in singleLine.allMatches(content)) {
|
|
||||||
ranges.add([m.start, m.end]);
|
|
||||||
}
|
|
||||||
return ranges;
|
return ranges;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user