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
b1d11aed
Commit
b1d11aed
authored
Apr 14, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:首页数据修改
parent
b4e9ad37
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
17 deletions
+9
-17
config.gradle
config.gradle
+1
-1
YdlHomeAdapter.kt
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+1
-13
YdlHomeFragment.kt
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+0
-1
HomeButtonBannerView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+7
-2
No files found.
config.gradle
View file @
b1d11aed
...
...
@@ -9,7 +9,7 @@ ext {
"m-consultant"
:
"0.0.60.11"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.62.01"
,
"m-home"
:
"0.0.23.1
0
"
,
"m-home"
:
"0.0.23.1
3
"
,
"m-im"
:
"0.0.21.18"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.10"
,
...
...
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
b1d11aed
...
...
@@ -72,10 +72,7 @@ class YdlHomeAdapter(private val mContext: Context,
//重置标记位
confidePosition
=
-
1
consultPosition
=
-
1
updateConfideFreeData
(
null
)
notifyDataSetChanged
()
LogUtil
.
e
(
"aaaaaaaaupdateItems"
+
listenFree
)
}
/**
...
...
@@ -88,8 +85,6 @@ class YdlHomeAdapter(private val mContext: Context,
list
[
confidePosition
].
confideBean
=
data
this
.
confideSelectPosition
=
selectPosition
notifyItemChanged
(
confidePosition
)
LogUtil
.
e
(
"aaaaaaaaupdateConfideData"
+
listenFree
)
}
/**
* 更新倾诉免费标识
...
...
@@ -99,10 +94,7 @@ class YdlHomeAdapter(private val mContext: Context,
if
(
data
!=
null
){
list
[
1
].
headerBean
=
data
}
notifyItemChanged
(
1
)
LogUtil
.
e
(
"aaaaaaaaupdateupdateConfideFreeData"
+
listenFree
)
}
/**
...
...
@@ -115,9 +107,6 @@ class YdlHomeAdapter(private val mContext: Context,
list
[
consultPosition
].
consultBean
=
data
this
.
consultSelectPosition
=
selectPosition
notifyItemChanged
(
consultPosition
)
LogUtil
.
e
(
"aaaaaaaaupdateConsultData"
+
listenFree
)
notifyItemChanged
(
1
)
}
/**
...
...
@@ -126,7 +115,6 @@ class YdlHomeAdapter(private val mContext: Context,
fun
updateAskData
(
data
:
HomeAskBean
,
position
:
Int
)
{
list
[
position
].
askBean
=
data
// notifyItemChanged(position)
LogUtil
.
e
(
"aaaaaaaupdateAskData"
+
listenFree
)
}
...
...
@@ -140,7 +128,6 @@ class YdlHomeAdapter(private val mContext: Context,
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
LogUtil
.
e
(
"aaaaaaaaaa"
+
viewType
+
listenFree
)
when
(
viewType
)
{
//顶部ViewPager与分类模块
HomeViewConfig
.
getOrder
().
bannerIndex
->
{
...
...
@@ -216,6 +203,7 @@ class YdlHomeAdapter(private val mContext: Context,
}
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
is
HomeButtonBannerViewHolder
->
{
listenFree
?.
let
{
holder
.
buttonBannerView
.
setVisibilityFree
(
it
)
}
}
//咨询模块
is
HomeConsultViewHolder
->
{
...
...
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
b1d11aed
...
...
@@ -365,7 +365,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
home_swipe_refresh_layout
.
isRefreshing
=
false
//更新首页数据
adapter
?.
updateItems
(
list
)
adapter
?.
notifyDataSetChanged
()
if
(!
TextUtils
.
isEmpty
(
list
[
0
].
headerBean
?.
doctorName
))
{
doctorName
=
list
[
0
].
headerBean
?.
doctorName
!!
initSearchBar
()
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
b1d11aed
...
...
@@ -30,9 +30,14 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
init
{
initView
()
}
fun
setVisibilityFree
(
boolean
:
Boolean
){
if
(
boolean
){
qingsuGif
.
visibility
=
View
.
VISIBLE
}
else
{
qingsuGif
.
visibility
=
View
.
GONE
}
}
private
fun
initView
()
{
LogUtil
.
e
(
"aaaaa"
+
listenFree
)
val
params
=
RecyclerView
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_button_banner_view
,
this
)
...
...
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