Commit de7e6896 by upwork.021

feat: 埋点加入

parent 37a9a364
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.72", "m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.26", "m-consultant" : "0.0.60.28",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04", "m-user" : "0.0.62.04",
"m-home" : "0.0.23.44", "m-home" : "0.0.23.44",
...@@ -27,7 +27,7 @@ ext { ...@@ -27,7 +27,7 @@ ext {
"m-muse-api" : "0.0.1", "m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.2", "m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.19", "m-user-api" : "0.0.10.19",
"m-home-api" : "0.0.4.2", "m-home-api" : "0.0.4.4",
"m-im-api" : "0.0.12.24", "m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
...@@ -112,7 +112,7 @@ ext { ...@@ -112,7 +112,7 @@ ext {
"m-muse-api" : "0.0.1", "m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.2", "m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.19", "m-user-api" : "0.0.10.19",
"m-home-api" : "0.0.4.2", "m-home-api" : "0.0.4.4",
"m-im-api" : "0.0.12.24", "m-im-api" : "0.0.12.24",
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
......
...@@ -8,7 +8,6 @@ import android.app.Activity ...@@ -8,7 +8,6 @@ import android.app.Activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Build
import android.os.Handler import android.os.Handler
import android.text.TextUtils import android.text.TextUtils
import android.view.Gravity import android.view.Gravity
...@@ -35,12 +34,10 @@ import com.ydl.ydlcommon.base.config.HttpConfig ...@@ -35,12 +34,10 @@ import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.ui.LogoLoadingView import com.ydl.ydlcommon.ui.LogoLoadingView
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener import com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.adapter.ExpertSearchAdapter import com.yidianling.consultant.adapter.ExpertSearchAdapter
...@@ -148,9 +145,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -148,9 +145,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
context.startActivity(intent) context.startActivity(intent)
} }
fun startSearch(context: Context, searchWord: String?) { /**
* 搜索页面过来的sign2为14 仅用于埋点
*/
fun startSearch(context: Context, searchWord: String?,sign2:String) {
val intent = Intent(context, ExpertSearchActivity::class.java) val intent = Intent(context, ExpertSearchActivity::class.java)
intent.putExtra(EXTRA_SEARCH_WORD, searchWord) intent.putExtra(EXTRA_SEARCH_WORD, searchWord)
intent.putExtra("sign2",sign2)
context.startActivity(intent) context.startActivity(intent)
} }
...@@ -179,7 +180,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -179,7 +180,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private val tempFilter = AllFilter() //临时筛选,未确认状态 private val tempFilter = AllFilter() //临时筛选,未确认状态
private var curPage = 1 private var curPage = 1
private val doctorList = ArrayList<ExpertServiceItem>() private val doctorList = ArrayList<ExpertServiceItem>()
private val serviceList = ArrayList<ExpertServiceItem>()
private var hasMore = true private var hasMore = true
private var initCategory = "0" private var initCategory = "0"
private var initShowType: Int = 1 private var initShowType: Int = 1
...@@ -189,11 +189,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -189,11 +189,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
private var isFromSplash = false private var isFromSplash = false
private val props1 = JSONObject() //筛选标题埋点参数 private val props1 = JSONObject() //筛选标题埋点参数
private var fromPageType: Int = 1 //从哪个页面跳转过来的 private var fromPageType: Int = 1 //从哪个页面跳转过来的
private val fromPages = arrayOf("首页", "搜索页面", "在线专家")
private var isRecommend = false //埋点数据 private var isRecommend = false //埋点数据
private var keyWord: String? = null //埋点数据 private var cateName: String? = null
private var mSign2: String = "" // 用于搜索页面进来的埋点参数
private var isDoSearch: Boolean = false //埋点判断是否通过搜索进入埋点的 private var isDoSearch: Boolean = false //埋点判断是否通过搜索进入埋点的
private val bannerList = ArrayList<String>()
private var hasSelectedArea = false //是否选择过地区 private var hasSelectedArea = false //是否选择过地区
private var hasSelectedSort = false //是否选择过排序 private var hasSelectedSort = false //是否选择过排序
...@@ -380,7 +379,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -380,7 +379,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
val params = intent.getStringExtra("routerParam") val params = intent.getStringExtra("routerParam")
val paramsJson = JSONObject(params) val paramsJson = JSONObject(params)
initCategory = paramsJson.getString("cateId") initCategory = paramsJson.getString("cateId")
keyWord = paramsJson.getString("cateTitle") cateName = paramsJson.getString("cateTitle")
mSign2 = cateName!!
initShowType = paramsJson.getString("showType").toInt() initShowType = paramsJson.getString("showType").toInt()
} }
} }
...@@ -390,13 +390,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -390,13 +390,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: "" initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: ""
initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0) initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0)
tv_search_content.text = mIntent.getStringExtra(EXTRA_SEARCH_WORD) tv_search_content.text = mIntent.getStringExtra(EXTRA_SEARCH_WORD)
keyWord = mIntent.getStringExtra(EXTRA_CATEGORY_NAME) ?: "" mSign2 = mIntent.getStringExtra("sign2")
getRouterParam() getRouterParam()
allFilter.showType.key = initShowType allFilter.showType.key = initShowType
allFilter.categoryId2List.add(initCategory) allFilter.categoryId2List.add(initCategory)
if (!TextUtils.isEmpty(keyWord)){ if (!TextUtils.isEmpty(cateName)){
tvSubject.text = keyWord tvSubject.text = cateName
updateFilterTextViewStatus(tvSubject,FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject,FILTER_STATUS_FILTERED)
} }
...@@ -504,6 +504,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -504,6 +504,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
dealHotSelect(hot, true) dealHotSelect(hot, true)
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
// 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,hot.value!!,"app","")
} }
filterLabelSet() filterLabelSet()
//开始筛选数据 //开始筛选数据
...@@ -792,17 +795,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -792,17 +795,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
* 获取专家列表数据 * 获取专家列表数据
*/ */
override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) { override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) {
LogUtil.d("onDoctorListFetched")
if (rvExperts.adapter != doctorAdapter) { if (rvExperts.adapter != doctorAdapter) {
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
} }
LogUtil.d("data size " + data.size)
if (fromPageType == -1) {
bury(keyWord ?: "", data.size > 0, isRecommend, "首页分类")
} else {
bury(keyWord ?: "", data.size > 0, isRecommend, fromPages[fromPageType])
}
// 如果是第一页 // 如果是第一页
if (curPage==1){ if (curPage==1){
if (data.size>=10){ if (data.size>=10){
...@@ -831,6 +827,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -831,6 +827,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
rvExperts.visibility = View.VISIBLE rvExperts.visibility = View.VISIBLE
srlContainer.isRefreshing = false srlContainer.isRefreshing = false
// 埋点
val sign1 = data.map { it.id }.joinToString { "|" }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,sign1,mSign2,"app")
} }
override fun fetchListFailed(msg: String?) { override fun fetchListFailed(msg: String?) {
...@@ -1220,13 +1220,17 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1220,13 +1220,17 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
?: "" ?: ""
) )
if (sortItem.value.equals("综合排序")) { when {
sortItem.value.equals("综合排序") -> {
tvSort.text = "排序" tvSort.text = "排序"
} else if (sortItem.value?.length ?: 0 > 4) { }
sortItem.value?.length ?: 0 > 4 -> {
tvSort.text = sortItem.value?.substring(0, 3) + "..." tvSort.text = sortItem.value?.substring(0, 3) + "..."
} else { }
else -> {
tvSort.text = sortItem.value tvSort.text = sortItem.value
} }
}
//判断排序选中,判断热门筛选中是否也有该排序 //判断排序选中,判断热门筛选中是否也有该排序
if (headData!!.highlighter.size > 0) { if (headData!!.highlighter.size > 0) {
...@@ -1371,8 +1375,11 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1371,8 +1375,11 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
* *
* 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态 * 新增逻辑:当主题选择后,需要判断热门筛选中是否也有该主题,如果有,也需要同步更新选中状态
*/ */
override fun onCategoriesSelected() { override fun onCategoriesSelected(signLit:ArrayList<String>) {
// ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_THEME_CLICK, categories.map { it.cateName }.joinToString("|")) if (signLit.isNotEmpty()){
val sign1 = signLit.map { it }.joinToString { "," }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK, sign1,"app","")
}
if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){ if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
...@@ -1415,7 +1422,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1415,7 +1422,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
ActionCountUtils.count( ActionCountUtils.count(
ConsultBIConstants.UserMainEvent.YDL_USER_SEARCH_CLICK, ConsultBIConstants.UserMainEvent.YDL_USER_SEARCH_CLICK,
keyWord ?: "" cateName ?: ""
) )
isDoSearch = true isDoSearch = true
resetFilter() resetFilter()
...@@ -1491,17 +1498,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1491,17 +1498,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
} }
/**
* 事件埋点
*/
fun bury(keyworks: String, isResult: Boolean, isRecommend: Boolean, location: String) {
BuryPointUtils.getInstance().createMap()
.put("keyWord", keyworks)
.put("hasResult", isResult)
.put("isRecommend", isRecommend)
.put("location", location)
.burryPoint("search")
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
......
...@@ -52,13 +52,14 @@ import com.yidianling.consultant.ui.view.CategoryPopupWindow ...@@ -52,13 +52,14 @@ import com.yidianling.consultant.ui.view.CategoryPopupWindow
import com.yidianling.consultant.ui.view.FilterPopupWindow import com.yidianling.consultant.ui.view.FilterPopupWindow
import com.yidianling.consultant.ui.view.SortPopupWindow import com.yidianling.consultant.ui.view.SortPopupWindow
import com.yidianling.consultant.ui.view.topView.RecommendListView import com.yidianling.consultant.ui.view.topView.RecommendListView
import com.yidianling.home.api.event.HomeModuleTabEvent
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.consultant_activity_expert_search_list.* import kotlinx.android.synthetic.main.consultant_activity_expert_search_list.*
import kotlinx.android.synthetic.main.consultant_item_filter_online.view.* import kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import kotlinx.android.synthetic.main.consultant_layout_search_content.* import kotlinx.android.synthetic.main.consultant_layout_search_content.*
import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.* import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import org.json.JSONObject import org.json.JSONObject
import java.util.concurrent.Executors import java.util.concurrent.Executors
import kotlin.collections.ArrayList
@Route(path = "/consultant/consultant") @Route(path = "/consultant/consultant")
class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView, class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView,
...@@ -74,6 +75,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -74,6 +75,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
override fun initDataAndEvent() { override fun initDataAndEvent() {
EventBus.getDefault().register(this)
mContext = requireContext() mContext = requireContext()
mActivity = requireActivity() mActivity = requireActivity()
val statusBarHeight = StatusBarUtils.getStatusBarHeight(mContext) val statusBarHeight = StatusBarUtils.getStatusBarHeight(mContext)
...@@ -421,8 +423,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -421,8 +423,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
if (view.childCount > 0) { if (view.childCount > 0) {
return return
} }
// val popWidth = RxDeviceTool.getScreenWidth(context)
// val mWidth = (popWidth - RxImageTool.dp2px(10f)) / hotData.size
for (hot in hotData) { for (hot in hotData) {
val tv = View.inflate(context, R.layout.consultant_item_filter_online, null) as TextView val tv = View.inflate(context, R.layout.consultant_item_filter_online, null) as TextView
val textView = tv.tvFree val textView = tv.tvFree
...@@ -441,6 +441,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -441,6 +441,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
dealHotSelect(hot, true) dealHotSelect(hot, true)
textView.isSelected = true textView.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
// 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,
ConsultBIConstants.ConsultEvent.POSITION_CHOICE_FILTER_CLICK,hot.value!!,"app","")
} }
filterLabelSet() filterLabelSet()
//开始筛选数据 //开始筛选数据
...@@ -727,17 +730,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -727,17 +730,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
* 获取专家列表数据 * 获取专家列表数据
*/ */
override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) { override fun onDoctorListFetched(data: MutableList<ExpertServiceItem>, extras:Extras?,curPage:Int) {
LogUtil.d("onDoctorListFetched")
if (rvExperts.adapter != doctorAdapter) { if (rvExperts.adapter != doctorAdapter) {
rvExperts.adapter = doctorAdapter rvExperts.adapter = doctorAdapter
} }
LogUtil.d("data size " + data.size) LogUtil.d("data size " + data.size)
if (fromPageType == -1) {
bury(keyWord ?: "", data.size > 0, isRecommend, "首页分类")
} else {
bury(keyWord ?: "", data.size > 0, isRecommend, fromPages[fromPageType])
}
// 如果是第一页 // 如果是第一页
if (curPage==1){ if (curPage==1){
if (data.size>=10){ if (data.size>=10){
...@@ -766,6 +763,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -766,6 +763,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
rvExperts.visibility = View.VISIBLE rvExperts.visibility = View.VISIBLE
srlContainer.isRefreshing = false srlContainer.isRefreshing = false
// 埋点
val sign1 = data.map { it.id }.joinToString { "|" }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT,sign1,sign2,"app")
} }
override fun fetchListFailed(msg: String?) { override fun fetchListFailed(msg: String?) {
...@@ -1305,8 +1306,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1305,8 +1306,11 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
* 主题选择确认回调 * 主题选择确认回调
* *
*/ */
override fun onCategoriesSelected() { override fun onCategoriesSelected(signLit:ArrayList<String>) {
// ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_THEME_CLICK, categories.map { it.cateName }.joinToString("|")) if (signLit.isNotEmpty()){
val sign1 = signLit.map { it }.joinToString { "," }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.ConsultEvent.POSITION_TWO_CATEGORY_CLICK, sign1,"app","")
}
if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){ if (allFilter.categoryId2List.size>0||allFilter.categoryId3List.size>0){
updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED) updateFilterTextViewStatus(tvSubject, FILTER_STATUS_FILTERED)
...@@ -1322,6 +1326,17 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1322,6 +1326,17 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
/**
* EventBus从首页某个位置点击事件传递
* sign 仅用于埋点事件统计
*/
private var sign2=""
fun onEvent(event: HomeModuleTabEvent) {
if (!TextUtils.isEmpty(event.sign)){
sign2 = event.sign
}
}
//刷新列表 //刷新列表
private fun refresh(isShowRefresh: Boolean? = true) { private fun refresh(isShowRefresh: Boolean? = true) {
srlContainer.isRefreshing = isShowRefresh!! srlContainer.isRefreshing = isShowRefresh!!
...@@ -1381,18 +1396,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1381,18 +1396,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
/**
* 事件埋点
*/
fun bury(keyworks: String, isResult: Boolean, isRecommend: Boolean, location: String) {
BuryPointUtils.getInstance().createMap()
.put("keyWord", keyworks)
.put("hasResult", isResult)
.put("isRecommend", isRecommend)
.put("location", location)
.burryPoint("search")
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
refresh(false) refresh(false)
...@@ -1402,6 +1405,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1402,6 +1405,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
EventBus.getDefault().unregister(this)
mHandler=null mHandler=null
ConsultAssistantDialogUtils.INSTANCE.resetStatus() ConsultAssistantDialogUtils.INSTANCE.resetStatus()
} }
......
...@@ -124,7 +124,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -124,7 +124,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
} }
val titleMap = HashMap<String, Any>() val titleMap = HashMap<String, Any>()
titleMap["in"] = title titleMap["in"] = title
filterMap["title"] = titleMap filterMap["titles.title"] = titleMap
} }
// 擅长人群 // 擅长人群
if (allFilter.specialityCrowd.isNotEmpty()) { if (allFilter.specialityCrowd.isNotEmpty()) {
...@@ -134,7 +134,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -134,7 +134,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
} }
val specialityCrowdMap = HashMap<String, Any>() val specialityCrowdMap = HashMap<String, Any>()
specialityCrowdMap["in"] = specialityCrowdMap specialityCrowdMap["in"] = specialityCrowdMap
filterMap["doctor_tag_list.list_cate_id"] = specialityCrowdMap filterMap["doctor_tag_list.list.tag_id"] = specialityCrowdMap
} }
// 学历 // 学历
if (allFilter.doctorEdu.isNotEmpty()) { if (allFilter.doctorEdu.isNotEmpty()) {
......
...@@ -331,7 +331,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -331,7 +331,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
} }
ExpertSearchActivity.startSearch(this, keyWord) ExpertSearchActivity.startSearch(this, keyWord,"14")
this.finish() this.finish()
} }
......
...@@ -428,20 +428,10 @@ class ExpertSearchAdapter( ...@@ -428,20 +428,10 @@ class ExpertSearchAdapter(
if (!TextUtils.isEmpty(cateId)) { if (!TextUtils.isEmpty(cateId)) {
linkUrl = URLUtils.appendParmas(linkUrl, "cateId", cateId) linkUrl = URLUtils.appendParmas(linkUrl, "cateId", cateId)
} }
if (pageIndex == 0) {
ActionCountUtils.count(
ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_DOCTOR_CLICK,
itemBean.id ?: ""
)
} else {
ActionCountUtils.count(
ConsultBIConstants.ConsultSearchListEvent.APP_CONSULT_SEARCH_LIST_CONSULT_ITEM_CLICK,
itemBean.id ?: ""
)
}
TempH5RouteUtils.tempH5Route(linkUrl) TempH5RouteUtils.tempH5Route(linkUrl)
// 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_CONSULT_COUNSELOR_LIST_PAGE,ConsultBIConstants.ConsultEvent.POSITION_CONSULT_COUNSELOR_CARD_CLICK,itemBean.id?:"","app","")
} }
} }
......
...@@ -19,7 +19,9 @@ class ConsultBIConstants { ...@@ -19,7 +19,9 @@ class ConsultBIConstants {
const val POSITION_CONSULT_FILTER_RESET_CLICK = "consult_filter_reset_click" //重置 const val POSITION_CONSULT_FILTER_RESET_CLICK = "consult_filter_reset_click" //重置
const val POSITION_CONSULT_FILTER_CHECKOUT_CLICK = "consult_filter_checkoutallconsultants_click" //查看XXX位咨询师 const val POSITION_CONSULT_FILTER_CHECKOUT_CLICK = "consult_filter_checkoutallconsultants_click" //查看XXX位咨询师
const val POSITION_DAOYI_ADVERTISEMENT_CLICK="daoyi_advertisement_page|daoyi_advertisement_click" const val POSITION_DAOYI_ADVERTISEMENT_CLICK="daoyi_advertisement_page|daoyi_advertisement_click"
const val POSITION_DAOYI_ADVERTISEMENT_VISIT="daoyi_advertisement_page|daoyi_advertisement_visit"
const val PART_ID_CONSULT_COUNSELOR_LIST_PAGE="consult_counselor_list_page" // 咨询师列表页面浏览part_id
const val POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT="consult_counselor_list_page_visit" // 咨询师列表页面浏览position
} }
//====================APP咨询列表页(app_consult_list_page)==================== //====================APP咨询列表页(app_consult_list_page)====================
...@@ -51,6 +53,9 @@ class ConsultBIConstants { ...@@ -51,6 +53,9 @@ class ConsultBIConstants {
const val YDL_USER_CONSULT_TYPE_CLICK: String = const val YDL_USER_CONSULT_TYPE_CLICK: String =
APP_CONSULT_LIST_PAGE + "ydl_user_consult_type_click"//咨询师顶部ICON 厌学专题、限时特惠、精神心理 APP_CONSULT_LIST_PAGE + "ydl_user_consult_type_click"//咨询师顶部ICON 厌学专题、限时特惠、精神心理
const val POSITION_CONSULT_COUNSELOR_CARD_CLICK="consult_counselor_card_click" // 咨询师列表点击position
const val POSITION_CHOICE_FILTER_CLICK="choice_filter_click" // 热门点击项position
const val POSITION_TWO_CATEGORY_CLICK="two_category_click" // 八大类标签选择埋点
} }
} }
class ConsultSearchListEvent { class ConsultSearchListEvent {
......
...@@ -5,5 +5,5 @@ package com.yidianling.consultant.listener ...@@ -5,5 +5,5 @@ package com.yidianling.consultant.listener
* Created by zqk on 17-9-20. * Created by zqk on 17-9-20.
*/ */
interface OnCategoriesSelectedListener { interface OnCategoriesSelectedListener {
fun onCategoriesSelected() fun onCategoriesSelected(signLit:ArrayList<String>)
} }
\ No newline at end of file
...@@ -40,6 +40,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -40,6 +40,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
private val interpersonalRelationshipList = ArrayList<ChildrenBean>() private val interpersonalRelationshipList = ArrayList<ChildrenBean>()
private val careerDevelopmentList = ArrayList<ChildrenBean>() private val careerDevelopmentList = ArrayList<ChildrenBean>()
private val mentalHealthList = ArrayList<ChildrenBean>() private val mentalHealthList = ArrayList<ChildrenBean>()
// 记录每个大类标签选择的位置,重置的时候可以减少循坏,提升性能
private val chooseChildIndexList = ArrayList<Int>() private val chooseChildIndexList = ArrayList<Int>()
private val chooseStressIndexList = ArrayList<Int>() private val chooseStressIndexList = ArrayList<Int>()
private val chooseLoveEmotionIndexList = ArrayList<Int>() private val chooseLoveEmotionIndexList = ArrayList<Int>()
...@@ -48,6 +49,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -48,6 +49,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
private val chooseInterpersonalRelationshipIndexList = ArrayList<Int>() private val chooseInterpersonalRelationshipIndexList = ArrayList<Int>()
private val chooseCareerDevelopmentIndexList = ArrayList<Int>() private val chooseCareerDevelopmentIndexList = ArrayList<Int>()
private val chooseMentalHealthIndexList = ArrayList<Int>() private val chooseMentalHealthIndexList = ArrayList<Int>()
private val signList = ArrayList<String>() // 用于埋点
private lateinit var childEducationAdapter:SortAdapter private lateinit var childEducationAdapter:SortAdapter
private lateinit var stressAdapter:SortAdapter private lateinit var stressAdapter:SortAdapter
private lateinit var loveEmotionAdapter:SortAdapter private lateinit var loveEmotionAdapter:SortAdapter
...@@ -125,7 +127,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -125,7 +127,7 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
} }
// 确定 // 确定
view.btnConfirm.setOnClickListener { view.btnConfirm.setOnClickListener {
onSubjectsSelectedListener?.onCategoriesSelected() onSubjectsSelectedListener?.onCategoriesSelected(signList)
dismiss() dismiss()
} }
// 亲子教育 // 亲子教育
...@@ -140,13 +142,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -140,13 +142,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
childList[0].isSelected = false childList[0].isSelected = false
mAllFilter.categoryId2List.remove(childList[0].cate_id) mAllFilter.categoryId2List.remove(childList[0].cate_id)
chooseChildIndexList.remove(position) chooseChildIndexList.remove(position)
signList.remove("亲子教育")
}else{ }else{
childList.forEachIndexed { index, _ -> childList.forEachIndexed { index, _ ->
childList[index].isSelected = index==0 childList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(childList[0].cate_id) mAllFilter.categoryId2List.add(childList[0].cate_id)
signList.add("亲子教育")
}else{ }else{
mAllFilter.categoryId3List.remove(childList[index].cate_id) mAllFilter.categoryId3List.remove(childList[index].cate_id)
signList.remove(childList[index].cate_name)
} }
} }
chooseChildIndexList.add(position) chooseChildIndexList.add(position)
...@@ -160,9 +165,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -160,9 +165,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (childList[position].isSelected){ if (childList[position].isSelected){
mAllFilter.categoryId3List.add(childList[position].cate_id) mAllFilter.categoryId3List.add(childList[position].cate_id)
chooseChildIndexList.add(position) chooseChildIndexList.add(position)
signList.add(childList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(childList[position].cate_id) mAllFilter.categoryId3List.remove(childList[position].cate_id)
chooseChildIndexList.remove(position) chooseChildIndexList.remove(position)
signList.remove(childList[position].cate_name)
} }
} }
childEducationAdapter.notifyDataSetChanged() childEducationAdapter.notifyDataSetChanged()
...@@ -179,13 +186,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -179,13 +186,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
stressList[0].isSelected = false stressList[0].isSelected = false
mAllFilter.categoryId2List.remove(stressList[0].cate_id) mAllFilter.categoryId2List.remove(stressList[0].cate_id)
chooseStressIndexList.remove(position) chooseStressIndexList.remove(position)
signList.remove("情绪压力")
}else{ }else{
stressList.forEachIndexed { index, _ -> stressList.forEachIndexed { index, _ ->
stressList[index].isSelected = index==0 stressList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(stressList[0].cate_id) mAllFilter.categoryId2List.add(stressList[0].cate_id)
signList.add("情绪压力")
}else{ }else{
mAllFilter.categoryId3List.remove(stressList[index].cate_id) mAllFilter.categoryId3List.remove(stressList[index].cate_id)
signList.remove(stressList[index].cate_name)
} }
} }
chooseStressIndexList.add(position) chooseStressIndexList.add(position)
...@@ -199,9 +209,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -199,9 +209,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (stressList[position].isSelected){ if (stressList[position].isSelected){
mAllFilter.categoryId3List.add(stressList[position].cate_id) mAllFilter.categoryId3List.add(stressList[position].cate_id)
chooseStressIndexList.add(position) chooseStressIndexList.add(position)
signList.add(stressList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(stressList[position].cate_id) mAllFilter.categoryId3List.remove(stressList[position].cate_id)
chooseStressIndexList.remove(position) chooseStressIndexList.remove(position)
signList.remove(stressList[position].cate_name)
} }
} }
stressAdapter.notifyDataSetChanged() stressAdapter.notifyDataSetChanged()
...@@ -218,13 +230,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -218,13 +230,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
loveEmotionList[0].isSelected = false loveEmotionList[0].isSelected = false
mAllFilter.categoryId2List.remove(loveEmotionList[0].cate_id) mAllFilter.categoryId2List.remove(loveEmotionList[0].cate_id)
chooseLoveEmotionIndexList.remove(position) chooseLoveEmotionIndexList.remove(position)
signList.remove("恋爱情感")
}else{ }else{
loveEmotionList.forEachIndexed { index, _ -> loveEmotionList.forEachIndexed { index, _ ->
loveEmotionList[index].isSelected = index==0 loveEmotionList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(loveEmotionList[0].cate_id) mAllFilter.categoryId2List.add(loveEmotionList[0].cate_id)
signList.add("恋爱情感")
}else{ }else{
mAllFilter.categoryId3List.remove(loveEmotionList[index].cate_id) mAllFilter.categoryId3List.remove(loveEmotionList[index].cate_id)
signList.remove(loveEmotionList[index].cate_name)
} }
} }
chooseLoveEmotionIndexList.add(position) chooseLoveEmotionIndexList.add(position)
...@@ -238,9 +253,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -238,9 +253,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (loveEmotionList[position].isSelected){ if (loveEmotionList[position].isSelected){
mAllFilter.categoryId3List.add(loveEmotionList[position].cate_id) mAllFilter.categoryId3List.add(loveEmotionList[position].cate_id)
chooseLoveEmotionIndexList.add(position) chooseLoveEmotionIndexList.add(position)
signList.add(loveEmotionList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(loveEmotionList[position].cate_id) mAllFilter.categoryId3List.remove(loveEmotionList[position].cate_id)
chooseLoveEmotionIndexList.remove(position) chooseLoveEmotionIndexList.remove(position)
signList.remove(loveEmotionList[position].cate_name)
} }
} }
loveEmotionAdapter.notifyDataSetChanged() loveEmotionAdapter.notifyDataSetChanged()
...@@ -257,13 +274,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -257,13 +274,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
marriedFamilyList[0].isSelected = false marriedFamilyList[0].isSelected = false
mAllFilter.categoryId2List.remove(marriedFamilyList[0].cate_id) mAllFilter.categoryId2List.remove(marriedFamilyList[0].cate_id)
chooseMarriedFamilyIndexList.remove(position) chooseMarriedFamilyIndexList.remove(position)
signList.remove("婚姻家庭")
}else{ }else{
marriedFamilyList.forEachIndexed { index, _ -> marriedFamilyList.forEachIndexed { index, _ ->
marriedFamilyList[index].isSelected = index==0 marriedFamilyList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(marriedFamilyList[0].cate_id) mAllFilter.categoryId2List.add(marriedFamilyList[0].cate_id)
signList.add("婚姻家庭")
}else{ }else{
mAllFilter.categoryId3List.remove(marriedFamilyList[index].cate_id) mAllFilter.categoryId3List.remove(marriedFamilyList[index].cate_id)
signList.remove(marriedFamilyList[index].cate_name)
} }
} }
chooseMarriedFamilyIndexList.add(position) chooseMarriedFamilyIndexList.add(position)
...@@ -277,9 +297,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -277,9 +297,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (marriedFamilyList[position].isSelected){ if (marriedFamilyList[position].isSelected){
mAllFilter.categoryId3List.add(marriedFamilyList[position].cate_id) mAllFilter.categoryId3List.add(marriedFamilyList[position].cate_id)
chooseMarriedFamilyIndexList.add(position) chooseMarriedFamilyIndexList.add(position)
signList.add(marriedFamilyList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(marriedFamilyList[position].cate_id) mAllFilter.categoryId3List.remove(marriedFamilyList[position].cate_id)
chooseMarriedFamilyIndexList.remove(position) chooseMarriedFamilyIndexList.remove(position)
signList.remove(marriedFamilyList[position].cate_name)
} }
} }
marriedFamilyAdapter.notifyDataSetChanged() marriedFamilyAdapter.notifyDataSetChanged()
...@@ -296,13 +318,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -296,13 +318,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
personalGrowthList[0].isSelected = false personalGrowthList[0].isSelected = false
mAllFilter.categoryId2List.remove(personalGrowthList[0].cate_id) mAllFilter.categoryId2List.remove(personalGrowthList[0].cate_id)
choosePersonalGrowthIndexList.remove(position) choosePersonalGrowthIndexList.remove(position)
signList.remove("个人成长")
}else{ }else{
personalGrowthList.forEachIndexed { index, _ -> personalGrowthList.forEachIndexed { index, _ ->
personalGrowthList[index].isSelected = index==0 personalGrowthList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(personalGrowthList[0].cate_id) mAllFilter.categoryId2List.add(personalGrowthList[0].cate_id)
signList.add("个人成长")
}else{ }else{
mAllFilter.categoryId3List.remove(personalGrowthList[index].cate_id) mAllFilter.categoryId3List.remove(personalGrowthList[index].cate_id)
signList.remove(personalGrowthList[index].cate_name)
} }
} }
choosePersonalGrowthIndexList.add(position) choosePersonalGrowthIndexList.add(position)
...@@ -316,9 +341,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -316,9 +341,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (personalGrowthList[position].isSelected){ if (personalGrowthList[position].isSelected){
mAllFilter.categoryId3List.add(personalGrowthList[position].cate_id) mAllFilter.categoryId3List.add(personalGrowthList[position].cate_id)
choosePersonalGrowthIndexList.add(position) choosePersonalGrowthIndexList.add(position)
signList.add(personalGrowthList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(personalGrowthList[position].cate_id) mAllFilter.categoryId3List.remove(personalGrowthList[position].cate_id)
choosePersonalGrowthIndexList.remove(position) choosePersonalGrowthIndexList.remove(position)
signList.remove(personalGrowthList[position].cate_name)
} }
} }
personalGrowthAdapter.notifyDataSetChanged() personalGrowthAdapter.notifyDataSetChanged()
...@@ -335,13 +362,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -335,13 +362,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
interpersonalRelationshipList[0].isSelected = false interpersonalRelationshipList[0].isSelected = false
mAllFilter.categoryId2List.remove(interpersonalRelationshipList[0].cate_id) mAllFilter.categoryId2List.remove(interpersonalRelationshipList[0].cate_id)
chooseInterpersonalRelationshipIndexList.remove(position) chooseInterpersonalRelationshipIndexList.remove(position)
signList.remove("人际关系")
}else{ }else{
interpersonalRelationshipList.forEachIndexed { index, _ -> interpersonalRelationshipList.forEachIndexed { index, _ ->
interpersonalRelationshipList[index].isSelected = index==0 interpersonalRelationshipList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(interpersonalRelationshipList[0].cate_id) mAllFilter.categoryId2List.add(interpersonalRelationshipList[0].cate_id)
signList.add("人际关系")
}else{ }else{
mAllFilter.categoryId3List.remove(interpersonalRelationshipList[index].cate_id) mAllFilter.categoryId3List.remove(interpersonalRelationshipList[index].cate_id)
signList.remove(interpersonalRelationshipList[index].cate_name)
} }
} }
chooseInterpersonalRelationshipIndexList.add(position) chooseInterpersonalRelationshipIndexList.add(position)
...@@ -355,9 +385,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -355,9 +385,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (interpersonalRelationshipList[position].isSelected){ if (interpersonalRelationshipList[position].isSelected){
mAllFilter.categoryId3List.add(interpersonalRelationshipList[position].cate_id) mAllFilter.categoryId3List.add(interpersonalRelationshipList[position].cate_id)
chooseInterpersonalRelationshipIndexList.add(position) chooseInterpersonalRelationshipIndexList.add(position)
signList.add(interpersonalRelationshipList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(interpersonalRelationshipList[position].cate_id) mAllFilter.categoryId3List.remove(interpersonalRelationshipList[position].cate_id)
chooseInterpersonalRelationshipIndexList.remove(position) chooseInterpersonalRelationshipIndexList.remove(position)
signList.remove(interpersonalRelationshipList[position].cate_name)
} }
} }
interpersonalRelationshipAdapter.notifyDataSetChanged() interpersonalRelationshipAdapter.notifyDataSetChanged()
...@@ -374,13 +406,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -374,13 +406,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
careerDevelopmentList[0].isSelected = false careerDevelopmentList[0].isSelected = false
mAllFilter.categoryId2List.remove(childList[0].cate_id) mAllFilter.categoryId2List.remove(childList[0].cate_id)
chooseCareerDevelopmentIndexList.remove(position) chooseCareerDevelopmentIndexList.remove(position)
signList.remove("职场发展")
}else{ }else{
careerDevelopmentList.forEachIndexed { index, _ -> careerDevelopmentList.forEachIndexed { index, _ ->
careerDevelopmentList[index].isSelected = index==0 careerDevelopmentList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(careerDevelopmentList[0].cate_id) mAllFilter.categoryId2List.add(careerDevelopmentList[0].cate_id)
signList.add("职场发展")
}else{ }else{
mAllFilter.categoryId3List.remove(careerDevelopmentList[index].cate_id) mAllFilter.categoryId3List.remove(careerDevelopmentList[index].cate_id)
signList.remove(careerDevelopmentList[index].cate_name)
} }
} }
chooseCareerDevelopmentIndexList.add(position) chooseCareerDevelopmentIndexList.add(position)
...@@ -393,9 +428,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -393,9 +428,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (careerDevelopmentList[position].isSelected){ if (careerDevelopmentList[position].isSelected){
mAllFilter.categoryId3List.add(careerDevelopmentList[position].cate_id) mAllFilter.categoryId3List.add(careerDevelopmentList[position].cate_id)
chooseCareerDevelopmentIndexList.add(position) chooseCareerDevelopmentIndexList.add(position)
signList.add(careerDevelopmentList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(careerDevelopmentList[position].cate_id) mAllFilter.categoryId3List.remove(careerDevelopmentList[position].cate_id)
chooseCareerDevelopmentIndexList.remove(position) chooseCareerDevelopmentIndexList.remove(position)
signList.remove(careerDevelopmentList[position].cate_name)
} }
} }
careerDevelopmentAdapter.notifyDataSetChanged() careerDevelopmentAdapter.notifyDataSetChanged()
...@@ -412,13 +449,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -412,13 +449,16 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
mentalHealthList[0].isSelected = false mentalHealthList[0].isSelected = false
mAllFilter.categoryId2List.remove(mentalHealthList[0].cate_id) mAllFilter.categoryId2List.remove(mentalHealthList[0].cate_id)
chooseMentalHealthIndexList.remove(position) chooseMentalHealthIndexList.remove(position)
signList.remove("心理健康")
}else{ }else{
mentalHealthList.forEachIndexed { index, _ -> mentalHealthList.forEachIndexed { index, _ ->
mentalHealthList[index].isSelected = index==0 mentalHealthList[index].isSelected = index==0
if (index==0){ if (index==0){
mAllFilter.categoryId2List.add(mentalHealthList[0].cate_id) mAllFilter.categoryId2List.add(mentalHealthList[0].cate_id)
signList.add("心理健康")
}else{ }else{
mAllFilter.categoryId3List.remove(mentalHealthList[index].cate_id) mAllFilter.categoryId3List.remove(mentalHealthList[index].cate_id)
signList.remove(mentalHealthList[index].cate_name)
} }
} }
chooseMentalHealthIndexList.add(position) chooseMentalHealthIndexList.add(position)
...@@ -431,9 +471,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi ...@@ -431,9 +471,11 @@ class CategoryPopupWindow(context: Context,allFilter:AllFilter) : PopupWindow(Vi
if (mentalHealthList[position].isSelected){ if (mentalHealthList[position].isSelected){
mAllFilter.categoryId3List.add(mentalHealthList[position].cate_id) mAllFilter.categoryId3List.add(mentalHealthList[position].cate_id)
chooseMentalHealthIndexList.add(position) chooseMentalHealthIndexList.add(position)
signList.add(mentalHealthList[position].cate_name)
}else{ }else{
mAllFilter.categoryId3List.remove(mentalHealthList[position].cate_id) mAllFilter.categoryId3List.remove(mentalHealthList[position].cate_id)
chooseMentalHealthIndexList.remove(position) chooseMentalHealthIndexList.remove(position)
signList.remove(mentalHealthList[position].cate_name)
} }
} }
mentalHealthAdapter.notifyDataSetChanged() mentalHealthAdapter.notifyDataSetChanged()
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<LinearLayout <LinearLayout
android:id="@+id/clContainer" android:id="@+id/clContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
......
...@@ -213,9 +213,7 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -213,9 +213,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
return return
} }
EventBus.getDefault().post( EventBus.getDefault().post(
HomeModuleTabEvent( HomeModuleTabEvent(2,"12")
2
)
) )
ActionCountUtils.count(HomeBIConstants.YDL_USER_CONSULT_MORE_CLICK) ActionCountUtils.count(HomeBIConstants.YDL_USER_CONSULT_MORE_CLICK)
} }
...@@ -286,9 +284,7 @@ open class HomeBaseImpl : IHomeBaseEvent { ...@@ -286,9 +284,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
return return
} }
EventBus.getDefault().post( EventBus.getDefault().post(
HomeModuleTabEvent( HomeModuleTabEvent(2,"11")
2
)
) )
ActionCountUtils.count(HomeBIConstants.YDL_USER_CONSULT_CLICK) ActionCountUtils.count(HomeBIConstants.YDL_USER_CONSULT_CLICK)
} }
......
...@@ -75,7 +75,7 @@ interface IHomeBaseEvent { ...@@ -75,7 +75,7 @@ interface IHomeBaseEvent {
fun categoryClick(category: HomeHeaderBean.AskCategoryDataBean) fun categoryClick(category: HomeHeaderBean.AskCategoryDataBean)
/** /**
* 预约专家点击事件 * 心理咨询点击事件
*/ */
fun reservationExpertsClick() fun reservationExpertsClick()
......
...@@ -3,6 +3,12 @@ package com.yidianling.home.api.event; ...@@ -3,6 +3,12 @@ package com.yidianling.home.api.event;
public class HomeModuleTabEvent { public class HomeModuleTabEvent {
private int tabIndex; private int tabIndex;
public String sign; // 用于埋点参数
public HomeModuleTabEvent(int index,String sign) {
tabIndex = index;
this.sign =sign;
}
public HomeModuleTabEvent(int index) { public HomeModuleTabEvent(int index) {
tabIndex = index; tabIndex = index;
......
...@@ -145,10 +145,9 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -145,10 +145,9 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
private fun initView() { private fun initView() {
if (HomeViewConfig.getOrder().bannerIndex == null || HomeViewConfig.getOrder().bannerIndex == -1) { if (HomeViewConfig.getOrder().bannerIndex == null || HomeViewConfig.getOrder().bannerIndex == -1) {
var marginTop = this.resources.getDimension(R.dimen.home_home_title_bar_height) var marginTop = this.resources.getDimension(R.dimen.home_home_title_bar_height)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4以下不支持状态栏变色 //4.4以下不支持状态栏变色
val statusBarHeight = StatusBarUtils.getStatusBarHeight(mActivity) val statusBarHeight = StatusBarUtils.getStatusBarHeight(mActivity)
marginTop += statusBarHeight marginTop += statusBarHeight
}
val lp = home_swipe_refresh_layout.layoutParams as FrameLayout.LayoutParams val lp = home_swipe_refresh_layout.layoutParams as FrameLayout.LayoutParams
lp.topMargin = marginTop.toInt() lp.topMargin = marginTop.toInt()
home_swipe_refresh_layout.layoutParams = lp home_swipe_refresh_layout.layoutParams = lp
...@@ -179,9 +178,9 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -179,9 +178,9 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
* 初始化状态栏位置 * 初始化状态栏位置
*/ */
private fun initStatus() { private fun initStatus() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4以下不支持状态栏变色 //4.4以下不支持状态栏变色
val statusBarHeight = StatusBarUtils.getStatusBarHeight(mActivity) val statusBarHeight = StatusBarUtils.getStatusBarHeight(mActivity)
var homeTitleBarHeight = resources.getDimension(R.dimen.home_home_title_bar_height) val homeTitleBarHeight = resources.getDimension(R.dimen.home_home_title_bar_height)
val lp1 = view_rl_top_bg.layoutParams as RelativeLayout.LayoutParams val lp1 = view_rl_top_bg.layoutParams as RelativeLayout.LayoutParams
lp1.height = (homeTitleBarHeight + statusBarHeight).toInt() lp1.height = (homeTitleBarHeight + statusBarHeight).toInt()
view_rl_top_bg.layoutParams = lp1 view_rl_top_bg.layoutParams = lp1
...@@ -190,7 +189,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -190,7 +189,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
lp2.topMargin = statusBarHeight lp2.topMargin = statusBarHeight
rl_top.layoutParams = lp2 rl_top.layoutParams = lp2
} }
}
override fun initDataAndEventLazy() { override fun initDataAndEventLazy() {
} }
......
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