Commit a27a2abf by upwork.021

feat: 代码优化

parent 61719190
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.65", "m-confide" : "0.0.49.65",
"m-consultant" : "0.0.60.17", "m-consultant" : "0.0.60.18",
"m-fm" : "0.0.30.04", "m-fm" : "0.0.30.04",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.17", "m-home" : "0.0.23.17",
......
...@@ -226,18 +226,20 @@ class ExpertSearchAdapter( ...@@ -226,18 +226,20 @@ class ExpertSearchAdapter(
holder.tvTeamCertifications.text = itemBean.teamCertifications holder.tvTeamCertifications.text = itemBean.teamCertifications
//咨询师标签 //咨询师标签
holder.ll_tags.removeAllViews() holder.ll_tags.removeAllViews()
if (itemBean.tagList.isNotEmpty()){ itemBean.tagList?.let {
for (tag in itemBean.tagList){ if (it.isNotEmpty()){
val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_tag, holder.ll_tags, false) for (tag in itemBean.tagList){
view.tvTag.text = tag.tagName val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
if (tag.isHigh==1){ view.tvTag.text = tag.tagName
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c) if (tag.isHigh==1){
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C)) view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c)
}else{ view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1) }else{
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0)) view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0))
}
holder.ll_tags.addView(view)
} }
holder.ll_tags.addView(view)
} }
} }
//帮助人数 //帮助人数
......
...@@ -135,7 +135,7 @@ data class DoctorServiceItem( ...@@ -135,7 +135,7 @@ data class DoctorServiceItem(
/** /**
* 新标签分类 * 新标签分类
*/ */
val tagList: ArrayList<TagBean> val tagList: ArrayList<TagBean>?
) )
data class TagBean( data class TagBean(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment