Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
3e44d1a6
Commit
3e44d1a6
authored
Jul 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
3350f491
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
4 deletions
+38
-4
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+8
-2
MainRouter.dart
lib/MainRouter/MainRouter.dart
+3
-0
MainRouterImpl.dart
lib/MainRouter/MainRouterImpl.dart
+5
-0
MainManager.dart
lib/MainRouter/manager/MainManager.dart
+22
-2
No files found.
lib/ClueModel/page/plan/PlanPage.dart
View file @
3e44d1a6
...
@@ -64,7 +64,13 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -64,7 +64,13 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
print
(
"LSY PLAN INIT"
);
print
(
"LSY PLAN INIT"
);
// DioUtil.getInstance().setProxy("172.30.8.245");
// DioUtil.getInstance().setProxy("172.30.8.245");
super
.
initState
();
super
.
initState
();
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
)
{
RouterCenterImpl
().
findMainRouter
().
getInitParams
().
whenComplete
(()
{
_model
.
init
();
_model
.
init
();
});
}
else
{
_model
.
init
();
}
planBarView
=
planBarView
=
PlanBarView
(
_model
.
managerLive
,
clickIndex
,
hideAllMenuListener
);
PlanBarView
(
_model
.
managerLive
,
clickIndex
,
hideAllMenuListener
);
}
}
...
@@ -181,9 +187,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -181,9 +187,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
maxHeight:
450
,
maxHeight:
450
,
listener:
projectMenuListener
,
listener:
projectMenuListener
,
child:
ProjectView
(
_model
.
projectData
,
(
id
,
name
)
{
child:
ProjectView
(
_model
.
projectData
,
(
id
,
name
)
{
clickIndexOther
(
0
);
clickIndexOther
(
0
);
_model
.
projectClick
(
id
,
name
);
_model
.
projectClick
(
id
,
name
);
}),
}),
proListener:
(
pro
)
{
proListener:
(
pro
)
{
_model
.
backProgress
(
pro
,
0
);
_model
.
backProgress
(
pro
,
0
);
...
...
lib/MainRouter/MainRouter.dart
View file @
3e44d1a6
...
@@ -20,4 +20,7 @@ abstract class MainRouter extends RouterBaser {
...
@@ -20,4 +20,7 @@ abstract class MainRouter extends RouterBaser {
Widget
getProxyPage
();
Widget
getProxyPage
();
void
catchErrorToBugly
(
String
err
);
void
catchErrorToBugly
(
String
err
);
Future
getInitParams
();
}
}
lib/MainRouter/MainRouterImpl.dart
View file @
3e44d1a6
...
@@ -41,4 +41,9 @@ class MainRouterImpl implements MainRouter {
...
@@ -41,4 +41,9 @@ class MainRouterImpl implements MainRouter {
void
catchErrorToBugly
(
String
err
)
{
void
catchErrorToBugly
(
String
err
)
{
MainManager
.
getInstance
().
catchErrorToBugly
(
err
);
MainManager
.
getInstance
().
catchErrorToBugly
(
err
);
}
}
@override
Future
getInitParams
()
{
return
MainManager
.
getInstance
().
getInitParams
();
}
}
}
lib/MainRouter/manager/MainManager.dart
View file @
3e44d1a6
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
* @author lsy
* @author lsy
* @date 2020/6/29
* @date 2020/6/29
**/
**/
import
'dart:async'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
...
@@ -39,6 +41,12 @@ class MainManager {
...
@@ -39,6 +41,12 @@ class MainManager {
if
(
data
is
Map
)
{
if
(
data
is
Map
)
{
print
(
"LSY STATEINIT OKKK
${data}
"
);
print
(
"LSY STATEINIT OKKK
${data}
"
);
var
map
=
Map
<
String
,
dynamic
>.
from
(
data
);
var
map
=
Map
<
String
,
dynamic
>.
from
(
data
);
initParams
(
map
);
}
});
}
void
initParams
(
Map
<
String
,
dynamic
>
map
)
{
innerSetData
(
map
,
APP_NAME
);
innerSetData
(
map
,
APP_NAME
);
innerSetData
(
map
,
VERSION
);
innerSetData
(
map
,
VERSION
);
innerSetData
(
map
,
PLATFORM
);
innerSetData
(
map
,
PLATFORM
);
...
@@ -77,8 +85,6 @@ class MainManager {
...
@@ -77,8 +85,6 @@ class MainManager {
"LSY QQWWEERRTTYY
${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}
"
);
"LSY QQWWEERRTTYY
${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}
"
);
DioUtil
.
getInstance
().
changeOpt
();
DioUtil
.
getInstance
().
changeOpt
();
}
}
});
}
void
innerSetData
(
Map
<
String
,
dynamic
>
map
,
String
str
)
{
void
innerSetData
(
Map
<
String
,
dynamic
>
map
,
String
str
)
{
if
(
map
[
str
]
!=
null
&&
"
${map[str]}
"
.
isNotEmpty
)
{
if
(
map
[
str
]
!=
null
&&
"
${map[str]}
"
.
isNotEmpty
)
{
...
@@ -103,4 +109,18 @@ class MainManager {
...
@@ -103,4 +109,18 @@ class MainManager {
flutterChannel
.
invokeMethod
(
"wrong_report_bugly"
,
err
??
""
);
flutterChannel
.
invokeMethod
(
"wrong_report_bugly"
,
err
??
""
);
}
}
}
}
Future
getInitParams
()
async
{
Completer
completer
=
Completer
();
if
(
isInit
)
{
if
(
flutterChannel
!=
null
)
{
var
data
=
await
flutterChannel
.
invokeMethod
(
"get_common_params"
);
if
(
data
is
Map
)
{
initParams
(
data
);
}
}
}
completer
.
complete
();
return
completer
.
future
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment