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
027cbb65
Commit
027cbb65
authored
Jul 04, 2020
by
朱璇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商议低价接口调试“
”
parent
2dde0e2f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
57 deletions
+106
-57
DiscussLowPriceModel.dart
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
+36
-2
DiscussLowPricePopView.dart
...lueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
+65
-46
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
+1
-1
ClueApi.serv.dart
lib/ClueModel/server/api/ClueApi.serv.dart
+2
-1
No files found.
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
View file @
027cbb65
/*
* @Author: zx
* @Date: 2020-07-03 20:54:59
* @Last Modified by:
zx
* @Last Modified time: 2020-07-0
3 20:54:59
* @Last Modified by:
zx
* @Last Modified time: 2020-07-0
4 10:36:22
*/
import
'package:flutter_common/commonModel/live/BaseModel.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
...
...
@@ -12,3 +12,37 @@ 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'
;
class
DiscussLowPriceModel
extends
BaseModel
{
LiveData
<
Pair
<
int
,
DiscussLowPriceModelBean
>>
popViewLive
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
fetchPopviewData
(
String
plan_id
,
String
hospital_id
,
String
doctor_id
)
{
ClueApiImpl
.
getInstance
()
.
getPopviewData
(
DioUtil
.
getInstance
().
getDio
(),
plan_id
,
hospital_id
,
doctor_id
)
.
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
);
});
}
@override
void
dispose
()
{
popViewLive
.
dispost
();
}
}
lib/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
View file @
027cbb65
...
...
@@ -2,12 +2,13 @@
* @Author: zx
* @Date: 2020-07-03 13:53:16
* @Last Modified by: zx
* @Last Modified time: 2020-07-04
09:30:57
* @Last Modified time: 2020-07-04
11:31:00
*/
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
)
{
...
...
@@ -20,55 +21,69 @@ class DiscussLowPricePopView {
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
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
,
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
>[
Container
(
height:
42.5
,
width:
contentWidth
,
),
Container
(
margin:
EdgeInsets
.
only
(
bottom:
0
),
child:
Stack
(
children:
<
Widget
>[
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
child:
setupBodyView
(),
height:
42.5
,
width:
contentWidth
,
),
Positioned
(
top:
20
,
right:
20
,
width:
16
,
height:
16
,
child:
GestureDetector
(
onTap:
()
{},
child:
Image
.
asset
(
'assets/discuss_loe_price_cancel.png'
,
fit:
BoxFit
.
cover
),
))
]))
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
),
)
]),
Container
(
margin:
EdgeInsets
.
only
(
top:
0
),
width:
85
,
height:
85
,
child:
Image
.
asset
(
'assets/discuss_loe_price_like.png'
,
fit:
BoxFit
.
cover
),
)
]),
)));
)));
});
}
setupBodyView
()
{
...
...
@@ -105,7 +120,8 @@ class _PopView implements ICenterPicker {
)),
Container
(
margin:
EdgeInsets
.
only
(
left:
4
),
child:
baseText
(
'对当前商品感兴趣?'
,
14
,
Color
(
0xff848484
)),
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
tip
,
14
,
Color
(
0xff848484
)),
)
]),
),
...
...
@@ -113,7 +129,8 @@ class _PopView implements ICenterPicker {
alignment:
AlignmentDirectional
.
center
,
width:
contentWidth
-
70
,
margin:
EdgeInsets
.
only
(
bottom:
25
),
child:
baseText
(
'机构可免费为您提供咨询服务'
,
18
,
Color
(
0xff464646
),
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
title
,
18
,
Color
(
0xff464646
),
bold:
true
)),
Container
(
decoration:
BoxDecoration
(
...
...
@@ -124,7 +141,8 @@ class _PopView implements ICenterPicker {
margin:
EdgeInsets
.
only
(
bottom:
12
),
width:
contentWidth
-
70
,
height:
37
,
child:
baseText
(
'13800138000'
,
16
,
Color
(
0xff484848
))),
child:
baseText
(
_model
.
popViewLive
.
data
.
second
.
authorizePhone
,
16
,
Color
(
0xff484848
))),
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
7
),
...
...
@@ -155,5 +173,6 @@ class _PopView implements ICenterPicker {
@override
void
initState
(
VoidCallback
dismissCall
,
BuildContext
context
)
{
this
.
dismissCallback
=
dismissCall
;
_model
.
fetchPopviewData
(
'1'
,
'2'
,
'3'
);
}
}
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
027cbb65
...
...
@@ -53,5 +53,6 @@ class PlanCompareDetailModel extends BaseModel {
void
dispose
()
{
stateLive
.
dispost
();
detailLive
.
dispost
();
headerLive
.
dispost
();
}
}
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
027cbb65
...
...
@@ -47,13 +47,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Navigator
.
pop
(
context
);
}),
body:
Container
(
child:
// head(),
// planPopularityView()
// planNormalEffectiveAttrsView()
// setupHome([], []),
reloadPage
(),
child:
reloadPage
(),
));
}
...
...
lib/ClueModel/server/api/ClueApi.dart
View file @
027cbb65
...
...
@@ -47,7 +47,7 @@ abstract class ClueApi {
@Get
(
"api/janus/plans/rank"
)
PlanBarBean
getPlanBar
(
@Query
(
"rank_type"
)
String
rank_type
);
@Get
(
"api/janus/plans/
compar
e"
)
@Get
(
"api/janus/plans/
plan_phone_authoriz
e"
)
DiscussLowPriceModelBean
getPopviewData
(
@Query
(
"plan_id"
)
String
plan_id
,
@Query
(
"hospital_id"
)
String
hospital_id
,
...
...
lib/ClueModel/server/api/ClueApi.serv.dart
View file @
027cbb65
...
...
@@ -156,7 +156,8 @@ class ClueApiImpl {
Stream
<
DiscussLowPriceModelBean
>
getPopviewData
(
Dio
_dio
,
String
plan_id
,
String
hospital_id
,
String
doctor_id
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/compare'
,
data:
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'api/janus/plans/plan_phone_authorize'
,
data:
{
'plan_id'
:
plan_id
,
'hospital_id'
:
hospital_id
,
'doctor_id'
:
doctor_id
,
...
...
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