Commit 74a96c87 by 刘鹏

Merge remote-tracking branch 'origin/new_dev_4.3.91' into new_dev_4.3.91

# Conflicts:
#	config.gradle
parents 5fb95cb2 a820c49b
...@@ -6,7 +6,7 @@ ext { ...@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.69", "m-confide" : "0.0.49.69",
"m-consultant" : "0.0.60.16", "m-consultant" : "0.0.60.19",
"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.18", "m-home" : "0.0.23.18",
...@@ -92,7 +92,7 @@ ext { ...@@ -92,7 +92,7 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.69", "m-confide" : "0.0.49.69",
"m-consultant" : "0.0.60.16", "m-consultant" : "0.0.60.19",
"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.18", "m-home" : "0.0.23.18",
......
...@@ -7,18 +7,17 @@ import android.animation.PropertyValuesHolder ...@@ -7,18 +7,17 @@ import android.animation.PropertyValuesHolder
import android.content.Context import android.content.Context
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Build import android.os.Build
import androidx.core.content.ContextCompat
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import android.text.TextUtils import android.text.TextUtils
import android.view.Gravity
import android.view.View import android.view.View
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.ImageView import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.google.android.material.appbar.AppBarLayout import com.google.android.material.appbar.AppBarLayout
...@@ -59,12 +58,7 @@ import kotlinx.android.synthetic.main.consultant_item_filter_online.view.* ...@@ -59,12 +58,7 @@ import kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import kotlinx.android.synthetic.main.consultant_layout_search_content.* import kotlinx.android.synthetic.main.consultant_layout_search_content.*
import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.* import kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import org.json.JSONObject import org.json.JSONObject
import java.util.*
import java.util.concurrent.Executors import java.util.concurrent.Executors
import kotlin.collections.ArrayList
import kotlin.collections.LinkedHashSet
import kotlin.properties.Delegates
import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
@Route(path = "/consultant/consultant") @Route(path = "/consultant/consultant")
class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(),
...@@ -241,18 +235,15 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -241,18 +235,15 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} else if (newState == RecyclerView.SCROLL_STATE_IDLE) { } else if (newState == RecyclerView.SCROLL_STATE_IDLE) {
//没有滚动 //没有滚动
showConsultAssistantDialog() showConsultAssistantDialog()
if (sIsScrolling) { sIsScrolling = false
}
sIsScrolling = false;
} }
} }
override fun onScrollTop() { override fun onScrollTop() {
var alpha = PropertyValuesHolder.ofFloat("alpha", 1f, 0f) val alpha = PropertyValuesHolder.ofFloat("alpha", 1f, 0f)
var scaleX = PropertyValuesHolder.ofFloat("scaleX", 1f, 0f) val scaleX = PropertyValuesHolder.ofFloat("scaleX", 1f, 0f)
var scaleY = PropertyValuesHolder.ofFloat("scaleY", 1f, 0f) val scaleY = PropertyValuesHolder.ofFloat("scaleY", 1f, 0f)
var animator = val animator =
ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY) ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY)
.setDuration(200) .setDuration(200)
animator.addListener(object : AnimatorListenerAdapter() { animator.addListener(object : AnimatorListenerAdapter() {
...@@ -268,10 +259,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -268,10 +259,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
if (isBtnShow) { if (isBtnShow) {
return return
} }
var alpha = PropertyValuesHolder.ofFloat("alpha", 0f, 1f) val alpha = PropertyValuesHolder.ofFloat("alpha", 0f, 1f)
var scaleX = PropertyValuesHolder.ofFloat("scaleX", 0f, 1f) val scaleX = PropertyValuesHolder.ofFloat("scaleX", 0f, 1f)
var scaleY = PropertyValuesHolder.ofFloat("scaleY", 0f, 1f) val scaleY = PropertyValuesHolder.ofFloat("scaleY", 0f, 1f)
var animator = val animator =
ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY) ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY)
.setDuration(200) .setDuration(200)
animator.addListener(object : AnimatorListenerAdapter() { animator.addListener(object : AnimatorListenerAdapter() {
...@@ -287,10 +278,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -287,10 +278,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
if (!isBtnShow) { if (!isBtnShow) {
return return
} }
var alpha = PropertyValuesHolder.ofFloat("alpha", 1f, 0f) val alpha = PropertyValuesHolder.ofFloat("alpha", 1f, 0f)
var scaleX = PropertyValuesHolder.ofFloat("scaleX", 1f, 0f) val scaleX = PropertyValuesHolder.ofFloat("scaleX", 1f, 0f)
var scaleY = PropertyValuesHolder.ofFloat("scaleY", 1f, 0f) val scaleY = PropertyValuesHolder.ofFloat("scaleY", 1f, 0f)
var animator = val animator =
ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY) ObjectAnimator.ofPropertyValuesHolder(image_scroll_top, alpha, scaleX, scaleY)
.setDuration(200) .setDuration(200)
animator.addListener(object : AnimatorListenerAdapter() { animator.addListener(object : AnimatorListenerAdapter() {
......
...@@ -15,14 +15,9 @@ import com.ydl.webview.NewH5Activity ...@@ -15,14 +15,9 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.base.config.HttpConfig 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 import com.ydl.ydlcommon.utils.URLUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.ExpertSearchActivity import com.yidianling.consultant.ExpertSearchActivity
import com.yidianling.consultant.IExpertSearchView import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R import com.yidianling.consultant.R
...@@ -89,14 +84,18 @@ class ExpertSearchAdapter( ...@@ -89,14 +84,18 @@ class ExpertSearchAdapter(
holder.imgHead_online.visibility = View.GONE holder.imgHead_online.visibility = View.GONE
} else { } else {
//不是服务中且问询人数大于0 //不是服务中且问询人数大于0
if (itemBean.chatNum > 5) { when {
holder.chat_people_in_question.visibility = View.VISIBLE itemBean.chatNum > 5 -> {
holder.chat_people_in_question.text = "多人在问询" holder.chat_people_in_question.visibility = View.VISIBLE
} else if (itemBean.chatNum > 0) { holder.chat_people_in_question.text = "多人在问询"
holder.chat_people_in_question.visibility = View.VISIBLE }
holder.chat_people_in_question.text = "${itemBean.chatNum}人在问询" itemBean.chatNum > 0 -> {
} else { holder.chat_people_in_question.visibility = View.VISIBLE
holder.chat_people_in_question.visibility = View.GONE holder.chat_people_in_question.text = "${itemBean.chatNum}人在问询"
}
else -> {
holder.chat_people_in_question.visibility = View.GONE
}
} }
//可预约 //可预约
holder.imgHead_online_server.visibility = View.GONE holder.imgHead_online_server.visibility = View.GONE
...@@ -158,18 +157,22 @@ class ExpertSearchAdapter( ...@@ -158,18 +157,22 @@ class ExpertSearchAdapter(
} else { } else {
holder.imgFightEpidemicIcon.visibility = View.GONE holder.imgFightEpidemicIcon.visibility = View.GONE
//能力等级标签 //能力等级标签
if (1 == itemBean.abilityLevel) { when (itemBean.abilityLevel) {
//实习 1 -> {
holder.imgAbilityLevel.background = //实习
context.resources.getDrawable(R.drawable.consultant_expert_search_shixi) holder.imgAbilityLevel.background =
holder.imgAbilityLevel.visibility = View.VISIBLE context.resources.getDrawable(R.drawable.consultant_expert_search_shixi)
} else if (2 == itemBean.abilityLevel) { holder.imgAbilityLevel.visibility = View.VISIBLE
//新手 }
holder.imgAbilityLevel.background = 2 -> {
context.resources.getDrawable(R.drawable.consultant_expert_search_xinshou) //新手
holder.imgAbilityLevel.visibility = View.VISIBLE holder.imgAbilityLevel.background =
} else { context.resources.getDrawable(R.drawable.consultant_expert_search_xinshou)
holder.imgAbilityLevel.visibility = View.GONE holder.imgAbilityLevel.visibility = View.VISIBLE
}
else -> {
holder.imgAbilityLevel.visibility = View.GONE
}
} }
//活动图标 //活动图标
if (!TextUtils.isEmpty(itemBean.activityImg)) { if (!TextUtils.isEmpty(itemBean.activityImg)) {
...@@ -223,13 +226,18 @@ class ExpertSearchAdapter( ...@@ -223,13 +226,18 @@ class ExpertSearchAdapter(
holder.tvTeamCertifications.text = itemBean.teamCertifications holder.tvTeamCertifications.text = itemBean.teamCertifications
//咨询师标签 //咨询师标签
holder.ll_tags.removeAllViews() holder.ll_tags.removeAllViews()
if (!TextUtils.isEmpty(itemBean.tags)) { itemBean.tagList?.let {
val tagList = itemBean.tags!!.split("|") if (it.isNotEmpty()){
for (tag in tagList) { for (tag in itemBean.tagList){
if (!TextUtils.isEmpty(tag)) { val view = LayoutInflater.from(context).inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
val view = LayoutInflater.from(context) view.tvTag.text = tag.tagName
.inflate(R.layout.consultant_item_tag, holder.ll_tags, false) if (tag.isHigh==1){
view.tvTag.text = tag view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
}else{
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0))
}
holder.ll_tags.addView(view) holder.ll_tags.addView(view)
} }
} }
...@@ -279,22 +287,26 @@ class ExpertSearchAdapter( ...@@ -279,22 +287,26 @@ class ExpertSearchAdapter(
holder.ll_tags, holder.ll_tags,
false false
) )
if (1 == item.isPackage) { when (item.isPackage) {
view.tvTitle.text = "单次" 1 -> {
view.tvTitle.setTextColor(context.resources.getColor(R.color.platform_color_1DA1F2)) view.tvTitle.text = "单次"
view.tvTitle.background = view.tvTitle.setTextColor(context.resources.getColor(R.color.platform_color_1DA1F2))
context.resources.getDrawable(R.drawable.consultant_expert_search_single) view.tvTitle.background =
view.tvContent.text = item.name context.resources.getDrawable(R.drawable.consultant_expert_search_single)
holder.ll_products.addView(view) view.tvContent.text = item.name
} else if (2 == item.isPackage) { holder.ll_products.addView(view)
view.tvTitle.text = "套餐" }
view.tvTitle.setTextColor(context.resources.getColor(R.color.consultant_color_FF9500)) 2 -> {
view.tvTitle.background = view.tvTitle.text = "套餐"
context.resources.getDrawable(R.drawable.consultant_expert_search_menu) view.tvTitle.setTextColor(context.resources.getColor(R.color.consultant_color_FF9500))
view.tvContent.text = item.name view.tvTitle.background =
holder.ll_products.addView(view) context.resources.getDrawable(R.drawable.consultant_expert_search_menu)
} else { view.tvContent.text = item.name
holder.ll_products.addView(view)
}
else -> {
}
} }
} }
} }
......
...@@ -130,5 +130,15 @@ data class DoctorServiceItem( ...@@ -130,5 +130,15 @@ data class DoctorServiceItem(
/** /**
* 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”) * 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”)
*/ */
val chatBtnText: String? val chatBtnText: String?,
/**
* 新标签分类
*/
val tagList: ArrayList<TagBean>?
)
data class TagBean(
val tagName:String?,
val isHigh:Int
) )
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1dp"/>
<solid android:color="@color/color_1AEB892C" />
<stroke android:width="0.5dp" android:color="@color/color_EB892C"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1dp"></corners> <corners android:radius="1dp"/>
<solid android:color="@color/platform_white" /> <solid android:color="@color/platform_white" />
<stroke android:width="0.5dp" android:color="@color/platform_color_E0E0E0"/> <stroke android:width="0.5dp" android:color="@color/platform_color_E0E0E0"/>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tvTag" android:id="@+id/tvTag"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="14dp" android:layout_height="wrap_content"
android:background="@drawable/consultant_bg_radius_line_gray_1" android:background="@drawable/consultant_bg_radius_line_gray_1"
android:gravity="center" android:gravity="center"
android:paddingLeft="4dp" android:layout_marginEnd="6dp"
android:layout_marginRight="6dp" android:padding="3dp"
android:textColor="@color/platform_color_999999" android:maxLength="5"
android:paddingRight="4dp" android:textColor="@color/platform_color_999999"
android:textSize="10dp" android:textSize="10sp"
tools:text="恋爱情感" /> tools:text="恋爱情感" />
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
<!-- google color--> <!-- google color-->
<color name="consultant_color_FF9500">#FF9500</color> <color name="consultant_color_FF9500">#FF9500</color>
<!--app主要颜色--> <!--app主要颜色-->
<!--最后删除--> <!--最后删除-->
<!-- main bg color --> <!-- main bg color -->
<!-- session --> <!-- session -->
<!-- image picker --> <!-- image picker -->
<!-- contact --> <!-- contact -->
<!-- setting --> <!-- setting -->
<!--云信 end--> <!--云信 end-->
<!--动态--> <!--动态-->
<!--动态顶部title背景变色--> <!--动态顶部title背景变色-->
<color name="consultant_colorBg">#f5f5f5</color> <color name="consultant_colorBg">#f5f5f5</color>
<color name="color_EB892C">#EB892C</color>
</resources> <color name="color_1AEB892C">#1AEB892C</color>
</resources>
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