Commit da098708 authored by 林生雨's avatar 林生雨

commit

parent 31ed8fca
...@@ -53,6 +53,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -53,6 +53,7 @@ class LevelOneState extends BaseState<LevelOnePage>
@override @override
void initState() { void initState() {
// DioUtil.getInstance().setProxy("172.30.8.245");
super.initState(); super.initState();
_model.plan_id = widget.planId; _model.plan_id = widget.planId;
_model.init(() { _model.init(() {
......
...@@ -54,9 +54,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -54,9 +54,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
GlobalKey globalKey = GlobalKey(); GlobalKey globalKey = GlobalKey();
PlanBarView planBarView; PlanBarView planBarView;
double stateBarHeight; double stateBarHeight;
double topHeight;
@override @override
void initState() { void initState() {
// DioUtil.getInstance().setProxy("172.30.8.245");
super.initState(); super.initState();
_model.init(); _model.init();
planBarView = planBarView =
...@@ -82,7 +84,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -82,7 +84,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override @override
Widget buildItem(BuildContext context) { Widget buildItem(BuildContext context) {
stateBarHeight = MediaQueryData.fromWindow(window).padding.top; stateBarHeight = MediaQueryData.fromWindow(window).padding.top;
topHeight=stateBarHeight+kToolbarHeight;
return Scaffold( return Scaffold(
body: MediaQuery.removePadding( body: MediaQuery.removePadding(
removeTop: true, removeTop: true,
...@@ -102,7 +104,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -102,7 +104,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height - stateBarHeight, height: MediaQuery.of(context).size.height - topHeight,
child: child(), child: child(),
), ),
StreamBuilder<List<double>>( StreamBuilder<List<double>>(
...@@ -285,7 +287,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -285,7 +287,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
Widget head() { Widget head() {
return Container( return Container(
height: stateBarHeight, height: topHeight,
// child: Container( // child: Container(
// margin: EdgeInsets.only(top: 48, left: 15, right: 15), // margin: EdgeInsets.only(top: 48, left: 15, right: 15),
// width: double.maxFinite, // width: double.maxFinite,
...@@ -454,7 +456,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -454,7 +456,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
double bottom = double bottom =
// WidgetUtil.buttonLeftMenuPosition(globalKey.currentContext)?.top ?? // WidgetUtil.buttonLeftMenuPosition(globalKey.currentContext)?.top ??
topPos == null ? 0.0 : topPos.dy + 45 - stateBarHeight; topPos == null ? 0.0 : topPos.dy + 45 - topHeight;
if (bottom < 45) { if (bottom < 45) {
bottom = 45; bottom = 45;
} }
...@@ -530,7 +532,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -530,7 +532,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
void _onScroll(double offset) { void _onScroll(double offset) {
var topPos = PosUtil.findPos(globalKey); var topPos = PosUtil.findPos(globalKey);
if (topPos != null) { if (topPos != null) {
if (topPos.dy > stateBarHeight) { if (topPos.dy > topHeight) {
_model.showTab.notifyView(false); _model.showTab.notifyView(false);
} else { } else {
_model.showTab.notifyView(true); _model.showTab.notifyView(true);
......
...@@ -36,7 +36,8 @@ class MainManager { ...@@ -36,7 +36,8 @@ class MainManager {
flutterChannel = MethodChannel('gm_method_channel'); flutterChannel = MethodChannel('gm_method_channel');
flutterEvent = EventChannel('gm_method_event'); flutterEvent = EventChannel('gm_method_event');
flutterEvent.receiveBroadcastStream().listen((data) { flutterEvent.receiveBroadcastStream().listen((data) {
if (data is Map<String, String>) { if (data is Map) {
print("LSY STATEINIT OKKK ${data}");
var map = Map<String, String>.from(data); var map = Map<String, String>.from(data);
innerSetData(map, APP_NAME); innerSetData(map, APP_NAME);
innerSetData(map, VERSION); innerSetData(map, VERSION);
...@@ -63,13 +64,15 @@ class MainManager { ...@@ -63,13 +64,15 @@ class MainManager {
innerSetData(map, BASE_URL); innerSetData(map, BASE_URL);
DioUtil.setDefOptions( DioUtil.setDefOptions(
baseUrl: map[BASE_URL] + "/", baseUrl: "${map[BASE_URL]}/",
cookie: map[COOKIE], cookie: map[COOKIE],
agent: map[USER_AGENT]); agent: map[USER_AGENT]);
if(map[COOKIE]==null){ if (map[COOKIE] == null) {
CacheManager.getInstance().get(MEMORY_CACHE).save(COOKIE, CacheManager.getInstance().get(MEMORY_CACHE).save(COOKIE,
"_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393"); "_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393");
} }
print(
"LSY QQWWEERRTTYY ${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}");
DioUtil.getInstance().changeOpt(); DioUtil.getInstance().changeOpt();
} }
}); });
......
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