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
0bf3f8ad
Commit
0bf3f8ad
authored
Jul 04, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zx/gmFlutter' into 'test'
Zx/gm flutter See merge request
!8
parents
26f0dd26
adcd8565
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
496 additions
and
16 deletions
+496
-16
discuss_loe_price_auth.png
assets/discuss_loe_price_auth.png
+0
-0
discuss_loe_price_cancel.png
assets/discuss_loe_price_cancel.png
+0
-0
discuss_loe_price_like.png
assets/discuss_loe_price_like.png
+0
-0
ClueRouterImpl.dart
lib/ClueModel/ClueRouterImpl.dart
+3
-1
DiscussLowPriceModel.dart
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
+68
-0
DiscussLowPricePopView.dart
...lueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
+182
-0
PlanCompareDetailModel.dart
...eModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
+1
-0
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+1
-7
ClueApi.dart
lib/ClueModel/server/api/ClueApi.dart
+14
-1
ClueApi.serv.dart
lib/ClueModel/server/api/ClueApi.serv.dart
+46
-2
DiscussLowPriceAuthBean.dart
lib/ClueModel/server/entity/DiscussLowPriceAuthBean.dart
+76
-0
DiscussLowPriceModelBean.dart
lib/ClueModel/server/entity/DiscussLowPriceModelBean.dart
+97
-0
TestPage.dart
lib/MainRouter/page/test/TestPage.dart
+8
-5
No files found.
assets/discuss_loe_price_auth.png
0 → 100644
View file @
0bf3f8ad
8.46 KB
assets/discuss_loe_price_cancel.png
0 → 100644
View file @
0bf3f8ad
645 Bytes
assets/discuss_loe_price_like.png
0 → 100644
View file @
0bf3f8ad
1.18 KB
lib/ClueModel/ClueRouterImpl.dart
View file @
0bf3f8ad
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* @author lsy
* @author lsy
* @date 2020/6/24
* @date 2020/6/24
**/
**/
import
'package:flutter/material.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:gm_flutter/ClueModel/ClueRouter.dart'
;
import
'package:gm_flutter/ClueModel/ClueRouter.dart'
;
import
'package:gm_flutter/ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart'
;
import
'package:gm_flutter/ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart'
;
...
@@ -22,7 +23,7 @@ class ClueRouterImpl implements ClueRouter {
...
@@ -22,7 +23,7 @@ class ClueRouterImpl implements ClueRouter {
Widget
getLevelOnePage
()
{
Widget
getLevelOnePage
()
{
return
LevelOnePage
();
return
LevelOnePage
();
}
}
@override
@override
Widget
getLevelTwoPage
()
{
Widget
getLevelTwoPage
()
{
return
LevelTwoPage
();
return
LevelTwoPage
();
...
@@ -38,6 +39,7 @@ class ClueRouterImpl implements ClueRouter {
...
@@ -38,6 +39,7 @@ class ClueRouterImpl implements ClueRouter {
return
PlanPage
();
return
PlanPage
();
}
}
@override
Widget
getPlanCompareDetailPage
()
{
Widget
getPlanCompareDetailPage
()
{
return
PlanCompareDetailPage
();
return
PlanCompareDetailPage
();
}
}
...
...
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
0 → 100644
View file @
0bf3f8ad
/*
* @Author: zx
* @Date: 2020-07-03 20:54:59
* @Last Modified by: zx
* @Last Modified time: 2020-07-04 12:20:45
*/
import
'package:flutter_common/commonModel/live/BaseModel.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
import
'package:gm_flutter/ClueModel/server/api/ClueApi.serv.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/rx/RxDispose.dart'
;
import
'package:flutter_common/commonModel/toast/NativeToast.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceModelBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceAuthBean.dart'
;
class
DiscussLowPriceModel
extends
BaseModel
{
LiveData
<
Pair
<
int
,
DiscussLowPriceModelBean
>>
popViewLive
=
LiveData
();
LiveData
<
bool
>
phoneAuthLive
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
fetchPopviewData
(
String
planId
,
String
hospitalId
,
String
doctorId
)
{
ClueApiImpl
.
getInstance
()
.
getPopviewData
(
DioUtil
.
getInstance
().
getDio
(),
planId
,
hospitalId
,
doctorId
)
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
data
==
null
)
{
popViewLive
.
notifyView
(
Pair
(
ENDLOADING
,
null
));
}
else
{
popViewLive
.
notifyView
(
Pair
(
ENDLOADING
,
event
.
data
));
}
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
popViewLive
.
notifyView
(
Pair
(
FAIL
,
null
));
}
})
.
addToDispose
(
rxDispose
)
.
onError
((
err
)
{
popViewLive
.
notifyView
(
Pair
(
FAIL
,
null
));
NativeToast
.
showNativeToast
(
err
.
message
);
});
}
givePhoneAuth
(
int
leadPhoneRequestId
)
{
ClueApiImpl
.
getInstance
()
.
givePhoneAuth
(
DioUtil
.
getInstance
().
getDio
(),
leadPhoneRequestId
)
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
phoneAuthLive
.
notifyView
(
event
.
data
.
success
);
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
phoneAuthLive
.
notifyView
(
false
);
}
})
.
addToDispose
(
rxDispose
)
.
onError
((
err
)
{
phoneAuthLive
.
notifyView
(
false
);
NativeToast
.
showNativeToast
(
err
.
message
);
});
}
@override
void
dispose
()
{
popViewLive
.
dispost
();
}
}
lib/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
0 → 100644
View file @
0bf3f8ad
/*
* @Author: zx
* @Date: 2020-07-03 13:53:16
* @Last Modified by: zx
* @Last Modified time: 2020-07-04 12:48:35
*/
import
'package:flutter/material.dart'
;
import
'package:flutter_common/commonModel/picker/base/BaseCenterPicker.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
class
DiscussLowPricePopView
{
static
void
showPopView
(
BuildContext
content
)
{
BaseCenterPicker
()
..
setPicker
(
_PopView
())
..
show
(
content
);
}
}
class
_PopView
implements
ICenterPicker
{
VoidCallback
dismissCallback
;
double
contentWidth
;
DiscussLowPriceModel
_model
=
new
DiscussLowPriceModel
();
@override
Widget
build
(
BuildContext
context
,
int
alp
)
{
contentWidth
=
MediaQuery
.
of
(
context
).
size
.
width
-
72
;
return
StreamBuilder
(
stream:
_model
.
popViewLive
.
stream
,
initialData:
_model
.
popViewLive
??
Pair
(
LOADING
,
null
),
builder:
(
c
,
data
)
{
if
(
data
.
data
.
second
==
null
||
data
.
data
.
first
==
FAIL
)
{
return
Container
(
height:
0
,
width:
0
,
);
}
return
Container
(
width:
contentWidth
,
alignment:
AlignmentDirectional
.
center
,
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
),
child:
Stack
(
alignment:
AlignmentDirectional
.
topCenter
,
children:
<
Widget
>[
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
height:
42.5
,
width:
contentWidth
,
),
Container
(
margin:
EdgeInsets
.
only
(
bottom:
0
),
child:
Stack
(
children:
<
Widget
>[
Container
(
child:
setupBodyView
(),
),
Positioned
(
top:
20
,
right:
20
,
width:
16
,
height:
16
,
child:
GestureDetector
(
onTap:
()
{
dismissCallback
();
},
child:
Image
.
asset
(
'assets/discuss_loe_price_cancel.png'
,
fit:
BoxFit
.
cover
),
))
]))
]),
Container
(
margin:
EdgeInsets
.
only
(
top:
0
),
width:
85
,
height:
85
,
child:
Image
.
network
(
_model
.
popViewLive
.
data
.
second
.
icon
,
fit:
BoxFit
.
cover
),
)
]),
)));
});
}
setupBodyView
()
{
return
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
7
),
color:
Colors
.
white
,
),
child:
Container
(
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
only
(
bottom:
0
,
top:
42.5
),
child:
detailView
(),
),
);
}
detailView
()
{
return
Container
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
height:
19
,
margin:
EdgeInsets
.
only
(
bottom:
14
),
alignment:
AlignmentDirectional
.
center
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
width:
16
,
height:
16
,
child:
Image
.
asset
(
'assets/discuss_loe_price_like.png'
,
fit:
BoxFit
.
cover
,
)),
Container
(
margin:
EdgeInsets
.
only
(
left:
4
),
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
tip
,
14
,
Color
(
0xff848484
)),
)
]),
),
Container
(
alignment:
AlignmentDirectional
.
center
,
width:
contentWidth
-
70
,
margin:
EdgeInsets
.
only
(
bottom:
25
),
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
title
,
18
,
Color
(
0xff464646
),
bold:
true
)),
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
7
),
color:
Color
(
0xffECECEC
),
),
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
only
(
bottom:
12
),
width:
contentWidth
-
70
,
height:
37
,
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
authorizePhone
,
16
,
Color
(
0xff484848
))),
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
7
),
),
child:
GestureDetector
(
onTap:
()
{
// 一键授权
_model
.
givePhoneAuth
(
111
);
dismissCallback
();
},
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
14
),
width:
contentWidth
-
70
,
height:
37
,
child:
Image
.
asset
(
'assets/discuss_loe_price_auth.png'
,
fit:
BoxFit
.
cover
)))),
Container
(
width:
contentWidth
-
70
,
margin:
EdgeInsets
.
only
(
bottom:
25
),
alignment:
AlignmentDirectional
.
center
,
child:
baseText
(
'授权后,您的手机将以“虚拟号”方式提供给机构'
,
11
,
Color
(
0xff999999
))),
]),
);
}
@override
void
dispose
()
{
_model
.
dispose
();
}
@override
void
initState
(
VoidCallback
dismissCall
,
BuildContext
context
)
{
this
.
dismissCallback
=
dismissCall
;
_model
.
fetchPopviewData
(
'1'
,
'2'
,
'3'
);
}
}
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
0bf3f8ad
...
@@ -53,5 +53,6 @@ class PlanCompareDetailModel extends BaseModel {
...
@@ -53,5 +53,6 @@ class PlanCompareDetailModel extends BaseModel {
void
dispose
()
{
void
dispose
()
{
stateLive
.
dispost
();
stateLive
.
dispost
();
detailLive
.
dispost
();
detailLive
.
dispost
();
headerLive
.
dispost
();
}
}
}
}
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
0bf3f8ad
...
@@ -47,13 +47,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -47,13 +47,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
}),
}),
body:
Container
(
body:
Container
(
child:
child:
reloadPage
(),
// head(),
// planPopularityView()
// planNormalEffectiveAttrsView()
// setupHome([], []),
reloadPage
(),
));
));
}
}
...
...
lib/ClueModel/server/api/ClueApi.dart
View file @
0bf3f8ad
...
@@ -12,6 +12,8 @@ import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart';
...
@@ -12,6 +12,8 @@ import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart';
import
'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanFeedBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanFeedBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceModelBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceAuthBean.dart'
;
@ServiceCenter
()
@ServiceCenter
()
abstract
class
ClueApi
{
abstract
class
ClueApi
{
...
@@ -27,7 +29,7 @@ abstract class ClueApi {
...
@@ -27,7 +29,7 @@ abstract class ClueApi {
@Query
(
"tab_type"
)
String
tab_type
,
@Query
(
"page"
)
int
page
);
@Query
(
"tab_type"
)
String
tab_type
,
@Query
(
"page"
)
int
page
);
@Get
(
"api/janus/plans/compare"
)
@Get
(
"api/janus/plans/compare"
)
PlanCompareDetail
getPlanCompareDetail
(
@Query
(
"plan_ids"
)
List
<
int
>
plan
_i
ds
);
PlanCompareDetail
getPlanCompareDetail
(
@Query
(
"plan_ids"
)
List
<
int
>
plan
I
ds
);
@Get
(
"api/janus/plans/options"
)
@Get
(
"api/janus/plans/options"
)
PlanBean
getPlan
();
PlanBean
getPlan
();
...
@@ -45,4 +47,15 @@ abstract class ClueApi {
...
@@ -45,4 +47,15 @@ abstract class ClueApi {
@Get
(
"api/janus/plans/rank"
)
@Get
(
"api/janus/plans/rank"
)
PlanBarBean
getPlanBar
(
@Query
(
"rank_type"
)
String
rank_type
);
PlanBarBean
getPlanBar
(
@Query
(
"rank_type"
)
String
rank_type
);
@Get
(
"api/janus/plans/plan_phone_authorize"
)
DiscussLowPriceModelBean
getPopviewData
(
@Query
(
"plan_id"
)
String
planId
,
@Query
(
"hospital_id"
)
String
hospitalId
,
@Query
(
"doctor_id"
)
String
doctorId
,
);
@Get
(
"api/janus/plans/agree_phone_authorize"
)
DiscussLowPriceAuthBean
givePhoneAuth
(
@Query
(
"lead_phone_request_id"
)
int
leadPhoneRequestId
);
}
}
lib/ClueModel/server/api/ClueApi.serv.dart
View file @
0bf3f8ad
...
@@ -21,6 +21,8 @@ import 'package:gm_flutter/ClueModel/server/entity/PlanCompareDetail.dart';
...
@@ -21,6 +21,8 @@ import 'package:gm_flutter/ClueModel/server/entity/PlanCompareDetail.dart';
import
'package:gm_flutter/ClueModel/server/entity/PlanBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanFeedBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanFeedBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanBarBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanBarBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceModelBean.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceAuthBean.dart'
;
const
bool
inProduction
=
const
bool
.
fromEnvironment
(
"dart.vm.product"
);
const
bool
inProduction
=
const
bool
.
fromEnvironment
(
"dart.vm.product"
);
...
@@ -85,9 +87,9 @@ class ClueApiImpl {
...
@@ -85,9 +87,9 @@ class ClueApiImpl {
});
});
}
}
Stream
<
PlanCompareDetail
>
getPlanCompareDetail
(
Dio
_dio
,
List
<
int
>
plan
_i
ds
)
{
Stream
<
PlanCompareDetail
>
getPlanCompareDetail
(
Dio
_dio
,
List
<
int
>
plan
I
ds
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/compare'
,
data:
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/compare'
,
data:
{
'plan_ids'
:
plan
_i
ds
,
'plan_ids'
:
plan
I
ds
,
})).
flatMap
((
value
)
{
})).
flatMap
((
value
)
{
if
(
value
!=
null
&&
if
(
value
!=
null
&&
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
...
@@ -153,6 +155,40 @@ class ClueApiImpl {
...
@@ -153,6 +155,40 @@ class ClueApiImpl {
});
});
}
}
Stream
<
DiscussLowPriceModelBean
>
getPopviewData
(
Dio
_dio
,
String
planId
,
String
hospitalId
,
String
doctorId
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/plan_phone_authorize'
,
data:
{
'plan_id'
:
planId
,
'hospital_id'
:
hospitalId
,
'doctor_id'
:
doctorId
,
})).
flatMap
((
value
)
{
if
(
value
!=
null
&&
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
return
Stream
.
fromFuture
(
compute
(
parseDiscussLowPriceModelBean
,
value
.
toString
()));
}
else
{
throw
Exception
(
"--未知网络错误--"
);
}
});
}
Stream
<
DiscussLowPriceAuthBean
>
givePhoneAuth
(
Dio
_dio
,
int
leadPhoneRequestId
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/agree_phone_authorize'
,
data:
{
'lead_phone_request_id'
:
leadPhoneRequestId
,
})).
flatMap
((
value
)
{
if
(
value
!=
null
&&
(
value
.
statusCode
>=
200
&&
value
.
statusCode
<
300
))
{
return
Stream
.
fromFuture
(
compute
(
parseDiscussLowPriceAuthBean
,
value
.
toString
()));
}
else
{
throw
Exception
(
"--未知网络错误--"
);
}
});
}
///==================base method==================
///==================base method==================
Future
<
Response
>
get
(
Dio
_dio
,
url
,
{
data
,
options
,
cancelToken
})
async
{
Future
<
Response
>
get
(
Dio
_dio
,
url
,
{
data
,
options
,
cancelToken
})
async
{
...
@@ -317,3 +353,11 @@ PlanFeedBean parsePlanFeedBean(String value) {
...
@@ -317,3 +353,11 @@ PlanFeedBean parsePlanFeedBean(String value) {
PlanBarBean
parsePlanBarBean
(
String
value
)
{
PlanBarBean
parsePlanBarBean
(
String
value
)
{
return
PlanBarBean
.
fromJson
(
json
.
decode
(
value
));
return
PlanBarBean
.
fromJson
(
json
.
decode
(
value
));
}
}
DiscussLowPriceModelBean
parseDiscussLowPriceModelBean
(
String
value
)
{
return
DiscussLowPriceModelBean
.
fromJson
(
json
.
decode
(
value
));
}
DiscussLowPriceAuthBean
parseDiscussLowPriceAuthBean
(
String
value
)
{
return
DiscussLowPriceAuthBean
.
fromJson
(
json
.
decode
(
value
));
}
lib/ClueModel/server/entity/DiscussLowPriceAuthBean.dart
0 → 100644
View file @
0bf3f8ad
/*
* @Author: zx
* @Date: 2020-07-04 11:51:02
* @Last Modified by: zx
* @Last Modified time: 2020-07-04 12:52:22
*/
class
DiscussLowPriceAuthBean
{
int
error
;
String
message
;
Null
extra
;
Null
errorExtra
;
UserType
userType
;
Data
data
;
DiscussLowPriceAuthBean
(
{
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorExtra
,
this
.
userType
,
this
.
data
});
DiscussLowPriceAuthBean
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
errorExtra
=
json
[
'error_extra'
];
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
if
(
this
.
userType
!=
null
)
{
data
[
'user_type'
]
=
this
.
userType
.
toJson
();
}
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
toJson
();
}
return
data
;
}
}
class
UserType
{
UserType
();
UserType
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
return
data
;
}
}
class
Data
{
bool
success
;
Data
({
this
.
success
});
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
success
=
json
[
'success'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'success'
]
=
this
.
success
;
return
data
;
}
}
lib/ClueModel/server/entity/DiscussLowPriceModelBean.dart
0 → 100644
View file @
0bf3f8ad
/*
* @Author: zx
* @Date: 2020-07-03 20:56:15
* @Last Modified by: zx
* @Last Modified time: 2020-07-03 20:57:44
*/
class
DiscussLowPriceModelBean
{
int
error
;
String
message
;
Null
extra
;
Null
errorExtra
;
UserType
userType
;
Data
data
;
DiscussLowPriceModelBean
(
{
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorExtra
,
this
.
userType
,
this
.
data
});
DiscussLowPriceModelBean
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
errorExtra
=
json
[
'error_extra'
];
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
if
(
this
.
userType
!=
null
)
{
data
[
'user_type'
]
=
this
.
userType
.
toJson
();
}
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
toJson
();
}
return
data
;
}
}
class
UserType
{
UserType
();
UserType
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
return
data
;
}
}
class
Data
{
int
leadPhoneRequestId
;
int
authorizeType
;
String
icon
;
String
tip
;
String
title
;
String
authorizePhone
;
Data
(
{
this
.
leadPhoneRequestId
,
this
.
authorizeType
,
this
.
icon
,
this
.
tip
,
this
.
title
,
this
.
authorizePhone
});
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
leadPhoneRequestId
=
json
[
'lead_phone_request_id'
];
authorizeType
=
json
[
'authorize_type'
];
icon
=
json
[
'icon'
];
tip
=
json
[
'tip'
];
title
=
json
[
'title'
];
authorizePhone
=
json
[
'authorize_phone'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'lead_phone_request_id'
]
=
this
.
leadPhoneRequestId
;
data
[
'authorize_type'
]
=
this
.
authorizeType
;
data
[
'icon'
]
=
this
.
icon
;
data
[
'tip'
]
=
this
.
tip
;
data
[
'title'
]
=
this
.
title
;
data
[
'authorize_phone'
]
=
this
.
authorizePhone
;
return
data
;
}
}
lib/MainRouter/page/test/TestPage.dart
View file @
0bf3f8ad
...
@@ -9,7 +9,7 @@ import 'package:gm_flutter/MainRouter/page/proxy/NetProxyPage.dart';
...
@@ -9,7 +9,7 @@ import 'package:gm_flutter/MainRouter/page/proxy/NetProxyPage.dart';
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'
;
import
'TP.dart'
;
import
'TP.dart'
;
class
TestPage
extends
StatefulWidget
{
class
TestPage
extends
StatefulWidget
{
...
@@ -46,12 +46,15 @@ class TestState extends BaseState<TestPage> {
...
@@ -46,12 +46,15 @@ class TestState extends BaseState<TestPage> {
context
,
RouterCenterImpl
().
findClueRouter
().
getProjectDetailsPage
());
context
,
RouterCenterImpl
().
findClueRouter
().
getProjectDetailsPage
());
}));
}));
list
.
add
(
listItem
(
"方案对比"
,
()
{
list
.
add
(
listItem
(
"方案对比"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlansCompareFeed
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlansCompareFeed
());
}));
}));
list
.
add
(
listItem
(
"榜单"
,
()
{
list
.
add
(
listItem
(
"榜单"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getTopPage
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getTopPage
());
}));
list
.
add
(
listItem
(
"弹窗"
,
()
{
DiscussLowPricePopView
.
showPopView
(
context
);
}));
}));
return
list
;
return
list
;
}
}
...
...
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