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
dbab9091
Commit
dbab9091
authored
Jul 12, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改底纹词
parent
cbabfffb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
config.gradle
config.gradle
+1
-1
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+19
-14
No files found.
config.gradle
View file @
dbab9091
ext
{
dev_mode
=
fals
e
//组件发布的时候需要设置为false
dev_mode
=
tru
e
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.2.0.14-SNAPSHOT"
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
dbab9091
...
...
@@ -73,7 +73,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
SwipeRefreshLayout
.
OnRefreshListener
{
var
bottomWordDisposable
:
Disposable
?
=
null
private
lateinit
var
bottomWordlist
:
List
<
FunctionWordBean
>
private
var
searchWord
:
String
?
=
""
override
fun
showImage
(
url
:
String
?,
imgView
:
ImageView
)
{
YDLImageCacheManager
.
showImage
(
ExpertSearchActivity
@
this
,
url
,
imgView
)
}
...
...
@@ -391,7 +391,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
initCategory
=
mIntent
.
getStringExtra
(
EXTRA_CATEGORY
)
?:
""
initShowType
=
mIntent
.
getIntExtra
(
EXTRA_SHOW_TYPE
,
0
)
val
relatedWord
=
mIntent
.
getStringExtra
(
EXTRA_RELATED_WORD
)
// 搜索内容的联想词
val
searchWord
=
mIntent
.
getStringExtra
(
EXTRA_SEARCH_WORD
)
searchWord
=
mIntent
.
getStringExtra
(
EXTRA_SEARCH_WORD
)
val
isRecommendWords
=
mIntent
.
getBooleanExtra
(
EXTRA_IS_RECCOMMEND_WORD
,
false
)
if
(!
TextUtils
.
isEmpty
(
relatedWord
))
{
// 判断搜索内容的联想词为空,则用搜索词进行搜索
allFilter
.
searchWord
=
relatedWord
...
...
@@ -422,11 +422,11 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
LogUtil
.
e
(
"relatedWord:${relatedWord}"
)
if
(!
TextUtils
.
isEmpty
(
searchWord
)
&&
!
TextUtils
.
isEmpty
(
relatedWord
)
&&
searchWord
!=
relatedWord
)
{
if
(
doctorList
.
size
>
0
&&
doctorList
[
0
].
is_head_view
)
{
doctorList
[
0
]
=
ExpertServiceItem
(
true
,
searchWord
,
relatedWord
)
doctorList
[
0
]
=
ExpertServiceItem
(
true
,
searchWord
.
toString
()
,
relatedWord
)
}
else
if
(
doctorList
.
size
>
0
)
{
doctorList
.
add
(
0
,
ExpertServiceItem
(
true
,
searchWord
,
relatedWord
))
doctorList
.
add
(
0
,
ExpertServiceItem
(
true
,
searchWord
.
toString
()
,
relatedWord
))
}
else
{
doctorList
.
add
(
ExpertServiceItem
(
true
,
searchWord
,
relatedWord
))
doctorList
.
add
(
ExpertServiceItem
(
true
,
searchWord
.
toString
()
,
relatedWord
))
}
}
else
{
if
(
doctorList
.
size
>
0
&&
doctorList
[
0
].
is_head_view
)
{
...
...
@@ -524,18 +524,23 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//获取底纹词
bottomWordlist
=
wordBean
!!
if
(
bottomWordlist
.
isNullOrEmpty
())
return
if
(
bottomWordlist
.
size
==
1
)
{
tv_search_content
.
text
=
bottomWordlist
[
0
].
w
ord
if
(
!
searchWord
.
isNullOrEmpty
()
)
{
tv_search_content
.
text
=
searchW
ord
}
else
{
bottomWordDisposable
=
Observable
.
interval
(
0
,
3
,
TimeUnit
.
SECONDS
)
.
subscribeOn
(
Schedulers
.
computation
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
tv_search_content
.
text
=
bottomWordlist
[(
it
%
bottomWordlist
.
size
).
toInt
()].
word
},
{
},
{
if
(
bottomWordlist
.
size
==
1
)
{
tv_search_content
.
text
=
bottomWordlist
[
0
].
word
}
else
{
bottomWordDisposable
=
Observable
.
interval
(
0
,
3
,
TimeUnit
.
SECONDS
)
.
subscribeOn
(
Schedulers
.
computation
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
tv_search_content
.
text
=
bottomWordlist
[(
it
%
bottomWordlist
.
size
).
toInt
()].
word
},
{
},
{
})
}
}
}
...
...
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