合并更新

This commit is contained in:
wyf
2025-07-07 15:57:52 +08:00
parent 471fbc94b7
commit 671ac832a5
12 changed files with 223 additions and 96 deletions

View File

@@ -32,22 +32,17 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
WebviewTestController() : super(WebviewTestModel()) {
web = WebviewHelper(
jsbridge: buildsdk(
<<<<<<< HEAD
// father: this,
// clientId: '494641114',
// dbgserverUrl: 'ws://192.168.1.2:9001',
),
=======
father: this,
clientId: '494641114',
// father: this,
// clientId: '494641114',
// dbgserverUrl: 'ws://192.168.1.2:9001',
),
>>>>>>> 58b2bebe936bdd7239529662ef20b531f2143de4
settings: buildsettings(),
params: PlatformHeadlessInAppWebViewCreationParams(
initialUrlRequest: URLRequest(
url: WebUri(
'https://wyf.it.real.he-info.cn:94/goods-front/index.html'),
// url: WebUri(
// 'http://192.168.1.2:8888'),
),
onLoadStop: (controller, url) {
setState(() => ready.value = true);
@@ -120,7 +115,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
ef.log('queryInstantData: $args');
// bluetooth = args[0];
return instantData;
});
});
bridge.sdk.startTimer((args) async {
ef.log('queryInstantData: $args');
MHTHomeController homeController = Get.find();
@@ -140,19 +135,6 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
return data;
});
});
web
//.file(
// url: 'https://wsl.it.real.he-info.cn:94/webdemo/web.zip',
// pretag: 'https://wsl.it.real.he-info.cn:94/webdemo/',
//)
.network()
.then((value) {
if (value) {
setState(() {
ready.value = true;
});
}
});
} catch (e, s) {
ef.log('$e,$s');
}
@@ -271,6 +253,36 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
ws.connect();
}
//EasyFlutter End
@override
void onInit() {
ef.log("webview test init =>${DateTime.now()}");
super.onInit();
try {
ef.kvRoot.appmanger.find("mhtControl").then((x) {
x!.load().then((y) {
ef.log("webview test res init loaded =>${DateTime.now()}");
web
.file(
url: 'https://wyf.it.real.he-info.cn:94/goods-front/index.html',
pretag: 'https://wyf.it.real.he-info.cn:94/goods-front/',
raw: y,
)
//.network()
.then((value) {
if (value) {
//资源准备完成..
setState(() {
ready.value = true;
});
}
});
});
});
} catch (e, s) {
ef.log('$e,$s');
}
}
}
class WebviewTestView extends GetComponent<WebviewTestController> {