Commit 4b57a0ea by fengquan

Merge branch 'd/v_confide_2.0' into darren_confide_2.0

parents 691f4ad3 60a54d1c
...@@ -21,6 +21,8 @@ import com.ydl.confide.home.ConfideBottomSheetDialogFragment ...@@ -21,6 +21,8 @@ import com.ydl.confide.home.ConfideBottomSheetDialogFragment
import com.ydl.confide.home.bean.ConfideHomeBodyBean import com.ydl.confide.home.bean.ConfideHomeBodyBean
import com.ydl.confide.home.modular.service.ConfideWebServiceImpl import com.ydl.confide.home.modular.service.ConfideWebServiceImpl
import com.ydl.confide.router.PhoneCallIn import com.ydl.confide.router.PhoneCallIn
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.modular.findRouteService import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
...@@ -52,6 +54,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -52,6 +54,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
fun onDetach() { fun onDetach() {
stopTiming() stopTiming()
video?.release(true) video?.release(true)
binding.videoView.removeAllViews()
} }
fun onBind(item: VideoViewModel) { fun onBind(item: VideoViewModel) {
...@@ -96,12 +99,14 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -96,12 +99,14 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
if (item.isVideo) "1" else "2", if (item.isVideo) "1" else "2",
"8" "8"
) )
ConfideBottomSheetDialogFragment() val url = HttpConfig.MH5_URL + ConfideRoute.h5ExpertEval(it, item.confideId ?: "")
.showBottomSheetDialog( NewH5Activity.start(itemView.context, H5Params(url, ""))
itemView.context as FragmentActivity, // ConfideBottomSheetDialogFragment()
HttpConfig.MH5_URL + ConfideRoute.h5ExpertEval(it, item.confideId ?: ""), // .showBottomSheetDialog(
it, uid = item.uid // itemView.context as FragmentActivity,
) // HttpConfig.MH5_URL + ConfideRoute.h5ExpertEval(it, item.confideId ?: ""),
// it, uid = item.uid
// )
} }
} }
binding.tvName.setOnClickListener { binding.tvName.setOnClickListener {
...@@ -344,7 +349,7 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel { ...@@ -344,7 +349,7 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel {
name.set(bean.confidedName) name.set(bean.confidedName)
avatar.set(bean.confidedIcon) avatar.set(bean.confidedIcon)
val num = bean.confideNum?.replace("人", "") ?: "0" val num = bean.confideNum?.replace("人", "") ?: "0"
count.set("倾人次 $num") count.set("倾人次 $num")
intro.set(bean.confideContent) intro.set(bean.confideContent)
title.set(bean.title) title.set(bean.title)
val sb = StringBuilder() val sb = StringBuilder()
......
...@@ -40,7 +40,11 @@ class HomeBIConstants { ...@@ -40,7 +40,11 @@ class HomeBIConstants {
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_SEARCH_TAG: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag" // 首页_定制咨询点击tag
const val YDL_HOME_SEARCH_TAG_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag_click" // 首页_定制咨询点击tag
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件) const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件)
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP_CLICK: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup_click" // 首页弹窗页面弹出事件(99元3小时弹出事件)
//首页_冥想(ydl_user_main_page)
const val YDL_USER_MAIN_PAGE_MUSE: String = "ydl_user_main_page"//壹点灵用户版首页 partId
} }
......
...@@ -199,6 +199,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -199,6 +199,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (!TextUtils.isEmpty(act.imageUrl)) { if (!TextUtils.isEmpty(act.imageUrl)) {
img_ad.visibility = View.VISIBLE img_ad.visibility = View.VISIBLE
img_ad_card.visibility = View.VISIBLE img_ad_card.visibility = View.VISIBLE
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
GlideApp.with(this).load(act.imageUrl).into(img_ad) GlideApp.with(this).load(act.imageUrl).into(img_ad)
img_ad.setOnClickListener { img_ad.setOnClickListener {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
...@@ -211,7 +212,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -211,7 +212,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点 //定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1") ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG_CLICK,"1")
} }
} else { } else {
...@@ -233,6 +235,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -233,6 +235,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (!TextUtils.isEmpty(act.imageBanner)) { if (!TextUtils.isEmpty(act.imageBanner)) {
//展示弹窗 //展示弹窗
if (aa == null) { if (aa == null) {
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,act.title)
aa = ActivityDialog(mActivity!!, act.imageBanner, act.linkUrl, act.title) aa = ActivityDialog(mActivity!!, act.imageBanner, act.linkUrl, act.title)
aa?.show() aa?.show()
aa?.setOnDismissListener { aa?.setOnDismissListener {
...@@ -248,9 +252,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -248,9 +252,7 @@ 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")
}
} }
} }
} }
......
...@@ -7,7 +7,9 @@ import com.ydl.webview.H5Params ...@@ -7,7 +7,9 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constants.HomeBIConstants
import kotlinx.android.synthetic.ydl.home_dialog_activity.* import kotlinx.android.synthetic.ydl.home_dialog_activity.*
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
...@@ -48,6 +50,9 @@ class ActivityDialog : Dialog { ...@@ -48,6 +50,9 @@ class ActivityDialog : Dialog {
} }
img_activity.setOnClickListener { img_activity.setOnClickListener {
//跳转 //跳转
//99元3小时点击事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP_CLICK,title?:"1")
if (this.linkUrl != null && this.linkUrl!!.startsWith("http")) { if (this.linkUrl != null && this.linkUrl!!.startsWith("http")) {
NewH5Activity.start(context, H5Params(this.linkUrl!!, null)) NewH5Activity.start(context, H5Params(this.linkUrl!!, null))
} else { } else {
......
...@@ -298,6 +298,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -298,6 +298,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (act != null) { if (act != null) {
if (!TextUtils.isEmpty(act!!.imageUrl)) { if (!TextUtils.isEmpty(act!!.imageUrl)) {
img_ad.visibility = View.VISIBLE img_ad.visibility = View.VISIBLE
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,act.title?:"1")
GlideApp.with(this).load(act!!.imageUrl).into(img_ad) GlideApp.with(this).load(act!!.imageUrl).into(img_ad)
img_ad.setOnClickListener { img_ad.setOnClickListener {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
...@@ -310,7 +312,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -310,7 +312,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点 //定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1") ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG_CLICK,act.title?:"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -331,14 +333,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -331,14 +333,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (!TextUtils.isEmpty(act.imageBanner)) { if (!TextUtils.isEmpty(act.imageBanner)) {
//展示弹窗 //展示弹窗
if (aa == null) { if (aa == null) {
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,act?.title?:"1")
aa = ActivityDialog(mActivity, act.imageBanner, act.linkUrl, act.title) aa = ActivityDialog(mActivity, act.imageBanner, act.linkUrl, act.title)
aa?.show() aa?.show()
aa?.setOnDismissListener { aa?.setOnDismissListener {
//文案不为空才显示引导--李思开 //文案不为空才显示引导--李思开
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