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
11a4f46c
Commit
11a4f46c
authored
Jul 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
44fc10b9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
13 deletions
+63
-13
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+3
-1
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+3
-1
PlanList.dart
lib/ClueModel/page/plan/PlanList.dart
+30
-0
PlanModel.dart
lib/ClueModel/page/plan/PlanModel.dart
+12
-1
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+0
-0
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+4
-1
PlanBean.dart
lib/ClueModel/server/entity/PlanBean.dart
+1
-1
PlanFeedBean.dart
lib/ClueModel/server/entity/PlanFeedBean.dart
+3
-3
MainManager.dart
lib/MainRouter/manager/MainManager.dart
+7
-5
No files found.
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
11a4f46c
...
@@ -125,7 +125,9 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -125,7 +125,9 @@ class LevelOneState extends BaseState<LevelOnePage>
_model
.
init
(()
{
_model
.
init
(()
{
_initTabBar
();
_initTabBar
();
});
});
})));
},
paddingTop:
stateBarHeight
+
kToolbarHeight
)
)
);
}
}
Widget
newHomeWarp
()
{
Widget
newHomeWarp
()
{
...
...
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
View file @
11a4f46c
...
@@ -130,7 +130,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -130,7 +130,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
_model
.
init
(()
{
_model
.
init
(()
{
_initTabBar
();
_initTabBar
();
});
});
})));
},
paddingTop:
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
+
kToolbarHeight
)));
}
}
Widget
newHomeWarp
()
{
Widget
newHomeWarp
()
{
...
...
lib/ClueModel/page/plan/PlanList.dart
0 → 100644
View file @
11a4f46c
/*
* @author lsy
* @date 2020/7/8
**/
import
'package:flutter/cupertino.dart'
;
class
PlanList
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
PlanListState
();
}
class
PlanListState
extends
State
<
PlanList
>{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
}
@override
void
dispose
()
{
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
}
}
\ No newline at end of file
lib/ClueModel/page/plan/PlanModel.dart
View file @
11a4f46c
...
@@ -40,10 +40,11 @@ class PlanModel extends BaseModel {
...
@@ -40,10 +40,11 @@ class PlanModel extends BaseModel {
String
min_price
=
""
;
String
min_price
=
""
;
String
max_price
=
""
;
String
max_price
=
""
;
String
rank_type
=
""
;
String
rank_type
=
""
;
int
page
=
1
;
int
page
=
1
;
int
sortPos
=
0
;
int
sortPos
=
0
;
void
init
()
{
void
init
(
{
VoidCallback
call
}
)
{
ClueApiImpl
.
getInstance
()
ClueApiImpl
.
getInstance
()
.
getPlan
(
DioUtil
.
getInstance
().
getDio
())
.
getPlan
(
DioUtil
.
getInstance
().
getDio
())
.
listen
((
event
)
{
.
listen
((
event
)
{
...
@@ -52,6 +53,9 @@ class PlanModel extends BaseModel {
...
@@ -52,6 +53,9 @@ class PlanModel extends BaseModel {
sortList
=
event
.
data
.
orders
;
sortList
=
event
.
data
.
orders
;
picLive
.
notifyView
(
event
.
data
.
ranks
);
picLive
.
notifyView
(
event
.
data
.
ranks
);
stateLive
.
notifyView
(
ENDLOADING
);
stateLive
.
notifyView
(
ENDLOADING
);
if
(
call
!=
null
)
{
call
();
}
refreshFeed
(
true
);
refreshFeed
(
true
);
}
else
{
}
else
{
stateLive
.
notifyView
(
FAIL
);
stateLive
.
notifyView
(
FAIL
);
...
@@ -77,6 +81,7 @@ class PlanModel extends BaseModel {
...
@@ -77,6 +81,7 @@ class PlanModel extends BaseModel {
void
refreshFeed
(
bool
clear
,
{
RefreshController
controller
})
{
void
refreshFeed
(
bool
clear
,
{
RefreshController
controller
})
{
if
(
clear
)
{
if
(
clear
)
{
page
=
1
;
feedDatas
.
clear
();
feedDatas
.
clear
();
}
}
ClueApiImpl
.
getInstance
()
ClueApiImpl
.
getInstance
()
...
@@ -85,7 +90,11 @@ class PlanModel extends BaseModel {
...
@@ -85,7 +90,11 @@ class PlanModel extends BaseModel {
.
listen
((
event
)
{
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
if
(
page
==
1
){
feedsLive
.
notifyView
(
Pair
(
EMPTY
,
[]));
}
else
{
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
}
}
else
{
}
else
{
feedDatas
.
addAll
(
event
.
data
.
plans
);
feedDatas
.
addAll
(
event
.
data
.
plans
);
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
feedDatas
));
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
feedDatas
));
...
@@ -134,6 +143,7 @@ class PlanModel extends BaseModel {
...
@@ -134,6 +143,7 @@ class PlanModel extends BaseModel {
}
}
sortPos
=
index
;
sortPos
=
index
;
order_by
=
sortList
[
index
].
id
.
toString
();
order_by
=
sortList
[
index
].
id
.
toString
();
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
refreshFeed
(
true
);
refreshFeed
(
true
);
}
}
...
@@ -143,6 +153,7 @@ class PlanModel extends BaseModel {
...
@@ -143,6 +153,7 @@ class PlanModel extends BaseModel {
}
}
max_price
=
max
.
toString
();
max_price
=
max
.
toString
();
min_price
=
min
.
toString
();
min_price
=
min
.
toString
();
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
refreshFeed
(
true
);
refreshFeed
(
true
);
}
}
}
}
lib/ClueModel/page/plan/PlanPage.dart
View file @
11a4f46c
This diff is collapsed.
Click to expand it.
lib/ClueModel/page/top/TopPage.dart
View file @
11a4f46c
...
@@ -43,6 +43,7 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -43,6 +43,7 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
@override
@override
void
initState
()
{
void
initState
()
{
// DioUtil.getInstance().setProxy("172.30.8.245");
_model
.
rank_type
=
widget
.
rank_type
;
_model
.
rank_type
=
widget
.
rank_type
;
init
();
init
();
super
.
initState
();
super
.
initState
();
...
@@ -94,7 +95,9 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -94,7 +95,9 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
child:
homeWarp
()),
child:
homeWarp
()),
),
()
{
),
()
{
init
();
init
();
}),
},
paddingTop:
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
+
kToolbarHeight
),
);
);
}
}
...
...
lib/ClueModel/server/entity/PlanBean.dart
View file @
11a4f46c
...
@@ -57,7 +57,7 @@ class Data {
...
@@ -57,7 +57,7 @@ class Data {
tags
=
new
List
<
Tags
>();
tags
=
new
List
<
Tags
>();
json
[
'tags'
].
forEach
((
v
)
{
tags
.
add
(
new
Tags
.
fromJson
(
v
));
});
json
[
'tags'
].
forEach
((
v
)
{
tags
.
add
(
new
Tags
.
fromJson
(
v
));
});
}
}
areas
=
json
[
'areas'
]
!=
null
?
new
Areas
.
fromJson
(
json
[
'areas'
])
:
null
;
//
areas = json['areas'] != null ? new Areas.fromJson(json['areas']) : null;
if
(
json
[
'orders'
]
!=
null
)
{
if
(
json
[
'orders'
]
!=
null
)
{
orders
=
new
List
<
Orders
>();
orders
=
new
List
<
Orders
>();
json
[
'orders'
].
forEach
((
v
)
{
orders
.
add
(
new
Orders
.
fromJson
(
v
));
});
json
[
'orders'
].
forEach
((
v
)
{
orders
.
add
(
new
Orders
.
fromJson
(
v
));
});
...
...
lib/ClueModel/server/entity/PlanFeedBean.dart
View file @
11a4f46c
...
@@ -6,7 +6,7 @@ class PlanFeedBean {
...
@@ -6,7 +6,7 @@ class PlanFeedBean {
int
error
;
int
error
;
String
message
;
String
message
;
Map
extra
;
Map
extra
;
Map
errorCode
;
int
errorCode
;
Map
errorExtra
;
Map
errorExtra
;
Data
data
;
Data
data
;
UserType
userType
;
UserType
userType
;
...
@@ -101,8 +101,8 @@ class Plans {
...
@@ -101,8 +101,8 @@ class Plans {
positiveRate
=
json
[
'positive_rate'
];
positiveRate
=
json
[
'positive_rate'
];
salesCount
=
json
[
'sales_count'
];
salesCount
=
json
[
'sales_count'
];
baseAttrs
=
json
[
'base_attrs'
].
cast
<
String
>();
baseAttrs
=
json
[
'base_attrs'
].
cast
<
String
>();
minPrice
=
json
[
'min_price'
];
minPrice
=
json
[
'min_price'
]
is
int
?
"
${json['min_price']}
"
:
json
[
'min_price'
]
;
maxPrice
=
json
[
'max_price'
];
maxPrice
=
json
[
'max_price'
]
is
int
?
"
${json['max_price']}
"
:
json
[
'max_price'
]
;
projectImage
=
json
[
'project_image'
];
projectImage
=
json
[
'project_image'
];
}
}
...
...
lib/MainRouter/manager/MainManager.dart
View file @
11a4f46c
...
@@ -59,18 +59,20 @@ class MainManager {
...
@@ -59,18 +59,20 @@ class MainManager {
innerSetData
(
map
,
IS_WIFI
);
innerSetData
(
map
,
IS_WIFI
);
innerSetData
(
map
,
HARDWARE_MODEL
);
innerSetData
(
map
,
HARDWARE_MODEL
);
innerSetData
(
map
,
USER_ID
);
innerSetData
(
map
,
USER_ID
);
// innerSetData(map, COOKIE);
innerSetData
(
map
,
USER_AGENT
);
innerSetData
(
map
,
USER_AGENT
);
if
(
map
[
COOKIE
]
==
null
)
{
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
COOKIE
,
"_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393"
);
}
else
{
innerSetData
(
map
,
COOKIE
);
}
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
)
{
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
COOKIE
,
"_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393"
);
}
print
(
print
(
"LSY QQWWEERRTTYY
${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}
"
);
"LSY QQWWEERRTTYY
${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}
"
);
DioUtil
.
getInstance
().
changeOpt
();
DioUtil
.
getInstance
().
changeOpt
();
...
...
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