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
a68b3493
Commit
a68b3493
authored
Aug 04, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:心理咨询代码修改
parent
0897b40c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
26 deletions
+33
-26
YdlHomeAdapter.kt
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+1
-1
HomeButtonBannerView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+1
-1
HomePagerBannerCategoryView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomePagerBannerCategoryView.kt
+15
-12
HomeModuleCategoryView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/widget/HomeModuleCategoryView.kt
+16
-12
No files found.
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
a68b3493
...
...
@@ -154,7 +154,7 @@ class YdlHomeAdapter(
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
is
HomeButtonBannerViewHolder
->
{
holder
.
buttonBannerView
.
initData
(
list
[
position
].
headerBean
?.
askCategoryData
list
[
position
].
headerBean
?.
goldList
)
}
//倾诉*排解模块
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
a68b3493
...
...
@@ -54,7 +54,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
fun
initData
(
homeCategory
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?
homeCategory
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?
)
{
homeEvent
?.
let
{
home_category_view
.
setEvent
(
it
)
}
home_category_view
.
initData
(
homeCategory
)
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomePagerBannerCategoryView.kt
View file @
a68b3493
...
...
@@ -30,7 +30,8 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
/**
* 数据缓存
*/
var
mDataList
:
ArrayList
<
HomeHeaderBean
.
AskCategoryDataBean
>?
=
null
var
mDataList
:
ArrayList
<
HomeHeaderBean
.
CategoryGoldListDataBean
>?
=
null
/**
* 分类view宽度
*/
...
...
@@ -113,7 +114,7 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
}
fun
initData
(
askCategoryDataBean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?,
askCategoryDataBean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?,
homeSaleData
:
List
<
HomeHeaderBean
.
HomeSaleDataBean
>?
)
{
if
(
null
==
askCategoryDataBean
||
askCategoryDataBean
.
isEmpty
())
{
...
...
@@ -136,17 +137,16 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
* 判断数据是否变化
*/
private
fun
getChange
(
bean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?,
cacheBean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?
bean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?,
cacheBean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?
):
Boolean
{
if
(
bean
?.
size
!=
cacheBean
?.
size
)
{
return
true
}
for
(
index
in
0
until
bean
?.
size
!!
)
{
if
(!
bean
[
index
].
url
.
equals
(
cacheBean
!!
[
index
].
url
)
||
!
bean
[
index
].
coverUrl
.
equals
(
cacheBean
!!
[
index
].
coverUrl
)
||
!
bean
[
index
].
cateTitle
.
equals
(
cacheBean
!!
[
index
].
cateTitle
)
||
bean
[
index
].
cateId
!=
cacheBean
!!
[
index
].
cateId
if
(!
bean
[
index
].
icon
.
equals
(
cacheBean
!!
[
index
].
icon
)
||
!
bean
[
index
].
title
.
equals
(
cacheBean
!!
[
index
].
title
)
||
bean
[
index
].
id
!=
cacheBean
!!
[
index
].
id
)
{
return
true
}
...
...
@@ -218,9 +218,9 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
*/
private
fun
bindIconData
(
imageView
:
ImageView
,
categoryBean
:
HomeHeaderBean
.
AskCategory
DataBean
categoryBean
:
HomeHeaderBean
.
CategoryGoldList
DataBean
)
{
GlideApp
.
with
(
context
).
load
(
categoryBean
.
coverUrl
)
GlideApp
.
with
(
context
).
load
(
categoryBean
.
icon
)
.
centerCrop
().
into
(
imageView
)
}
...
...
@@ -249,8 +249,11 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
/**
* 设置文本
*/
private
fun
bindTextData
(
textView
:
TextView
,
categoryBean
:
HomeHeaderBean
.
AskCategoryDataBean
)
{
textView
.
text
=
categoryBean
.
cateTitle
private
fun
bindTextData
(
textView
:
TextView
,
categoryBean
:
HomeHeaderBean
.
CategoryGoldListDataBean
)
{
textView
.
text
=
categoryBean
.
title
}
/**
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/widget/HomeModuleCategoryView.kt
View file @
a68b3493
...
...
@@ -30,7 +30,8 @@ class HomeModuleCategoryView : FrameLayout {
/**
* 数据缓存
*/
var
mDataList
:
ArrayList
<
HomeHeaderBean
.
AskCategoryDataBean
>?
=
null
var
mDataList
:
ArrayList
<
HomeHeaderBean
.
CategoryGoldListDataBean
>?
=
null
/**
* 分类view宽度
*/
...
...
@@ -126,7 +127,7 @@ class HomeModuleCategoryView : FrameLayout {
dp15
=
RxImageTool
.
dip2px
(
4f
)
}
fun
initData
(
askCategoryDataBean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?)
{
fun
initData
(
askCategoryDataBean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?)
{
if
(
null
==
askCategoryDataBean
||
askCategoryDataBean
.
isEmpty
())
{
visibility
=
View
.
GONE
return
...
...
@@ -146,17 +147,16 @@ class HomeModuleCategoryView : FrameLayout {
* 判断数据是否变化
*/
private
fun
getChange
(
bean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?,
cacheBean
:
List
<
HomeHeaderBean
.
AskCategory
DataBean
>?
bean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?,
cacheBean
:
List
<
HomeHeaderBean
.
CategoryGoldList
DataBean
>?
):
Boolean
{
if
(
bean
?.
size
!=
cacheBean
?.
size
)
{
return
true
}
for
(
index
in
0
until
bean
?.
size
!!
)
{
if
(!
bean
[
index
].
url
.
equals
(
cacheBean
!!
[
index
].
url
)
||
!
bean
[
index
].
coverUrl
.
equals
(
cacheBean
!!
[
index
].
coverUrl
)
||
!
bean
[
index
].
cateTitle
.
equals
(
cacheBean
!!
[
index
].
cateTitle
)
||
bean
[
index
].
cateId
!=
cacheBean
!!
[
index
].
cateId
if
(!
bean
[
index
].
icon
.
equals
(
cacheBean
!!
[
index
].
icon
)
||
!
bean
[
index
].
title
.
equals
(
cacheBean
!!
[
index
].
title
)
||
bean
[
index
].
id
!=
cacheBean
!!
[
index
].
id
)
{
return
true
}
...
...
@@ -282,8 +282,11 @@ class HomeModuleCategoryView : FrameLayout {
/**
* 设置文本
*/
private
fun
bindTextData
(
textView
:
TextView
,
categoryBean
:
HomeHeaderBean
.
AskCategoryDataBean
)
{
textView
.
text
=
categoryBean
.
cateTitle
private
fun
bindTextData
(
textView
:
TextView
,
categoryBean
:
HomeHeaderBean
.
CategoryGoldListDataBean
)
{
textView
.
text
=
categoryBean
.
title
}
/**
...
...
@@ -291,9 +294,9 @@ class HomeModuleCategoryView : FrameLayout {
*/
private
fun
bindIconData
(
imageView
:
ImageView
,
categoryBean
:
HomeHeaderBean
.
AskCategory
DataBean
categoryBean
:
HomeHeaderBean
.
CategoryGoldList
DataBean
)
{
GlideApp
.
with
(
context
).
load
(
categoryBean
.
coverUrl
)
GlideApp
.
with
(
context
).
load
(
categoryBean
.
icon
)
.
centerCrop
().
into
(
imageView
)
}
}
\ No newline at end of file
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