Commit 872abb4b by 刘鹏

feat: 咨询列表刷新问题完善

parent 26ebd735
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.21", "m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.64", "m-consultant" : "0.0.60.66",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
"m-home" : "0.0.23.90", "m-home" : "0.0.23.90",
...@@ -94,7 +94,7 @@ ext { ...@@ -94,7 +94,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.21", "m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.64", "m-consultant" : "0.0.60.66",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
"m-home" : "0.0.23.90", "m-home" : "0.0.23.90",
......
...@@ -42,6 +42,7 @@ import com.yidianling.common.tools.ToastUtil ...@@ -42,6 +42,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.adapter.ExpertSearchAdapter import com.yidianling.consultant.adapter.ExpertSearchAdapter
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.listener.OnCategoriesSelectedListener import com.yidianling.consultant.listener.OnCategoriesSelectedListener
import com.yidianling.consultant.listener.OnExpertClickListener
import com.yidianling.consultant.listener.OnFilterConfirmListener import com.yidianling.consultant.listener.OnFilterConfirmListener
import com.yidianling.consultant.listener.OnSortItemSelectedListener import com.yidianling.consultant.listener.OnSortItemSelectedListener
import com.yidianling.consultant.model.bean.* import com.yidianling.consultant.model.bean.*
...@@ -142,6 +143,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -142,6 +143,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
const val FROM_FIND_EXPERT = 1 const val FROM_FIND_EXPERT = 1
const val FROM_ONLINE_EXPERT = 2 const val FROM_ONLINE_EXPERT = 2
const val PAGE_SIZE = 15 const val PAGE_SIZE = 15
//列表点击回来不刷新列表
var needRefresh = true;
} }
private val allFilter = AllFilter() //当前筛选 private val allFilter = AllFilter() //当前筛选
...@@ -192,7 +195,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -192,7 +195,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
srlContainer.isEnabled = i >= 0 srlContainer.isEnabled = i >= 0
}) })
doctorAdapter = ExpertSearchAdapter(mContext, this, doctorList) doctorAdapter = ExpertSearchAdapter(mContext, this, doctorList,object :OnExpertClickListener{
override fun onExpertClick() {
needRefresh = false
}
})
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
val layoutManager = LinearLayoutManager( val layoutManager = LinearLayoutManager(
...@@ -1420,7 +1428,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1420,7 +1428,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (needRefresh){
refresh(false) refresh(false)
}else{
//
needRefresh = true
}
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT) ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit", "6") ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit", "6")
} }
......
...@@ -26,6 +26,7 @@ import com.ydl.ydlcommon.utils.remind.ToastHelper ...@@ -26,6 +26,7 @@ import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.consultant.IExpertSearchView import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.listener.OnExpertClickListener
import com.yidianling.consultant.model.bean.ExpertServiceItem import com.yidianling.consultant.model.bean.ExpertServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn import com.yidianling.consultant.router.ConsultantIn
...@@ -46,7 +47,8 @@ import java.math.BigDecimal ...@@ -46,7 +47,8 @@ import java.math.BigDecimal
class ExpertSearchAdapter( class ExpertSearchAdapter(
private val context: Context, private val context: Context,
private val expertSearchView: IExpertSearchView, private val expertSearchView: IExpertSearchView,
private val listData: ArrayList<ExpertServiceItem> private val listData: ArrayList<ExpertServiceItem>,
private val onExpertClick: OnExpertClickListener? = null
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { ) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object { companion object {
...@@ -547,6 +549,7 @@ class ExpertSearchAdapter( ...@@ -547,6 +549,7 @@ class ExpertSearchAdapter(
if (!TextUtils.isEmpty(cateId)) { if (!TextUtils.isEmpty(cateId)) {
linkUrl = URLUtils.appendParmas(linkUrl, "cateId", cateId) linkUrl = URLUtils.appendParmas(linkUrl, "cateId", cateId)
} }
onExpertClick?.onExpertClick()
TempH5RouteUtils.tempH5Route(linkUrl) TempH5RouteUtils.tempH5Route(linkUrl)
// 埋点 // 埋点
......
package com.yidianling.consultant.listener
/**
* 倾诉列表点击事件
* */
interface OnExpertClickListener {
/**
* 用户解决咨询列表点击后返回会刷新列表数据问题
* */
fun onExpertClick()
}
\ No newline at end of file
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