Commit 2341a33d by 刘鹏

feat : 心理咨询金刚位改版UI还原,首页埋点事件

parent 8858314a
...@@ -9,7 +9,7 @@ ext { ...@@ -9,7 +9,7 @@ ext {
"m-consultant" : "0.0.60.16", "m-consultant" : "0.0.60.16",
"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.26", "m-home" : "0.0.23.35",
"m-im" : "0.0.21.29", "m-im" : "0.0.21.29",
"m-dynamic" : "0.0.7.35", "m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -96,7 +96,7 @@ ext { ...@@ -96,7 +96,7 @@ ext {
"m-consultant" : "0.0.60.16", "m-consultant" : "0.0.60.16",
"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.26", "m-home" : "0.0.23.35",
"m-im" : "0.0.21.29", "m-im" : "0.0.21.29",
"m-dynamic" : "0.0.7.35", "m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
......
...@@ -39,6 +39,8 @@ class HomeBIConstants { ...@@ -39,6 +39,8 @@ class HomeBIConstants {
const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长 const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长
const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想 const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想
const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon
const val YDL_HOME_SEARCH_TAG: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag" // 首页_定制咨询点击tag
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件)
} }
......
...@@ -210,6 +210,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -210,6 +210,9 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
} else { } else {
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -245,6 +248,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -245,6 +248,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
location[1] - heig, location[1] - heig,
location[0] location[0]
).show() ).show()
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
} }
} }
} }
......
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.graphics.Color
import androidx.recyclerview.widget.RecyclerView
import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.RelativeLayout import androidx.recyclerview.widget.RecyclerView
import com.ydl.ydlcommon.data.PlatformDataManager import com.bumptech.glide.Glide
import com.yidianling.common.tools.RxImageTool import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean import com.yidianling.home.model.bean.HomeHeaderBean
...@@ -38,6 +34,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -38,6 +34,10 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this) View.inflate(mContext, R.layout.home_button_banner_view, this)
Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
homeModuleButtonBannerFirst.setOnClickListener { homeModuleButtonBannerFirst.setOnClickListener {
homeEvent?.reservationExpertsClick() homeEvent?.reservationExpertsClick()
} }
......
...@@ -51,11 +51,25 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -51,11 +51,25 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
//设置名称 //设置名称
tv_consult_name.text = bean.name tv_consult_name.text = bean.name
//咨询师标签 //咨询师标签
setTag(bean)
//设置接通率文案
setConnection(bean)
//设置向TA咨询人数
setConfideNum(bean)
setOnClickListener {
val url = URLUtils.appendParmas(bean.linkUrl, "cateId", cateId)
homeEvent!!.consultItemClick(url, bean.doctorId)
}
}
/**咨询师标签*/
private fun setTag(bean: HomeConsultBean.ListBean) {
ll_tags.removeAllViews() ll_tags.removeAllViews()
if (!TextUtils.isEmpty(bean.tags)) { if (!TextUtils.isEmpty(bean.tags)) {
val tagList = bean.tags?.split("|") val tagList = bean.tags?.split("|")
for (tag in tagList) { tagList.forEachIndexed { index, tag ->
if (!TextUtils.isEmpty(tag)) { if (index < 2 && !TextUtils.isEmpty(tag)) {
val view = LayoutInflater.from(context) val view = LayoutInflater.from(context)
.inflate(R.layout.home_item_tag, ll_tags, false) .inflate(R.layout.home_item_tag, ll_tags, false)
view.tvTag.text = tag view.tvTag.text = tag
...@@ -63,15 +77,6 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent: ...@@ -63,15 +77,6 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
} }
} }
} }
//设置接通率文案
setConnection(bean)
//设置向TA咨询人数
setConfideNum(bean)
setOnClickListener {
val url = URLUtils.appendParmas(bean.linkUrl, "cateId", cateId)
homeEvent!!.consultItemClick(url, bean.doctorId)
}
} }
/** /**
......
...@@ -219,8 +219,8 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom ...@@ -219,8 +219,8 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
txtView.typeface = Typeface.DEFAULT txtView.typeface = Typeface.DEFAULT
txtView.setPadding(dp10, dp5, dp10, dp7) txtView.setPadding(dp10, dp5, dp10, dp7)
} else { } else {
txtView.textSize = 15f txtView.textSize = 14f
txtView.setTextColor(Color.parseColor("#4B4A4A")) txtView.setTextColor(Color.parseColor("#5E5E5E"))
txtView.typeface = Typeface.DEFAULT_BOLD txtView.typeface = Typeface.DEFAULT_BOLD
txtView.setPadding(dp10, dp5, dp10, dp7) txtView.setPadding(dp10, dp5, dp10, dp7)
} }
......
...@@ -69,6 +69,7 @@ class HomeModuleCategoryView : FrameLayout { ...@@ -69,6 +69,7 @@ class HomeModuleCategoryView : FrameLayout {
var dp6: Int = 0 var dp6: Int = 0
var dp8: Int = 0 var dp8: Int = 0
var dp12: Int = 0 var dp12: Int = 0
//左右间距
var dp15: Int = 0 var dp15: Int = 0
/** /**
* 倍数 * 倍数
...@@ -116,13 +117,13 @@ class HomeModuleCategoryView : FrameLayout { ...@@ -116,13 +117,13 @@ class HomeModuleCategoryView : FrameLayout {
dp6 = RxImageTool.dip2px(4f) dp6 = RxImageTool.dip2px(4f)
dp12 = RxImageTool.dip2px(12f) dp12 = RxImageTool.dip2px(12f)
categoryEightWidth = ScreenUtil.screenWidth - RxImageTool.dp2px(30f) categoryEightWidth = ScreenUtil.screenWidth - RxImageTool.dp2px(8f)
textViewWidth = categoryEightWidth / 4 textViewWidth = categoryEightWidth / 4
imageEightViewWidth = RxImageTool.dip2px(38f) imageEightViewWidth = RxImageTool.dip2px(38f)
textViewHeight = RxImageTool.dip2px(28f) textViewHeight = RxImageTool.dip2px(28f)
margin = (categoryEightWidth - 4 * imageEightViewWidth) / 8 margin = (categoryEightWidth - 4 * imageEightViewWidth) / 8
dp8 = RxImageTool.dip2px(8f) dp8 = RxImageTool.dip2px(8f)
dp15 = RxImageTool.dip2px(15f) dp15 = RxImageTool.dip2px(4f)
} }
fun initData(askCategoryDataBean: List<HomeHeaderBean.AskCategoryDataBean>?) { fun initData(askCategoryDataBean: List<HomeHeaderBean.AskCategoryDataBean>?) {
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="4dp"
android:layout_marginTop="20dp" android:layout_marginTop="15dp"
android:layout_marginRight="15dp" android:layout_marginRight="4dp"
android:gravity="center_horizontal|bottom" android:gravity="center_horizontal|bottom"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingBottom="12dp"> android:paddingBottom="12dp">
...@@ -80,24 +80,22 @@ ...@@ -80,24 +80,22 @@
<ImageView <ImageView
android:id="@+id/third_icon" android:id="@+id/third_icon"
android:layout_width="66dp" android:layout_width="71dp"
android:layout_height="59dp" android:layout_height="64dp"
android:paddingLeft="7dp" android:paddingLeft="7dp"
android:paddingTop="7dp" android:paddingTop="12dp"
android:paddingRight="7dp" android:paddingRight="12dp"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/home_banner_third_icon" android:src="@drawable/home_banner_third_icon"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content" <ImageView
android:layout_height="wrap_content" android:id="@+id/qingsuGif"
android:background="@drawable/home_buttom_banner_free_bg" android:layout_width="45dp"
android:text="免费" android:layout_height="24dp"
android:textColor="@color/white"
android:textSize="10sp"
app:layout_constraintRight_toRightOf="@id/third_icon" app:layout_constraintRight_toRightOf="@id/third_icon"
app:layout_constraintTop_toTopOf="@id/third_icon" /> app:layout_constraintTop_toTopOf="@id/third_icon" />
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:id="@+id/homeModuleCommonTitleViewFullTitle" android:id="@+id/homeModuleCommonTitleViewFullTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_15" android:layout_marginLeft="@dimen/platform_dp_16"
android:paddingRight="@dimen/platform_dp_1" android:paddingRight="@dimen/platform_dp_1"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="20sp" android:textSize="20sp"
...@@ -35,28 +35,27 @@ ...@@ -35,28 +35,27 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
app:layout_constraintHorizontal_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1"
android:text=" 人在这里发生了改变" android:text=" 人在这里发生了改变"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
app:layout_constraintBaseline_toBaselineOf="@id/homeModuleCommonTitleViewFullTitle"
android:textSize="13sp" android:textSize="13sp"
app:layout_constraintRight_toLeftOf="@id/homeModuleCommonTitleViewMorell" app:layout_constraintBaseline_toBaselineOf="@id/homeModuleCommonTitleViewFullTitle"
app:layout_constraintLeft_toRightOf="@id/people_num" /> app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/people_num"
app:layout_constraintRight_toLeftOf="@id/homeModuleCommonTitleViewMorell" />
<LinearLayout <LinearLayout
android:id="@+id/homeModuleCommonTitleViewMorell" android:id="@+id/homeModuleCommonTitleViewMorell"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="@dimen/platform_dp_28" android:layout_height="@dimen/platform_dp_18"
android:layout_marginRight="@dimen/platform_dp_15" android:layout_marginRight="@dimen/platform_dp_16"
android:layout_marginBottom="@dimen/platform_dp_3"
android:background="@drawable/home_show_more_line" android:background="@drawable/home_show_more_line"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="10dp" android:paddingLeft="8dp"
android:paddingRight="10dp" android:paddingRight="8dp"
android:visibility="visible" android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"> app:layout_constraintRight_toRightOf="parent">
...@@ -66,12 +65,16 @@ ...@@ -66,12 +65,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_2" android:layout_marginLeft="@dimen/platform_dp_2"
android:drawableRight="@drawable/home_sale_arrow"
android:drawablePadding="4dp"
android:gravity="center" android:gravity="center"
android:text="更多" android:text="更多"
android:textColor="@color/platform_color_666666" android:textColor="@color/platform_color_666666"
android:textSize="12dp" /> android:textSize="10sp" />
<ImageView
android:layout_marginLeft="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/home_more_icon_gray" />
</LinearLayout> </LinearLayout>
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="12dp"
android:layout_marginEnd="@dimen/platform_dp_10" android:layout_marginEnd="@dimen/platform_dp_10"
android:layout_marginStart="@dimen/platform_dp_16" android:layout_marginStart="@dimen/platform_dp_16"
android:gravity="center_vertical" android:gravity="center_vertical"
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabGravity="fill" app:tabGravity="fill"
app:tabIndicatorHeight="0dp" app:tabIndicatorHeight="0dp"
android:layout_marginLeft="12dp" android:layout_marginLeft="2dp"
android:layout_marginRight="12dp" android:layout_marginRight="8dp"
app:tabMode="scrollable" app:tabMode="scrollable"
app:tabPaddingStart="4dp" app:tabPaddingStart="4dp"
app:tabPaddingEnd="4dp" app:tabPaddingEnd="4dp"
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<FrameLayout <FrameLayout
android:id="@+id/ll_content" android:id="@+id/ll_content"
android:layout_marginTop="4dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
......
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
android:paddingLeft="4dp" android:paddingLeft="4dp"
android:paddingRight="4dp" android:paddingRight="4dp"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
android:textSize="10dp" android:textSize="10sp"
tools:text="恋爱情感" /> tools:text="恋爱情感" />
...@@ -326,6 +326,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -326,6 +326,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
} else { } else {
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -352,6 +354,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -352,6 +354,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
//文案不为空才显示引导--李思开 //文案不为空才显示引导--李思开
if (!TextUtils.isEmpty(act.title)) { if (!TextUtils.isEmpty(act.title)) {
ActivityGuideDialog(mActivity, act.imageUrl, act.title).show() ActivityGuideDialog(mActivity, act.imageUrl, act.title).show()
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
} }
} }
} }
......
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