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
37a9a364
Commit
37a9a364
authored
May 27, 2022
by
upwork.021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 排序接口以及逻辑修改代码提交
parent
e4ed1517
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
77 additions
and
68 deletions
+77
-68
config.gradle
config.gradle
+1
-1
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+0
-0
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+13
-6
ExpertSearchPresenter.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
+3
-3
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+12
-11
ExpertBean.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/ExpertBean.kt
+1
-1
ExpertServiceItem.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/ExpertServiceItem.kt
+7
-4
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+36
-37
consultant_item_tag.xml
m-consultant/src/main/res/layout/consultant_item_tag.xml
+1
-1
consultant_ui_filter_popup.xml
m-consultant/src/main/res/layout/consultant_ui_filter_popup.xml
+3
-4
No files found.
config.gradle
View file @
37a9a364
...
@@ -6,7 +6,7 @@ ext {
...
@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.49.72"
,
"m-confide"
:
"0.0.49.72"
,
"m-consultant"
:
"0.0.60.2
1
"
,
"m-consultant"
:
"0.0.60.2
6
"
,
"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.44"
,
"m-home"
:
"0.0.23.44"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
37a9a364
This diff is collapsed.
Click to expand it.
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
37a9a364
...
@@ -349,9 +349,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
...
@@ -349,9 +349,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
private
fun
initData
()
{
private
fun
initData
()
{
allFilter
.
showType
.
key
=
initShowType
allFilter
.
showType
.
key
=
initShowType
allFilter
.
categories
.
clear
()
getPresenter
().
fetchListHead
()
getPresenter
().
fetchListHead
()
v_loading
.
visibility
=
View
.
VISIBLE
v_loading
.
visibility
=
View
.
VISIBLE
v_loading
.
setViewType
(
LogoLoadingView
.
TYPE_LOADING
,
null
)
v_loading
.
setViewType
(
LogoLoadingView
.
TYPE_LOADING
,
null
)
...
@@ -739,21 +738,29 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
...
@@ -739,21 +738,29 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
else
{
}
else
{
bury
(
keyWord
?:
""
,
data
.
size
>
0
,
isRecommend
,
fromPages
[
fromPageType
])
bury
(
keyWord
?:
""
,
data
.
size
>
0
,
isRecommend
,
fromPages
[
fromPageType
])
}
}
// 如果是第一页
if
(
curPage
==
1
){
if
(
curPage
==
1
){
hasMore
=
true
if
(
data
.
size
>=
10
){
doctorAdapter
.
hasMore
=
true
hasMore
=
true
doctorAdapter
.
hasMore
=
true
}
else
{
hasMore
=
false
doctorAdapter
.
hasMore
=
false
}
doctorList
.
clear
()
doctorList
.
clear
()
}
}
if
(
extras
==
null
||
data
.
size
==
0
)
{
if
(
data
.
size
==
0
)
{
// data的长度为0的时候为最后一页
hasMore
=
false
hasMore
=
false
doctorAdapter
.
hasMore
=
false
doctorAdapter
.
hasMore
=
false
}
else
{
doctorList
.
addAll
(
data
)
}
}
doctorList
.
addAll
(
data
)
doctorAdapter
.
notifyDataSetChanged
()
doctorAdapter
.
notifyDataSetChanged
()
isDoSearch
=
false
isDoSearch
=
false
isRecommend
=
false
isRecommend
=
false
v_loading
.
visibility
=
View
.
GONE
v_loading
.
visibility
=
View
.
GONE
ll_network_error
.
visibility
=
View
.
GONE
ll_network_error
.
visibility
=
View
.
GONE
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
View file @
37a9a364
...
@@ -222,11 +222,11 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
...
@@ -222,11 +222,11 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
.
subscribe
(
Consumer
{
.
subscribe
(
Consumer
{
// 当前页数
// 当前页数
val
curPage
=
(
it
.
skip
/
it
.
limit
)+
1
val
curPage
=
(
it
.
skip
/
it
.
limit
)+
1
if
(
null
!=
it
.
objects
&&
it
.
objects
.
isNotEmpty
())
{
if
(
curPage
==
1
&&
it
.
objects
.
size
==
0
){
mView
.
fetchListEmpty
(
"没有搜到相关信息,换个关键词看看吧"
)
}
else
{
mExtras
=
it
.
extras
mExtras
=
it
.
extras
mView
.
onDoctorListFetched
(
it
.
objects
,
mExtras
,
curPage
)
mView
.
onDoctorListFetched
(
it
.
objects
,
mExtras
,
curPage
)
}
else
if
(
curPage
==
1
&&(
null
==
it
.
objects
||
it
.
objects
.
isEmpty
())){
mView
.
fetchListEmpty
(
"没有搜到相关信息,换个关键词看看吧"
)
}
}
},
object
:
ThrowableConsumer
()
{
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
override
fun
accept
(
msg
:
String
)
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
37a9a364
...
@@ -227,23 +227,23 @@ class ExpertSearchAdapter(
...
@@ -227,23 +227,23 @@ class ExpertSearchAdapter(
holder
.
tvTeamCertifications
.
text
=
itemBean
.
title
holder
.
tvTeamCertifications
.
text
=
itemBean
.
title
//咨询师标签
//咨询师标签
holder
.
ll_tags
.
removeAllViews
()
holder
.
ll_tags
.
removeAllViews
()
itemBean
.
tagList
?.
let
{
itemBean
.
feature_tags
?.
let
{
if
(
it
.
isNotEmpty
()){
if
(
it
.
isNotEmpty
()){
for
(
tag
in
itemBean
.
tagList
){
for
(
tag
in
itemBean
.
feature_tags
){
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
consultant_item_tag
,
holder
.
ll_tags
,
false
)
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
consultant_item_tag
,
holder
.
ll_tags
,
false
)
tag
.
tag
Name
?
.
let
{
name
->
tag
.
tag
_name
.
let
{
name
->
if
(
name
.
length
>
4
){
if
(
name
.
length
>
4
){
view
.
tvTag
.
text
=
"${name.substring(0,4)}…"
view
.
tvTag
.
text
=
"${name.substring(0,4)}…"
}
else
{
}
else
{
view
.
tvTag
.
text
=
name
view
.
tvTag
.
text
=
name
}
}
}
}
if
(
tag
.
is
High
==
1
){
if
(
tag
.
is
_highlight
){
view
.
tvTag
.
setBackgroundResource
(
R
.
drawable
.
consultant_bg_radius_line_eb892c
)
view
.
tvTag
.
setBackgroundResource
(
R
.
drawable
.
consultant_bg_radius_line_eb892c
)
view
.
tvTag
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_EB892C
))
view
.
tvTag
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_EB892C
))
}
else
{
}
else
{
view
.
tvTag
.
setBackgroundResource
(
R
.
drawable
.
consultant_bg_radius_line_gray_1
)
view
.
tvTag
.
setBackgroundResource
(
R
.
drawable
.
consultant_bg_radius_line_gray_1
)
view
.
tvTag
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_color_
E0E0E0
))
view
.
tvTag
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_color_
666666
))
}
}
holder
.
ll_tags
.
addView
(
view
)
holder
.
ll_tags
.
addView
(
view
)
}
}
...
@@ -320,6 +320,7 @@ class ExpertSearchAdapter(
...
@@ -320,6 +320,7 @@ class ExpertSearchAdapter(
}
else
if
(
holder
is
FooterViewHolder
)
{
}
else
if
(
holder
is
FooterViewHolder
)
{
LogUtil
.
e
(
"${listData.size}"
)
LogUtil
.
e
(
"${listData.size}"
)
LogUtil
.
e
(
"${hasMore}"
)
if
(
hasMore
)
{
if
(
hasMore
)
{
holder
.
itemView
.
visibility
=
View
.
VISIBLE
holder
.
itemView
.
visibility
=
View
.
VISIBLE
holder
.
pbLoading
.
visibility
=
View
.
VISIBLE
holder
.
pbLoading
.
visibility
=
View
.
VISIBLE
...
@@ -331,12 +332,12 @@ class ExpertSearchAdapter(
...
@@ -331,12 +332,12 @@ class ExpertSearchAdapter(
}
}
}
}
override
fun
getItemCount
():
Int
=
override
fun
getItemCount
():
Int
=
listData
.
size
+
1
if
(
listData
.
size
<
ExpertSearchActivity
.
PAGE_SIZE
&&
hasMore
)
{
//
if (listData.size < ExpertSearchActivity.PAGE_SIZE && hasMore) {
listData
.
size
//
listData.size
}
else
{
//
} else {
listData
.
size
+
1
//
listData.size + 1
}
//
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
=
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
=
when
(
viewType
)
{
when
(
viewType
)
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/ExpertBean.kt
View file @
37a9a364
...
@@ -12,7 +12,7 @@ data class ExpertBean(
...
@@ -12,7 +12,7 @@ data class ExpertBean(
val
skip
:
Int
=
0
,
val
skip
:
Int
=
0
,
val
limit
:
Int
=
0
,
val
limit
:
Int
=
0
,
val
size
:
Int
=
10
,
val
size
:
Int
=
10
,
val
objects
:
MutableList
<
ExpertServiceItem
>
?
,
val
objects
:
MutableList
<
ExpertServiceItem
>,
// 分页需要
// 分页需要
val
extras
:
Extras
?)
val
extras
:
Extras
?)
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/ExpertServiceItem.kt
View file @
37a9a364
...
@@ -131,10 +131,12 @@ data class ExpertServiceItem(
...
@@ -131,10 +131,12 @@ data class ExpertServiceItem(
/**
/**
* 新标签分类
* 新标签分类
*/
*/
val
tagList
:
ArrayList
<
TagBean
>?
val
feature_tags
:
ArrayList
<
FeatureTag
>?
)
)
data class
TagBean
(
data class
FeatureTag
(
val
tagName
:
String
?,
val
tag_id
:
Int
,
val
isHigh
:
Int
val
tag_name
:
String
,
val
is_highlight
:
Boolean
,
// 是否高亮
val
type
:
String
// 标签类型
)
)
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
37a9a364
...
@@ -286,43 +286,42 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
...
@@ -286,43 +286,42 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
//用户行为数据埋点
//用户行为数据埋点
biEvent
(
biEventName
,
biEventParams
)
biEvent
(
biEventName
,
biEventParams
)
// sb.append("&page=").append(1)
// ExpertSearchDataManager.getHttp().getFilterCount(sb.toString())
ExpertSearchDataManager
.
getHttp
().
getFilterCount
(
sb
.
toString
())
// .subscribeOn(Schedulers.io())
.
subscribeOn
(
Schedulers
.
io
())
// .compose(RxUtils.resultJavaData())
.
compose
(
RxUtils
.
resultJavaData
())
// .map { it }
.
map
{
it
}
// .filter { true }
.
filter
{
true
}
// .observeOn(AndroidSchedulers.mainThread())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
// .subscribe({
.
subscribe
({
//
// contentView.btnConfirm.text = if (it > 0) "确定" else "暂无匹配咨询师"
contentView
.
btnConfirm
.
text
=
if
(
it
>
0
)
"确定"
else
"暂无匹配咨询师"
// //按钮置灰/解除置灰
//按钮置灰/解除置灰
// contentView.btnConfirm.isEnabled = it > 0
contentView
.
btnConfirm
.
isEnabled
=
it
>
0
// if (it > 0) {
if
(
it
>
0
)
{
// contentView.btnConfirm.setTextColor(
contentView
.
btnConfirm
.
setTextColor
(
// ContextCompat.getColor(
ContextCompat
.
getColor
(
// context,
context
,
// R.color.platform_but_text_color
R
.
color
.
platform_but_text_color
// )
)
// )
)
// contentView.btnConfirm.background =
contentView
.
btnConfirm
.
background
=
// ContextCompat.getDrawable(context, R.drawable.consultant_bg_radius_5_dark)
ContextCompat
.
getDrawable
(
context
,
R
.
drawable
.
consultant_bg_radius_5_dark
)
//// contentView.btnConfirm.setTextColor(ContextCompat.getColor(context,R.color.consultant_white))
// contentView.btnConfirm.setTextColor(ContextCompat.getColor(context,R.color.consultant_white))
// } else {
}
else
{
// contentView.btnConfirm.setTextColor(
contentView
.
btnConfirm
.
setTextColor
(
// ContextCompat.getColor(
ContextCompat
.
getColor
(
// context,
context
,
// R.color.platform_text_light_color
R
.
color
.
platform_text_light_color
// )
)
// )
)
// contentView.btnConfirm.background =
contentView
.
btnConfirm
.
background
=
// ContextCompat.getDrawable(context, R.drawable.consultant_bg_radius_5_light)
ContextCompat
.
getDrawable
(
context
,
R
.
drawable
.
consultant_bg_radius_5_light
)
//// contentView.btnConfirm.setTextColor(ContextCompat.getColor(context,R.color.color_999999))
// contentView.btnConfirm.setTextColor(ContextCompat.getColor(context,R.color.color_999999))
// }
}
//
// }, {
},
{
// ToastHelper.show(it.message!!)
ToastHelper
.
show
(
it
.
message
!!
)
// })
})
}
}
private
fun
biEvent
(
biEventName
:
String
,
biEventParams
:
String
=
""
)
{
private
fun
biEvent
(
biEventName
:
String
,
biEventParams
:
String
=
""
)
{
...
...
m-consultant/src/main/res/layout/consultant_item_tag.xml
View file @
37a9a364
...
@@ -8,6 +8,6 @@
...
@@ -8,6 +8,6 @@
android:gravity=
"center"
android:gravity=
"center"
android:layout_marginEnd=
"6dp"
android:layout_marginEnd=
"6dp"
android:padding=
"3dp"
android:padding=
"3dp"
android:textColor=
"@color/platform_color_
999999
"
android:textColor=
"@color/platform_color_
666666
"
android:textSize=
"10sp"
android:textSize=
"10sp"
tools:text=
"恋爱情感"
/>
tools:text=
"恋爱情感"
/>
m-consultant/src/main/res/layout/consultant_ui_filter_popup.xml
View file @
37a9a364
...
@@ -211,12 +211,11 @@
...
@@ -211,12 +211,11 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"44dp"
android:layout_height=
"44dp"
android:layout_marginStart=
"10dp"
android:layout_marginStart=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/consultant_bg_radius_5_
light
"
android:background=
"@drawable/consultant_bg_radius_5_
dark
"
android:gravity=
"center"
android:gravity=
"center"
android:hint=
"
暂无匹配咨询师
"
android:hint=
"
确定
"
android:textColor=
"@color/
platform_but_text_color
"
android:textColor=
"@color/
white
"
android:textColorHint=
"@color/platform_color_E0E0E0"
android:textColorHint=
"@color/platform_color_E0E0E0"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
</LinearLayout>
</LinearLayout>
...
...
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