Commit f09b9019 by 严久程

华为渠道特殊处理

parent e428403e
ext {
kotlin_version = "1.3.21"
dev_mode = false
dev_mode = true
ydl_app = [
......
......@@ -77,7 +77,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
initData()
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
if (!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")) {
rl_hot_fix_for_huawei.visibility = View.GONE
} else {
rl_hot_fix_for_huawei.visibility = View.VISIBLE
......
......@@ -15,6 +15,7 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.URLUtils
......@@ -50,6 +51,8 @@ class ExpertSearchAdapter(
const val EMPTY_VIEW = 2
}
private val ffrom = PlatformDataManager.getRam().getChannelName()
//记录当前选择主题的id
var cateId: String? = null
......@@ -66,6 +69,10 @@ class ExpertSearchAdapter(
@SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: RecyclerView.ViewHolder?, position: Int) {
if (holder is NormalViewHolder) {
val isFromXinliZiXunHuawei =
!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")
val itemBean = listData[position]
//头像
val headConfig = SimpleImageOpConfiger()
......@@ -283,6 +290,19 @@ class ExpertSearchAdapter(
}
}
}
if (isFromXinliZiXunHuawei) {
holder.ll_honor_layout.visibility = View.GONE
holder.ll_tags.visibility = View.GONE
holder.imgHead_online.visibility = View.GONE
holder.imgHead_online_server.visibility = View.GONE
holder.tvPrice.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE
holder.tvChat.text="咨询"
}
} else if (holder is FooterViewHolder) {
if (hasMore) {
holder.itemView.visibility = View.VISIBLE
......@@ -340,6 +360,8 @@ class ExpertSearchAdapter(
val imgServiceFree = itemView.imgServiceFree!!
//新驻图标
val imgNewEnter = itemView.imgNewEnter!!
//荣誉标签
val ll_honor_layout = itemView.ll_honor_layout!!
//好评率
val ll_feedbackRate = itemView.ll_feedbackRate!!
//xxx人点评
......
......@@ -6,7 +6,7 @@ import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.ydl.ydlcommon.data.PlatformDataManager.getRam
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.event.HomeImpl
......@@ -29,6 +29,7 @@ class YdlHomeAdapter(
private var list: ArrayList<HomePagerDataBean>
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private val ffrom = PlatformDataManager.getRam().getChannelName()
private val mInflater: LayoutInflater = LayoutInflater.from(mContext)
/**
* 倾述item的position
......@@ -151,21 +152,31 @@ class YdlHomeAdapter(
}
//倾诉*排解模块
is HomeConfideViewHolder -> {
holder.confideViewView.setTitle(
list[position].headerBean?.listenCategoryDate,
confideSelectPosition
)
holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body)
confidePosition = position
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams
parm.height = 0
holder.itemView.layoutParams = parm
} else {
holder.confideViewView.setTitle(
list[position].headerBean?.listenCategoryDate,
confideSelectPosition
)
holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body)
confidePosition = position
}
}
//课程*成长模块
is HomeCourseViewHolder -> {
holder.courseViewView.initData(list[position].courseBean?.list)
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams
parm.height = 0
holder.itemView.layoutParams = parm
} else {
holder.courseViewView.initData(list[position].courseBean?.list)
}
}
//解忧*问答模块
is HomeAssuageGriefViewHolder -> {
val ffrom =
getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams
parm.height = 0
......@@ -180,15 +191,22 @@ class YdlHomeAdapter(
}
//咨询模块
is HomeConsultViewHolder -> {
holder.consultView.setTitle(
list[position].headerBean?.consultCategoryData,
consultSelectPosition
)
holder.consultView.setConsultInfoView(
list[position].consultBean?.list,
list[position].headerBean?.consultCategoryData?.get(consultSelectPosition)
)
consultPosition = position
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams
parm.height = 0
holder.itemView.layoutParams = parm
} else {
holder.consultView.setTitle(
list[position].headerBean?.consultCategoryData,
consultSelectPosition
)
holder.consultView.setConsultInfoView(
list[position].consultBean?.list,
list[position].headerBean?.consultCategoryData?.get(consultSelectPosition)
)
consultPosition = position
}
}
//测试模块
is HomeTestViewHolder -> {
......
......@@ -61,6 +61,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
homeModuleButtonBannerThird.visibility=View.GONE
homeModuleButtonBannerSecond.visibility=View.GONE
homeModuleButtonBannerFirst.background =
resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei)
homeModuleButtonBannerSecond.background =
......@@ -101,8 +104,15 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeCategory: List<HomeHeaderBean.AskCategoryDataBean>?
) {
setRealTextView(homeSaleData)
homeEvent?.let { home_category_view.setEvent(it) };
home_category_view.initData(homeCategory)
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
home_category_view.visibility = View.GONE
} else {
homeEvent?.let { home_category_view.setEvent(it) }
home_category_view.initData(homeCategory)
}
}
/**
......
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