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

commit

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