Commit b1d11aed by 霍志良

feat:首页数据修改

parent b4e9ad37
......@@ -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.10",
"m-home" : "0.0.23.13",
"m-im" : "0.0.21.18",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10",
......
......@@ -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 -> {
......
......@@ -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()
......
......@@ -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)
......
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