同步代码

This commit is contained in:
wyf
2025-07-18 15:20:50 +08:00
parent 594b1f31e0
commit 128641184c
4 changed files with 14 additions and 6 deletions

Binary file not shown.

View File

@@ -239,8 +239,8 @@ class _BluetoothPageState extends State<BluetoothPage> {
_buildMenuButton(context, '设备校准', ""), _buildMenuButton(context, '设备校准', ""),
_buildMenuButton(context, '体征传感器', ""), _buildMenuButton(context, '体征传感器', ""),
_buildMenuButton(context, 'WIFI配置', ""), _buildMenuButton(context, 'WIFI配置', ""),
_buildMenuButton( // _buildMenuButton(
context, '睡眠习惯', "/sleepHabitPage"), // context, '睡眠习惯', "/sleepHabitPage"),
_buildMenuButton( _buildMenuButton(
context, '分享设备', "/deviceSharePage", context, '分享设备', "/deviceSharePage",
arguments: obsData), arguments: obsData),
@@ -404,6 +404,11 @@ class _BluetoothPageState extends State<BluetoothPage> {
if (onTap != null) { if (onTap != null) {
onTap(); // 自定义点击逻辑优先执行 onTap(); // 自定义点击逻辑优先执行
} else if (path?.isNotEmpty == true) { } else if (path?.isNotEmpty == true) {
if (path == "/sleepHabitPage") {
WebviewTestController webviewTestController = Get.find();
webviewTestController.web.jsbridge?.dart.toSleepHabit();
return;
}
final result = await Get.toNamed(path!, arguments: arguments); final result = await Get.toNamed(path!, arguments: arguments);
if (result != null && onResult != null) { if (result != null && onResult != null) {
onResult(result); // ✅ 有回调就处理返回值 onResult(result); // ✅ 有回调就处理返回值

View File

@@ -34,7 +34,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
WebviewTestController() : super(WebviewTestModel()) { WebviewTestController() : super(WebviewTestModel()) {
web = WebviewHelper( web = WebviewHelper(
isheadless: false, isheadless: true,
jsbridge: buildsdk( jsbridge: buildsdk(
// father: this, // father: this,
// clientId: '494641114', // clientId: '494641114',
@@ -44,9 +44,9 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
params: PlatformHeadlessInAppWebViewCreationParams( params: PlatformHeadlessInAppWebViewCreationParams(
onLoadStop: (controller, url) { onLoadStop: (controller, url) {
setState(() => ready.value = true); setState(() => ready.value = true);
MHTHomeController deviceController = Get.find(); // MHTHomeController deviceController = Get.find();
web.jsbridge!.dart // web.jsbridge!.dart
.updateDeviceList(deviceController.deviceList.values); // .updateDeviceList(deviceController.deviceList.values);
}, },
), ),
); );
@@ -129,6 +129,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
return true; return true;
}); });
bridge.sdk.restoreTimer((args) async { bridge.sdk.restoreTimer((args) async {
ef.log('更新定时: $args[0]');
ef.log('queryInstantData: $args'); ef.log('queryInstantData: $args');
MHTHomeController homeController = Get.find(); MHTHomeController homeController = Get.find();
var data = await homeController.restoreTimer(args); var data = await homeController.restoreTimer(args);

View File

@@ -1272,6 +1272,8 @@ class MHTLoginPage extends GetView<MHTLoginController> {
.model.register_agree = false; .model.register_agree = false;
Get.offAndToNamed( Get.offAndToNamed(
"/mianPageBottomChange"); "/mianPageBottomChange");
//登陆成功
//
} }
}, },
colors: [ colors: [