Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
324e576c
Commit
324e576c
authored
Apr 28, 2022
by
upwork.021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 专家标签高亮,组件升级
parent
98c42a4a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
79 deletions
+106
-79
config.gradle
config.gradle
+2
-2
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+39
-33
DoctorServiceItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/DoctorServiceItem.kt
+12
-1
consultant_bg_radius_line_eb892c.xml
m-consultant/src/main/res/drawable/consultant_bg_radius_line_eb892c.xml
+9
-0
consultant_bg_radius_line_gray_1.xml
m-consultant/src/main/res/drawable/consultant_bg_radius_line_gray_1.xml
+1
-1
consultant_item_tag.xml
m-consultant/src/main/res/layout/consultant_item_tag.xml
+13
-14
colors.xml
m-consultant/src/main/res/values/colors.xml
+30
-28
No files found.
config.gradle
View file @
324e576c
...
...
@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.49.65"
,
"m-consultant"
:
"0.0.60.1
6
"
,
"m-consultant"
:
"0.0.60.1
7
"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.17"
,
...
...
@@ -93,7 +93,7 @@ ext {
//第三步 若干
"m-confide"
:
"0.0.49.65"
,
"m-consultant"
:
"0.0.60.1
6
"
,
"m-consultant"
:
"0.0.60.1
7
"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.17"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
324e576c
...
...
@@ -15,14 +15,9 @@ 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
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
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.IExpertSearchView
import
com.yidianling.consultant.R
...
...
@@ -89,14 +84,18 @@ class ExpertSearchAdapter(
holder
.
imgHead_online
.
visibility
=
View
.
GONE
}
else
{
//不是服务中且问询人数大于0
if
(
itemBean
.
chatNum
>
5
)
{
holder
.
chat_people_in_question
.
visibility
=
View
.
VISIBLE
holder
.
chat_people_in_question
.
text
=
"多人在问询"
}
else
if
(
itemBean
.
chatNum
>
0
)
{
holder
.
chat_people_in_question
.
visibility
=
View
.
VISIBLE
holder
.
chat_people_in_question
.
text
=
"${itemBean.chatNum}人在问询"
}
else
{
holder
.
chat_people_in_question
.
visibility
=
View
.
GONE
when
{
itemBean
.
chatNum
>
5
->
{
holder
.
chat_people_in_question
.
visibility
=
View
.
VISIBLE
holder
.
chat_people_in_question
.
text
=
"多人在问询"
}
itemBean
.
chatNum
>
0
->
{
holder
.
chat_people_in_question
.
visibility
=
View
.
VISIBLE
holder
.
chat_people_in_question
.
text
=
"${itemBean.chatNum}人在问询"
}
else
->
{
holder
.
chat_people_in_question
.
visibility
=
View
.
GONE
}
}
//可预约
holder
.
imgHead_online_server
.
visibility
=
View
.
GONE
...
...
@@ -158,18 +157,22 @@ class ExpertSearchAdapter(
}
else
{
holder
.
imgFightEpidemicIcon
.
visibility
=
View
.
GONE
//能力等级标签
if
(
1
==
itemBean
.
abilityLevel
)
{
//实习
holder
.
imgAbilityLevel
.
background
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
consultant_expert_search_shixi
)
holder
.
imgAbilityLevel
.
visibility
=
View
.
VISIBLE
}
else
if
(
2
==
itemBean
.
abilityLevel
)
{
//新手
holder
.
imgAbilityLevel
.
background
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
consultant_expert_search_xinshou
)
holder
.
imgAbilityLevel
.
visibility
=
View
.
VISIBLE
}
else
{
holder
.
imgAbilityLevel
.
visibility
=
View
.
GONE
when
(
itemBean
.
abilityLevel
)
{
1
->
{
//实习
holder
.
imgAbilityLevel
.
background
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
consultant_expert_search_shixi
)
holder
.
imgAbilityLevel
.
visibility
=
View
.
VISIBLE
}
2
->
{
//新手
holder
.
imgAbilityLevel
.
background
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
consultant_expert_search_xinshou
)
holder
.
imgAbilityLevel
.
visibility
=
View
.
VISIBLE
}
else
->
{
holder
.
imgAbilityLevel
.
visibility
=
View
.
GONE
}
}
//活动图标
if
(!
TextUtils
.
isEmpty
(
itemBean
.
activityImg
))
{
...
...
@@ -223,15 +226,18 @@ class ExpertSearchAdapter(
holder
.
tvTeamCertifications
.
text
=
itemBean
.
teamCertifications
//咨询师标签
holder
.
ll_tags
.
removeAllViews
()
if
(!
TextUtils
.
isEmpty
(
itemBean
.
tags
))
{
val
tagList
=
itemBean
.
tags
!!
.
split
(
"|"
)
for
(
tag
in
tagList
)
{
if
(!
TextUtils
.
isEmpty
(
tag
))
{
val
view
=
LayoutInflater
.
from
(
context
)
.
inflate
(
R
.
layout
.
consultant_item_tag
,
holder
.
ll_tags
,
false
)
view
.
tvTag
.
text
=
tag
holder
.
ll_tags
.
addView
(
view
)
if
(
itemBean
.
tagList
.
isNotEmpty
()){
for
(
tag
in
itemBean
.
tagList
){
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
consultant_item_tag
,
holder
.
ll_tags
,
false
)
view
.
tvTag
.
text
=
tag
.
tagName
if
(
tag
.
isHigh
==
1
){
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
)
}
}
//帮助人数
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/DoctorServiceItem.kt
View file @
324e576c
...
...
@@ -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
m-consultant/src/main/res/drawable/consultant_bg_radius_line_eb892c.xml
0 → 100644
View file @
324e576c
<?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
m-consultant/src/main/res/drawable/consultant_bg_radius_line_gray_1.xml
View file @
324e576c
<?xml version="1.0" encoding="utf-8"?>
<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"
/>
<stroke
android:width=
"0.5dp"
android:color=
"@color/platform_color_E0E0E0"
/>
...
...
m-consultant/src/main/res/layout/consultant_item_tag.xml
View file @
324e576c
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/tvTag"
android:layout_width=
"wrap_content"
android:layout_height=
"14dp"
android:background=
"@drawable/consultant_bg_radius_line_gray_1"
android:gravity=
"center"
android:paddingLeft=
"4dp"
android:layout_marginRight=
"6dp"
android:textColor=
"@color/platform_color_999999"
android:paddingRight=
"4dp"
android:textSize=
"10dp"
tools:text=
"恋爱情感"
/>
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/tvTag"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/consultant_bg_radius_line_gray_1"
android:gravity=
"center"
android:layout_marginEnd=
"6dp"
android:padding=
"3dp"
android:textColor=
"@color/platform_color_999999"
android:textSize=
"10sp"
tools:text=
"恋爱情感"
/>
m-consultant/src/main/res/values/colors.xml
View file @
324e576c
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google color-->
<color
name=
"consultant_color_FF9500"
>
#FF9500
</color>
<!--app主要颜色-->
<!--最后删除-->
<!-- main bg color -->
<!-- session -->
<!-- image picker -->
<!-- contact -->
<!-- setting -->
<!--云信 end-->
<!--动态-->
<!--动态顶部title背景变色-->
<color
name=
"consultant_colorBg"
>
#f5f5f5
</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources
xmlns:tools=
"http://schemas.android.com/tools"
tools:ignore=
"ResourceName"
>
<!-- google color-->
<color
name=
"consultant_color_FF9500"
>
#FF9500
</color>
<!--app主要颜色-->
<!--最后删除-->
<!-- main bg color -->
<!-- session -->
<!-- image picker -->
<!-- contact -->
<!-- setting -->
<!--云信 end-->
<!--动态-->
<!--动态顶部title背景变色-->
<color
name=
"consultant_colorBg"
>
#f5f5f5
</color>
<color
name=
"color_EB892C"
>
#EB892C
</color>
<color
name=
"color_1AEB892C"
>
#1AEB892C
</color>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment