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
3a05587f
Commit
3a05587f
authored
Jul 12, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:升级Home组件
parent
e7340c1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
5 deletions
+46
-5
config.gradle
config.gradle
+1
-1
HotSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
+4
-3
YdlHomeFragment.kt
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+41
-1
No files found.
config.gradle
View file @
3a05587f
ext
{
dev_mode
=
false
//组件发布的时候需要设置为false
ydl2PublishVersion
=
"0.2.0.
9
-SNAPSHOT"
ydl2PublishVersion
=
"0.2.0.
10
-SNAPSHOT"
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
...
...
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
View file @
3a05587f
...
...
@@ -32,6 +32,7 @@ import com.yidianling.consultant.adapter.SearchWordsAdapter
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.*
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.SEARCH_BANNERWORD_CLICK
import
com.yidianling.consultant.contract.IHotSearchContract
import
com.yidianling.consultant.model.bean.FunctionWordBean
import
com.yidianling.consultant.modular.utils.ConsultAssistantEntryUtils
...
...
@@ -318,7 +319,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
.
inflate
(
R
.
layout
.
consultant_item_expert_hot_search
,
flHotSearch
,
false
)
view
.
tvHotSearch
.
text
=
wordList
[
index
].
word
view
.
setOnClickListener
{
ActionCountUtils
.
count
(
HOT_SEARCH_DOCTOR_NAME
,
wordList
[
index
].
word
!!
,
"热门搜索"
)
ActionCountUtils
.
count
(
SEARCH_BANNERWORD_CLICK
,
wordList
[
index
].
word
!!
,
"热门搜索"
)
getSearchWords
(
wordList
[
index
].
word
!!
,
true
)
}
flHotSearch
.
addView
(
view
)
...
...
@@ -361,7 +362,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}
}
view
.
setOnClickListener
{
ActionCountUtils
.
count
(
HOT_SEARCH_DOCTOR_NAME
,
etSearch
.
text
.
toString
(),
"热门专家"
)
ActionCountUtils
.
count
(
SEARCH_BANNERWORD_CLICK
,
etSearch
.
text
.
toString
(),
"热门专家"
)
getSearchWords
(
etSearch
.
text
.
toString
(),
true
)
}
flHotExpert
.
addView
(
view
)
...
...
@@ -425,7 +426,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}
view
.
setOnClickListener
{
//历史搜索
ActionCountUtils
.
count
(
HOT_SEARCH_DOCTOR_NAME
,
historyStr
,
"历史搜索"
)
ActionCountUtils
.
count
(
SEARCH_BANNERWORD_CLICK
,
historyStr
,
"历史搜索"
)
getSearchWords
(
historyStr
,
true
)
}
fl_search_history
.
addView
(
view
)
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
3a05587f
...
...
@@ -22,7 +22,9 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.consultant.OnBottomWordListener
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.FunctionWordConsultBean
import
com.yidianling.home.R
import
com.yidianling.home.adapter.YdlHomeAdapter
import
com.yidianling.home.constants.HomeBIConstants
...
...
@@ -37,9 +39,14 @@ import com.yidianling.home.presenter.HomePresenterImpl
import
com.yidianling.home.ui.view.CouponDialog
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.api.service.IUserService
import
io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.xlzx.home_fragment_home_module.*
import
kotlinx.android.synthetic.xlzx.home_layout_home_module_content.*
import
kotlinx.android.synthetic.xlzx.home_layout_home_module_input.*
import
java.util.concurrent.TimeUnit
import
kotlin.properties.Delegates
...
...
@@ -86,6 +93,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
private
var
isFromCreate
:
Boolean
=
true
var
startTime
=
System
.
currentTimeMillis
()
var
endTime
by
Delegates
.
notNull
<
Long
>()
private
lateinit
var
bottomWordlist
:
List
<
FunctionWordConsultBean
>
var
bottomWordDisposable
:
Disposable
?
=
null
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
home_fragment_home_module
}
...
...
@@ -100,6 +109,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
homeEvent
=
HomeImpl
(
mActivity
!!
,
this
)
initView
()
initAdapter
()
getBottomWord
()
}
private
fun
initAdapter
()
{
...
...
@@ -126,7 +136,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
)
home_swipe_refresh_layout
.
setProgressViewOffset
(
false
,
0
,
200
)
home_swipe_refresh_layout
.
isEnabled
=
true
etSearch
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
""
)
}
etSearch
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
etSearch
.
hint
.
toString
()
)
}
home_page_xiaoyi
.
setOnClickListener
{
activity
?.
let
{
...
...
@@ -377,4 +387,33 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
showConsultAssistantDialog
()
}
}
private
fun
getBottomWord
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
)
.
getbottomWord
(
2
,
object
:
OnBottomWordListener
{
override
fun
onBottomWord
(
wordList
:
List
<
FunctionWordConsultBean
>)
{
bottomWordlist
=
wordList
!!
if
(
bottomWordlist
.
isNullOrEmpty
())
return
if
(
bottomWordlist
.
size
==
1
)
{
etSearch
.
hint
=
bottomWordlist
[
0
].
word
}
else
{
if
(
bottomWordDisposable
!=
null
)
{
bottomWordDisposable
?.
dispose
()
}
else
{
bottomWordDisposable
=
Observable
.
interval
(
0
,
5
,
TimeUnit
.
SECONDS
)
.
subscribeOn
(
Schedulers
.
computation
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
etSearch
.
hint
=
bottomWordlist
[(
it
%
bottomWordlist
.
size
).
toInt
()].
word
},
{
},
{
})
}
}
}
})
}
}
\ No newline at end of file
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