Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
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
杨凯
YDL-Component-Medical
Commits
faaeec78
Commit
faaeec78
authored
Jun 22, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Code Review代码调整
parent
b9b56cc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+26
-15
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
faaeec78
...
...
@@ -126,7 +126,7 @@ class ConfideHomeActivity :
private
var
bottomSheetDialogFragment
:
ConfideBottomSheetDialogFragment
?
=
null
private
var
keyword
:
String
=
""
;
private
var
keyword
:
String
=
""
;
init
{
//初始化参数
...
...
@@ -253,9 +253,9 @@ class ConfideHomeActivity :
}
private
fun
showDoctorDetail
(
confideId
:
String
,
doctorId
:
String
)
{
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
confideId
)+
"&payPage=1"
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
this
@ConfideHomeActivity
,
url
,
doctorId
)
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
confideId
)
+
"&payPage=1"
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
this
@ConfideHomeActivity
,
url
,
doctorId
)
}
override
fun
onResume
()
{
...
...
@@ -352,10 +352,10 @@ class ConfideHomeActivity :
rl_search_head
.
setOnClickListener
{
var
intent
=
Intent
(
this
,
ConfideSearchActivity
::
class
.
java
)
if
(!
TextUtils
.
isEmpty
(
keyword
)){
intent
.
putExtra
(
FinalString
.
CONFIDE_SEARCH_KEY_WORD
,
keyword
)
if
(!
TextUtils
.
isEmpty
(
keyword
))
{
intent
.
putExtra
(
FinalString
.
CONFIDE_SEARCH_KEY_WORD
,
keyword
)
}
startActivityForResult
(
intent
,
SEARCH_REQUEST_CODE
)
startActivityForResult
(
intent
,
SEARCH_REQUEST_CODE
)
}
}
...
...
@@ -427,7 +427,10 @@ class ConfideHomeActivity :
initParam
()
hideError
()
cacheList
?.
addAll
(
0
,
list
)
cacheList
?.
add
(
0
,
ConfideHomeDataBean
(
IConfideHomeConfig
.
TYPE_SEARCH
,
null
,
null
,
null
,
-
1
,
keyword
))
cacheList
?.
add
(
0
,
ConfideHomeDataBean
(
IConfideHomeConfig
.
TYPE_SEARCH
,
null
,
null
,
null
,
-
1
,
keyword
)
)
updateAdapter
()
setSuspendListener
()
v_filterView
.
refreshView
()
...
...
@@ -437,7 +440,7 @@ class ConfideHomeActivity :
* 设置筛选模块悬浮顶部监听数据
*/
private
fun
setSuspendListener
()
{
listSuspendListener
?.
setFilterView
(
v_filterView
,
rl_search_head
,
vFilterLine
)
listSuspendListener
?.
setFilterView
(
v_filterView
,
rl_search_head
,
vFilterLine
)
listSuspendListener
?.
setSectionAdapter
(
mConfideAdapter
!!
)
}
...
...
@@ -450,8 +453,8 @@ class ConfideHomeActivity :
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
if
(
requestCode
==
SEARCH_REQUEST_CODE
&&
resultCode
==
RESULT_OK
)
{
val
keyWord
=
data
?.
getStringExtra
(
FinalString
.
CONFIDE_SEARCH_KEY_WORD
)
if
(
keyWord
!=
null
){
keyword
=
keyWord
if
(
keyWord
!=
null
)
{
this
.
keyword
=
keyWord
page
=
1
allFiltersBean
=
ConfideHomeAllFiltersBean
(
page
,
...
...
@@ -541,17 +544,25 @@ class ConfideHomeActivity :
}
if
(
bean
?.
body
!=
null
&&
bean
?.
body
.
size
==
0
)
{
var
hasEmptyLayout
:
Boolean
=
false
var
hasEmptyLayout
:
Boolean
=
false
for
(
index
in
(
0
..
(
cacheList
!!
.
size
-
1
)).
reversed
())
{
if
(
cacheList
!!
[
index
].
type
==
IConfideHomeConfig
.
TYPE_EMPTY
)
{
hasEmptyLayout
=
true
break
}
}
if
(!
hasEmptyLayout
){
cacheList
?.
add
(
ConfideHomeDataBean
(
IConfideHomeConfig
.
TYPE_EMPTY
,
null
,
null
,
null
,
-
1
))
if
(!
hasEmptyLayout
)
{
cacheList
?.
add
(
ConfideHomeDataBean
(
IConfideHomeConfig
.
TYPE_EMPTY
,
null
,
null
,
null
,
-
1
)
)
}
}
else
{
}
else
{
for
(
index
in
(
0
..
(
cacheList
!!
.
size
-
1
)).
reversed
())
{
if
(
cacheList
!!
[
index
].
type
==
IConfideHomeConfig
.
TYPE_EMPTY
)
{
cacheList
!!
.
removeAt
(
index
)
...
...
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