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
fb47c408
Commit
fb47c408
authored
Jul 07, 2020
by
杜欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二级方案埋点
parent
1da31790
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
17 deletions
+49
-17
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+18
-3
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+24
-9
MechanismModel.dart
lib/ClueModel/page/mechanismBox/MechanismModel.dart
+3
-1
TestPage.dart
lib/MainRouter/page/test/TestPage.dart
+1
-1
Api.dart
lib/commonModel/net/Api.dart
+1
-1
DioUtil.dart
lib/commonModel/net/DioUtil.dart
+2
-2
No files found.
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
View file @
fb47c408
...
...
@@ -18,12 +18,16 @@ import 'package:gm_flutter/ClueModel/page/mechanismBox/MechanismBoxPage.dart';
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart'
;
import
'package:gm_flutter/commonModel/net/DioUtil.dart'
;
import
'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
class
LevelTwoPage
extends
StatefulWidget
{
LevelTwoPage
(
Map
<
String
,
dynamic
>
params
)
{}
int
planId
=
192
;
LevelTwoPage
(
Map
<
String
,
dynamic
>
params
)
{
planId
=
params
[
'planId'
];
}
@override
State
<
StatefulWidget
>
createState
()
=>
LevelTwoState
();
...
...
@@ -31,7 +35,6 @@ class LevelTwoPage extends StatefulWidget {
class
LevelTwoState
extends
BaseState
<
LevelTwoPage
>
with
TickerProviderStateMixin
{
int
planId
=
10
;
LevelOneModel
_model
=
new
LevelOneModel
();
RefreshController
_refreshController
=
RefreshController
();
GlobalKey
keyTop
=
new
GlobalKey
();
...
...
@@ -47,6 +50,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
@override
void
initState
()
{
super
.
initState
();
_model
.
plan_id
=
widget
.
planId
;
_model
.
init
(()
{
_initTabBar
();
});
...
...
@@ -172,7 +176,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
list
.
add
(
extend
.
NestedScrollViewInnerScrollPositionKeyWidget
(
Key
(
"Tab
${i}
"
),
LevelOneList
(
planId
,
_model
.
tabsList
[
i
].
tabType
,
kToolbarHeight
+
d
)));
widget
.
planId
,
_model
.
tabsList
[
i
].
tabType
,
kToolbarHeight
+
d
)));
}
final
double
statusBarHeight
=
MediaQuery
.
of
(
context
).
padding
.
top
;
final
double
pinnedHeaderHeight
=
statusBarHeight
+
kToolbarHeight
;
...
...
@@ -204,6 +208,17 @@ class LevelTwoState extends BaseState<LevelTwoPage>
height:
40
,
color:
Colors
.
white
,
child:
baseTabBar
(
tabController
,
getTabs
(),
(
index
)
{
Map
<
String
,
dynamic
>
map
=
{};
map
[
"page_name"
]
=
"level_two_plan_deatil"
;
map
[
"referrer"
]
=
""
;
map
[
"referrer_id"
]
=
""
;
map
[
"referrer_link"
]
=
[
"plan_home"
];
map
[
"from_tab_name"
]
=
"全部"
;
map
[
"tab_name"
]
=
index
==
0
?
'机构'
:
'医生'
;
map
[
"position"
]
=
1
;
RouterCenterImpl
()
.
findMainRouter
()
.
buriedEvent
(
"on_click_tab"
,
map
);
_model
.
selectTab
(
index
);
},
scroll:
false
),
)),
...
...
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
View file @
fb47c408
...
...
@@ -8,6 +8,7 @@ import 'package:gm_flutter/ClueModel/view/FiveStarView.dart';
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/ClueModel/page/mechanismBox/MechanismModel.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
class
MechanismBox
implements
IBottomPicker
{
...
...
@@ -28,6 +29,20 @@ class MechanismBox implements IBottomPicker {
@override
initState
(
dismissCall
,
BuildContext
context
)
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"level_two_plan_compare_deatil"
,
"page_name"
:
""
,
"referrer"
:
""
,
"referrer_id"
:
""
,
"referrer_link"
:
[],
"referrer_tab_name"
:
""
,
"in"
:
""
,
"out"
:
""
,
"is_push"
:
1
,
"fake"
:
1
,
"is_first"
:
1
};
RouterCenterImpl
().
findMainRouter
().
buriedEvent
(
"page_view"
,
map
);
this
.
dismissCall
=
dismissCall
;
_model
.
getQuestions
(
plan_id
);
_levelModel
.
refreshView
(
true
);
...
...
@@ -157,8 +172,6 @@ class MechanismBox implements IBottomPicker {
color:
Color
(
0xffF7F6FA
),
);
}
print
(
'object'
);
print
(
_levelModel
.
data
[
index
].
toString
());
if
(
_levelModel
.
data
[
index
].
cardType
==
'hospital'
)
{
Hospital
hospital
=
_levelModel
.
data
[
index
].
hospital
;
...
...
@@ -183,11 +196,10 @@ class MechanismBox implements IBottomPicker {
return
GestureDetector
(
onTap:
()
{
if
(
doctor_ids
.
indexOf
(
hospital
.
hosiptalId
)
!=
-
1
)
{
doctor_ids
.
add
(
hospital
.
hosiptalId
);
}
else
{
doctor_ids
.
remove
(
hospital
.
hosiptalId
);
}
else
{
doctor_ids
.
add
(
hospital
.
hosiptalId
);
}
print
(
doctor_ids
.
toList
());
hospital
.
isCheck
=
!
hospital
.
isCheck
;
_levelModel
.
cardsLive
.
notifyView
(
_levelModel
.
cardsLive
.
data
);
},
...
...
@@ -342,10 +354,13 @@ class MechanismBox implements IBottomPicker {
NativeToast
.
showNativeToast
(
'请选择1-3个机构咨询'
);
}
else
{
if
(
txt
!=
''
)
{
_model
.
sendMessage
(
doctor_ids
,
txt
,
plan_id
);
dismissCall
();
textController
.
text
=
''
;
NativeToast
.
showNativeToast
(
'消息已发送成功'
);
_model
.
sendMessage
(
doctor_ids
,
txt
,
plan_id
,
(
i
)
{
if
(
i
==
0
)
{
dismissCall
();
textController
.
text
=
''
;
NativeToast
.
showNativeToast
(
'消息已发送成功'
);
}
});
}
}
},
...
...
lib/ClueModel/page/mechanismBox/MechanismModel.dart
View file @
fb47c408
...
...
@@ -42,12 +42,14 @@ class MechanismModel extends BaseModel {
});
}
sendMessage
(
List
<
int
>
doctor_ids
,
String
question
,
int
plan_id
)
{
sendMessage
(
List
<
int
>
doctor_ids
,
String
question
,
int
plan_id
,
Function
(
int
state
)
func
)
{
ClueApiImpl
.
getInstance
()
.
sendMessage
(
DioUtil
.
getInstance
().
getDio
(),
doctor_ids
,
question
,
plan_id
)
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
func
(
0
);
messageLive
.
notifyView
(
event
.
data
.
success
);
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
...
...
lib/MainRouter/page/test/TestPage.dart
View file @
fb47c408
...
...
@@ -33,7 +33,7 @@ class TestState extends BaseState<TestPage> {
list
.
add
(
listItem
(
"二级列表页"
,
()
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
{
"planId"
:
1
37
},
false
);
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
{
"planId"
:
1
92
},
false
);
}));
list
.
add
(
listItem
(
"方案页面"
,
()
{
RouterCenterImpl
()
...
...
lib/commonModel/net/Api.dart
View file @
fb47c408
...
...
@@ -19,7 +19,7 @@ const String APP_HOST_RELEASE = "https://x6cgr5y5-gengmei.mock.coding.io";
*/
//const String APP_HOST_DEBUG = "http://backend.paas-merchant.envs";
//const String APP_HOST_DEBUG = "http://doctor.paas-merchant.env";
//const String APP_HOST_DEBUG = "https://x6cgr5y5-gengmei.mock.coding.io";
//
const String APP_HOST_DEBUG = "https://x6cgr5y5-gengmei.mock.coding.io";
const
String
APP_HOST_DEBUG
=
"http://backend.paas-merchant.env"
;
//const String APP_HOST_DEBUG = "http://janus.paas-merchant.env";
...
...
lib/commonModel/net/DioUtil.dart
View file @
fb47c408
...
...
@@ -46,14 +46,14 @@ class DioUtil {
DioCookieManager
.
getInstance
().
clearCookie
();
}
void
setProxy
(
String
proxy
)
{
void
setProxy
(
String
proxy
,
{
String
port
}
)
{
_dio
=
new
Dio
(
_options
);
_dio
.
interceptors
.
add
(
DioInterceptorManager
.
getInstance
().
getIntercept
());
_dio
.
interceptors
.
add
(
DioCookieManager
.
getInstance
().
getCookieManager
());
(
_dio
.
httpClientAdapter
as
DefaultHttpClientAdapter
).
onHttpClientCreate
=
(
client
)
{
client
.
findProxy
=
(
url
)
{
return
'PROXY
$proxy
:
8888
'
;
return
'PROXY
$proxy
:
${port??8888}
'
;
};
};
}
...
...
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