Commit 2f9e7722 by 霍志良

feat:BUG修改

parent b1fbfa5c
...@@ -33,6 +33,7 @@ import com.yidianling.consultant.api.IConsultantService ...@@ -33,6 +33,7 @@ import com.yidianling.consultant.api.IConsultantService
import com.yidianling.consultant.bean.* import com.yidianling.consultant.bean.*
import com.yidianling.consultant.constants.ConsultBIConstants import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.SEARCH_BANNERWORD_CLICK import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.SEARCH_BANNERWORD_CLICK
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.YDL_USER_CONSULT_SEARCH_CONFIRM_CLICK
import com.yidianling.consultant.contract.IHotSearchContract import com.yidianling.consultant.contract.IHotSearchContract
import com.yidianling.consultant.model.bean.FunctionWordBean import com.yidianling.consultant.model.bean.FunctionWordBean
import com.yidianling.consultant.modular.utils.ConsultAssistantEntryUtils import com.yidianling.consultant.modular.utils.ConsultAssistantEntryUtils
...@@ -110,6 +111,12 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -110,6 +111,12 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
} }
etSearch.setOnEditorActionListener { _, actionId, _ -> etSearch.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH) { if (actionId == EditorInfo.IME_ACTION_SEARCH) {
//埋点
ActionCountUtils.count(
YDL_USER_CONSULT_SEARCH_CONFIRM_CLICK,
etSearch.text.toString(),
etSearch.hint.toString()
)
// 搜索的关联词 // 搜索的关联词
var relatedWords = "" var relatedWords = ""
var isRecommendWords = false var isRecommendWords = false
......
...@@ -27,6 +27,7 @@ class ConsultBIConstants { ...@@ -27,6 +27,7 @@ class ConsultBIConstants {
const val POSITION_YDL_USER_ASSOCIATE_WORD_CLICK="ydl_user_associate_word_click" // 联想词点击position const val POSITION_YDL_USER_ASSOCIATE_WORD_CLICK="ydl_user_associate_word_click" // 联想词点击position
// 咨询师列表页 banner 点击事件 // 咨询师列表页 banner 点击事件
const val POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK = "consult_counselor_list_banner_click" const val POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK = "consult_counselor_list_banner_click"
} }
//====================APP咨询列表页(app_consult_list_page)==================== //====================APP咨询列表页(app_consult_list_page)====================
...@@ -57,7 +58,8 @@ class ConsultBIConstants { ...@@ -57,7 +58,8 @@ class ConsultBIConstants {
APP_CONSULT_LIST_PAGE + "ydl_user_consult_search_click"//咨询师页搜索框点击事件 APP_CONSULT_LIST_PAGE + "ydl_user_consult_search_click"//咨询师页搜索框点击事件
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 YDL_USER_CONSULT_SEARCH_CONFIRM_CLICK: String =
APP_CONSULT_LIST_PAGE + "YDL_USER_CONSULT_SEARCH_CONFIRM_CLICK"//搜索词、底纹词点击埋点
const val POSITION_CONSULT_COUNSELOR_CARD_CLICK = const val POSITION_CONSULT_COUNSELOR_CARD_CLICK =
"consult_counselor_card_click" // 咨询师列表点击position "consult_counselor_card_click" // 咨询师列表点击position
const val POSITION_CHOICE_FILTER_CLICK = const val POSITION_CHOICE_FILTER_CLICK =
......
...@@ -60,6 +60,7 @@ class PricePopupWindow( ...@@ -60,6 +60,7 @@ class PricePopupWindow(
contentView.price_Confirm.setOnClickListener { contentView.price_Confirm.setOnClickListener {
if (max_Price == infiniteText) max_Price = "" if (max_Price == infiniteText) max_Price = ""
var priceRangesItem = PriceRangesItem(min_Price, max_Price) var priceRangesItem = PriceRangesItem(min_Price, max_Price)
tempFilter.priceRanges = priceRangesItem
onPriceItemSelectedListener.onPriceItemSelected(priceRangesItem) onPriceItemSelectedListener.onPriceItemSelected(priceRangesItem)
dismiss() dismiss()
} }
...@@ -103,12 +104,13 @@ class PricePopupWindow( ...@@ -103,12 +104,13 @@ class PricePopupWindow(
rightValue: Float, rightValue: Float,
isFromUser: Boolean isFromUser: Boolean
) { ) {
var maxPrice = ((rightValue / 100) * maxPriceValue).toInt().toString() max_Price = ((rightValue / 100) * maxPriceValue).toInt().toString()
if (rightValue > 93) { if (rightValue > 93) {
maxPrice = infiniteText max_Price = infiniteText
} }
min_Price = ((leftValue / 100) * maxPriceValue).toInt().toString()
contentView.tv_start_end_price.text = contentView.tv_start_end_price.text =
((leftValue / 100) * maxPriceValue).toInt().toString() + "-" + maxPrice "$min_Price-$max_Price"
} }
......
...@@ -46,7 +46,9 @@ class HomeCategoryAdapter : PagerAdapter { ...@@ -46,7 +46,9 @@ class HomeCategoryAdapter : PagerAdapter {
return return
} }
Log.e("http", "--------------data.size=" + data!!.size) Log.e("http", "--------------data.size=" + data!!.size)
list = this.averageAssign(data, HomeCategoryContainer.PAGE_ITEM_SIZE) list?.clear()
list?.add(data)
// list = this.averageAssign(data, HomeCategoryContainer.PAGE_ITEM_SIZE)
Log.e("http", "--------------list.size=" + list!!.size) Log.e("http", "--------------list.size=" + list!!.size)
notifyDataSetChanged() notifyDataSetChanged()
} }
......
...@@ -53,27 +53,12 @@ class HomeCategoryContainer(private val mContext: Context, private var homeEvent ...@@ -53,27 +53,12 @@ class HomeCategoryContainer(private val mContext: Context, private var homeEvent
fun initData(bean: HomeHeaderBean?) { fun initData(bean: HomeHeaderBean?) {
if (bean?.goldList == null) return if (bean?.goldList == null) return
mHomeCategoryAdapter?.updateItems(bean?.goldList) mHomeCategoryAdapter?.updateItems(bean?.goldList)
if (bean?.goldList?.size!! > PAGE_ITEM_SIZE) { val params = RelativeLayout.LayoutParams(
count = Math.ceil( ViewGroup.LayoutParams.MATCH_PARENT,
Math.ceil( RxImageTool.dip2px(143f)
bean.goldList?.size?.toFloat()?.div(PAGE_ITEM_SIZE.toFloat()) )
?.toDouble()!! vp_category.layoutParams = params
) ll_Indicator.visibility = View.GONE
).toInt()
createIndicator()
val params = RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
RxImageTool.dip2px(153f)
)
vp_category.layoutParams = params
} else {
val params = RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
RxImageTool.dip2px(143f)
)
vp_category.layoutParams = params
ll_Indicator.visibility = View.GONE
}
} }
private fun initViewPager() { private fun initViewPager() {
......
...@@ -148,9 +148,6 @@ class HomePagerBannerCategoryItemView(mContext: Context, homeEvent: IHomeBaseEve ...@@ -148,9 +148,6 @@ class HomePagerBannerCategoryItemView(mContext: Context, homeEvent: IHomeBaseEve
homeModulePagerBannerFlRoot.removeAllViews() homeModulePagerBannerFlRoot.removeAllViews()
var i = 0 var i = 0
for (item in mDataList!!) { for (item in mDataList!!) {
if (i > 9) {
break
}
val imageView = createIcon(i) val imageView = createIcon(i)
val textView = createText(i) val textView = createText(i)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/vp_category" android:id="@+id/vp_category"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="153dp" android:layout_height="wrap_content"
android:background="@color/platform_white"/> android:background="@color/platform_white"/>
<LinearLayout <LinearLayout
......
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