更新小e界面
This commit is contained in:
@@ -7,7 +7,6 @@ import 'package:easyweb/base/easyws.dart';
|
||||
import 'package:easyweb/base/minisdk.dart';
|
||||
import 'package:easyweb/easyweb.dart';
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
@@ -35,8 +34,8 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
web = WebviewHelper(
|
||||
isheadless: true,
|
||||
jsbridge: buildsdk(
|
||||
// father: this,
|
||||
// clientId: '494641114',
|
||||
father: this,
|
||||
clientId: '494641114',
|
||||
// dbgserverUrl: 'ws://192.168.1.2:9001',
|
||||
),
|
||||
settings: buildsettings(),
|
||||
@@ -147,14 +146,6 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
ef.log('$e,$s');
|
||||
}
|
||||
|
||||
// try {
|
||||
// web.runApp('mhtControl').then((x) {
|
||||
// ready.value = true;
|
||||
// web.build();
|
||||
// });
|
||||
// } catch (e, s) {
|
||||
// ef.log('$e,$s');
|
||||
// }
|
||||
}
|
||||
late WebviewHelper web;
|
||||
var ready = false.obs;
|
||||
@@ -193,7 +184,7 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
try {
|
||||
var tmp;
|
||||
if (data is String) {
|
||||
tmp = jsonDecode(data); // 只有是 String 才 decode
|
||||
tmp = jsonDecode(data);
|
||||
} else if (data is Map<String, dynamic>) {
|
||||
tmp = data; // 直接用
|
||||
} else {
|
||||
@@ -275,26 +266,10 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
||||
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;
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
web.runApp('mhtControl').then((x) {
|
||||
ready.value = true;
|
||||
});
|
||||
} catch (e, s) {
|
||||
ef.log('$e,$s');
|
||||
|
||||
Reference in New Issue
Block a user