更新波形图
This commit is contained in:
@@ -31,10 +31,11 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
var bluetooth = 0;
|
||||
List personList = [];
|
||||
List instantData = [];
|
||||
RxBool initFlag = false.obs;
|
||||
|
||||
WebviewTestController() : super(WebviewTestModel()) {
|
||||
web = WebviewHelper(
|
||||
isheadless: true,
|
||||
isheadless: false,
|
||||
jsbridge: buildsdk(
|
||||
// father: this,
|
||||
// clientId: '494641114',
|
||||
@@ -161,6 +162,16 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
bridge.sdk.webPageBuild((args) async {
|
||||
ef.log('网页加载完成: $args[0]');
|
||||
try {
|
||||
initFlag.value = true;
|
||||
return true;
|
||||
} catch (e) {
|
||||
ef.log("[网页加载失败]:$e");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
} catch (e, s) {
|
||||
ef.log('$e,$s');
|
||||
@@ -392,11 +403,11 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
||||
child: Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(
|
||||
() => controller.ready.value
|
||||
child: Obx(() {
|
||||
return controller.ready.value
|
||||
? controller.web.build()
|
||||
: Container(),
|
||||
),
|
||||
: Container();
|
||||
}),
|
||||
),
|
||||
));
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user