Commit 73e3d6da authored by 林生雨's avatar 林生雨

w

parent 7f380552
......@@ -65,7 +65,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
// DioUtil.getInstance().setProxy("172.30.8.245");
super.initState();
if (CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE) == null) {
RouterCenterImpl().findMainRouter().getInitParams().whenComplete(() {
RouterCenterImpl().findMainRouter().getInitParams().then((va) {
_model.init();
});
} else {
......
......@@ -69,11 +69,8 @@ class MainManager {
innerSetData(map, USER_ID);
innerSetData(map, USER_AGENT);
innerSetData(map, BASE_URL);
DioUtil.setDefOptions(
baseUrl: "${map[BASE_URL]}/",
agent: map[USER_AGENT]);
DioUtil.setDefOptions(baseUrl: "${map[BASE_URL]}/", agent: map[USER_AGENT]);
if (map[COOKIE] == null) {
CacheManager.getInstance().get(MEMORY_CACHE).save(COOKIE,
"_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393");
......@@ -111,7 +108,7 @@ class MainManager {
}
Future getInitParams() async {
Completer completer = Completer();
// Completer completer = Completer();
if (isInit) {
if (flutterChannel != null) {
var data = await flutterChannel.invokeMethod("get_common_params");
......@@ -121,7 +118,7 @@ class MainManager {
}
}
}
completer.complete();
return completer.future;
// completer.complete();
return Future.value("");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment