Commit 036ec86c by yang.kai

feat: 无可用时间ui调整,增加埋点

parent fc1572b5
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.82",
"m-home" : "0.0.22.84",
"m-im" : "0.0.20.82",
"m-im" : "0.0.20.83",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10",
......@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.07",
"m-user" : "0.0.61.82",
"m-home" : "0.0.22.83",
"m-im" : "0.0.20.77",
"m-im" : "0.0.20.83",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.8",
......
......@@ -157,6 +157,8 @@ public class ServiceItemBean {
public String minOrderTime;
public String saleAmount;
public int sortIndex;
public String description;
public String consultWays;
public long getId() {
return id;
}
......@@ -513,6 +515,7 @@ public class ServiceItemBean {
private String spec2;
private String spec2Name;
private double price;
public String attrCombine;
public int getId() {
return id;
......
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.GlobalConfig
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.GlobalInfo
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.im.R
......@@ -58,7 +54,6 @@ class ExpertConsultServiceDetailView : RelativeLayout {
* 设置数据
*/
fun updateData(bean: ServiceItemBean.ProductsBean) {
val mCompare: Comparator<ServiceItemBean.ProductsBean.ProductSpecDtosBean> = Comparator { o1, o2 ->
val res = o1.price.compareTo(o2.price)
when {
......@@ -83,7 +78,7 @@ class ExpertConsultServiceDetailView : RelativeLayout {
}
consult_service_title.text = bean.productDto.name ?: ""
consult_service_desc.text = bean.productDto.desc ?: ""
consult_service_desc.text = bean.productDto.description ?: ""
//是否是套餐
if (bean.productDto.isPackage == 2) {
......@@ -99,43 +94,12 @@ class ExpertConsultServiceDetailView : RelativeLayout {
consult_service_low_buy_time.visibility = View.GONE
}
//可选时间类型
var timeStr = StringBuffer("")
var timeList: ArrayList<String> = ArrayList()
bean.productSpecDtos.forEach {
timeList.add(it.spec2)
}
//去重并按规则拼接
timeList.distinct().forEachIndexed { index, str ->
if (index == 0) {
timeStr.append("${str}分钟")
} else {
timeStr.append("/${str}分钟")
}
}
consult_service_once_time_type.text = timeStr.toString()
consult_service_once_time_type.text = "${bean.productDto.minOrderTime}分钟"
//可选服务类型
var serviceTypeStr = StringBuffer("")
var serviceTypeList: ArrayList<String> = ArrayList()
bean.productSpecDtos.forEach {
serviceTypeList.add(it.spec1)
}
//去重并按规则拼接
serviceTypeList.distinct().forEachIndexed { index, str ->
val typeStr = getServiceType(str)
if (typeStr != "未知") {
if (index == 0) {
serviceTypeStr.append("$typeStr")
} else {
serviceTypeStr.append("/$typeStr")
}
}
}
consult_service_service_type.text = serviceTypeStr.toString()
consult_service_service_type.text = bean.productDto.consultWays
if (mIsBusy){
consult_service_btn.background.alpha = 200
consult_service_btn.background.alpha = 100
}
consult_service_btn.setOnClickListener {
if (mIsBusy){
......@@ -148,24 +112,4 @@ class ExpertConsultServiceDetailView : RelativeLayout {
}
}
}
private fun getServiceType(index: String): String {
return when (index) {
"1" -> {
"文字"
}
"2" -> {
"电话"
}
"3" -> {
"当面"
}
"4" -> {
"视频"
}
else -> {
"未知"
}
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import `in`.srain.cube.views.GridViewWithHeaderAndFooter
import android.app.Dialog
import android.content.Context
import android.os.Bundle
......@@ -16,6 +17,7 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachSubScriptTime
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper
......@@ -97,9 +99,7 @@ class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<Serv
mViewList.add(mConsultServiceListView as View)
mConsultServiceDetailView =
ExpertConsultServiceDetailView(
mContext, object : ConsultServiceViewCallback {
mConsultServiceDetailView = ExpertConsultServiceDetailView(mContext, object : ConsultServiceViewCallback {
override fun onBackClick() {
dialog_bottom_scroll_view.currentItem = 0
}
......
......@@ -113,7 +113,6 @@ class ExpertConsultServiceView : LinearLayout {
* 刷新服务列表数据
*/
private fun selectTypeServiceList() {
LogUtil.e("isBusy1","$mIsBusy")
expert_consult_service_service_list.removeAllViews()
if (mServiceList.size != 0) {
val lastList: ArrayList<ServiceItemBean.ProductsBean> = ArrayList()
......
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