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
f09b9019
Commit
f09b9019
authored
Apr 15, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
华为渠道特殊处理
parent
e428403e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
23 deletions
+73
-23
config.gradle
config.gradle
+1
-1
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+1
-1
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+22
-0
consultant_expert_search_item_view.xml
m-consultant/src/main/res/layout/consultant_expert_search_item_view.xml
+0
-0
YdlHomeAdapter.kt
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+37
-19
HomeButtonBannerView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+12
-2
No files found.
config.gradle
View file @
f09b9019
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
fals
e
dev_mode
=
tru
e
ydl_app
=
[
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
f09b9019
...
...
@@ -77,7 +77,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
initData
()
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
startsWith
(
"ATK_7"
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
rl_hot_fix_for_huawei
.
visibility
=
View
.
GONE
}
else
{
rl_hot_fix_for_huawei
.
visibility
=
View
.
VISIBLE
...
...
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
f09b9019
...
...
@@ -15,6 +15,7 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.URLUtils
...
...
@@ -50,6 +51,8 @@ class ExpertSearchAdapter(
const
val
EMPTY_VIEW
=
2
}
private
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
//记录当前选择主题的id
var
cateId
:
String
?
=
null
...
...
@@ -66,6 +69,10 @@ class ExpertSearchAdapter(
@SuppressLint
(
"SetTextI18n"
)
override
fun
onBindViewHolder
(
holder
:
RecyclerView
.
ViewHolder
?,
position
:
Int
)
{
if
(
holder
is
NormalViewHolder
)
{
val
isFromXinliZiXunHuawei
=
!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
startsWith
(
"ATK_7"
)
&&
ffrom
.
endsWith
(
"huawei"
)
val
itemBean
=
listData
[
position
]
//头像
val
headConfig
=
SimpleImageOpConfiger
()
...
...
@@ -283,6 +290,19 @@ class ExpertSearchAdapter(
}
}
}
if
(
isFromXinliZiXunHuawei
)
{
holder
.
ll_honor_layout
.
visibility
=
View
.
GONE
holder
.
ll_tags
.
visibility
=
View
.
GONE
holder
.
imgHead_online
.
visibility
=
View
.
GONE
holder
.
imgHead_online_server
.
visibility
=
View
.
GONE
holder
.
tvPrice
.
visibility
=
View
.
GONE
holder
.
tvPriceContent
.
visibility
=
View
.
GONE
holder
.
tvPriceContent
.
visibility
=
View
.
GONE
holder
.
tvChat
.
text
=
"咨询"
}
}
else
if
(
holder
is
FooterViewHolder
)
{
if
(
hasMore
)
{
holder
.
itemView
.
visibility
=
View
.
VISIBLE
...
...
@@ -340,6 +360,8 @@ class ExpertSearchAdapter(
val
imgServiceFree
=
itemView
.
imgServiceFree
!!
//新驻图标
val
imgNewEnter
=
itemView
.
imgNewEnter
!!
//荣誉标签
val
ll_honor_layout
=
itemView
.
ll_honor_layout
!!
//好评率
val
ll_feedbackRate
=
itemView
.
ll_feedbackRate
!!
//xxx人点评
...
...
m-consultant/src/main/res/layout/consultant_expert_search_item_view.xml
View file @
f09b9019
This diff is collapsed.
Click to expand it.
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
f09b9019
...
...
@@ -6,7 +6,7 @@ import android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.ydl.ydlcommon.data.PlatformDataManager
.getRam
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.yidianling.home.R
import
com.yidianling.home.constract.YdlHomeViewHolderConstract
import
com.yidianling.home.event.HomeImpl
...
...
@@ -29,6 +29,7 @@ class YdlHomeAdapter(
private
var
list
:
ArrayList
<
HomePagerDataBean
>
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
private
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
private
val
mInflater
:
LayoutInflater
=
LayoutInflater
.
from
(
mContext
)
/**
* 倾述item的position
...
...
@@ -151,21 +152,31 @@ class YdlHomeAdapter(
}
//倾诉*排解模块
is
HomeConfideViewHolder
->
{
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setConfideExpertInfoView
(
list
[
position
].
confideBean
?.
body
)
confidePosition
=
position
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
val
parm
=
holder
.
itemView
.
layoutParams
parm
.
height
=
0
holder
.
itemView
.
layoutParams
=
parm
}
else
{
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setConfideExpertInfoView
(
list
[
position
].
confideBean
?.
body
)
confidePosition
=
position
}
}
//课程*成长模块
is
HomeCourseViewHolder
->
{
holder
.
courseViewView
.
initData
(
list
[
position
].
courseBean
?.
list
)
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
val
parm
=
holder
.
itemView
.
layoutParams
parm
.
height
=
0
holder
.
itemView
.
layoutParams
=
parm
}
else
{
holder
.
courseViewView
.
initData
(
list
[
position
].
courseBean
?.
list
)
}
}
//解忧*问答模块
is
HomeAssuageGriefViewHolder
->
{
val
ffrom
=
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
val
parm
=
holder
.
itemView
.
layoutParams
parm
.
height
=
0
...
...
@@ -180,15 +191,22 @@ class YdlHomeAdapter(
}
//咨询模块
is
HomeConsultViewHolder
->
{
holder
.
consultView
.
setTitle
(
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
)
)
consultPosition
=
position
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
val
parm
=
holder
.
itemView
.
layoutParams
parm
.
height
=
0
holder
.
itemView
.
layoutParams
=
parm
}
else
{
holder
.
consultView
.
setTitle
(
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
)
)
consultPosition
=
position
}
}
//测试模块
is
HomeTestViewHolder
->
{
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
f09b9019
...
...
@@ -61,6 +61,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
homeModuleButtonBannerThird
.
visibility
=
View
.
GONE
homeModuleButtonBannerSecond
.
visibility
=
View
.
GONE
homeModuleButtonBannerFirst
.
background
=
resources
.
getDrawable
(
R
.
drawable
.
home_dcotor_bt_bg_huawei
)
homeModuleButtonBannerSecond
.
background
=
...
...
@@ -101,8 +104,15 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeCategory
:
List
<
HomeHeaderBean
.
AskCategoryDataBean
>?
)
{
setRealTextView
(
homeSaleData
)
homeEvent
?.
let
{
home_category_view
.
setEvent
(
it
)
};
home_category_view
.
initData
(
homeCategory
)
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
home_category_view
.
visibility
=
View
.
GONE
}
else
{
homeEvent
?.
let
{
home_category_view
.
setEvent
(
it
)
}
home_category_view
.
initData
(
homeCategory
)
}
}
/**
...
...
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