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
4a0521ab
Commit
4a0521ab
authored
Jul 06, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:底纹词首页实现
parent
8ff37d5b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
17 deletions
+112
-17
config.gradle
config.gradle
+4
-4
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+2
-1
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+1
-0
IExpertSearchView.kt
m-consultant/src/main/java/com/yidianling/consultant/IExpertSearchView.kt
+1
-0
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+7
-4
ConsultantServiceImp.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
+27
-3
OnBottomWordListener.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/OnBottomWordListener.kt
+9
-0
IConsultantService.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
+8
-2
FunctionWordConsultBean.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/bean/FunctionWordConsultBean.kt
+9
-0
YdlHomeFragment.kt
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+44
-3
No files found.
config.gradle
View file @
4a0521ab
...
...
@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.42"
,
"m-consultant"
:
"0.0.60.7
0
"
,
"m-consultant"
:
"0.0.60.7
7
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.61"
,
"m-home"
:
"0.0.23.95"
,
...
...
@@ -37,7 +37,7 @@ ext {
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-consultant-api"
:
"0.0.5.6
3
"
,
"m-consultant-api"
:
"0.0.5.6
4
"
,
"m-course-api"
:
"0.0.3.6"
,
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
...
...
@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.50.42"
,
"m-consultant"
:
"0.0.60.7
0
"
,
"m-consultant"
:
"0.0.60.7
7
"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.61"
,
"m-home"
:
"0.0.23.95"
,
...
...
@@ -123,7 +123,7 @@ ext {
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-confide-api"
:
"1.0.0"
,
"m-consultant-api"
:
"0.0.5.6
3
"
,
"m-consultant-api"
:
"0.0.5.6
4
"
,
"m-course-api"
:
"0.0.3.6"
,
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
4a0521ab
...
...
@@ -40,6 +40,7 @@ import com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.adapter.ExpertSearchAdapter
import
com.yidianling.consultant.bean.FunctionWordConsultBean
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.YDL_USER_CONSULT_SEARCH_CLICK
import
com.yidianling.consultant.listener.OnCategoriesSelectedListener
...
...
@@ -78,7 +79,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
override
fun
showImage
(
url
:
String
?,
imgView
:
ImageView
,
ops
:
SimpleImageOpConfiger
)
{
YDLImageCacheManager
.
showImage
(
ExpertSearchActivity
@
this
,
url
,
imgView
,
ops
)
YDLImageCacheManager
.
showImage
(
this
,
url
,
imgView
,
ops
)
}
override
fun
showImage
(
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
4a0521ab
...
...
@@ -41,6 +41,7 @@ import com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.adapter.ExpertSearchAdapter
import
com.yidianling.consultant.bean.FunctionWordConsultBean
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.listener.OnCategoriesSelectedListener
import
com.yidianling.consultant.listener.OnExpertClickListener
...
...
m-consultant/src/main/java/com/yidianling/consultant/IExpertSearchView.kt
View file @
4a0521ab
...
...
@@ -3,6 +3,7 @@ package com.yidianling.consultant
import
android.widget.ImageView
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydlcommon.mvp.base.IView
import
com.yidianling.consultant.bean.FunctionWordConsultBean
import
com.yidianling.consultant.model.bean.ExpertServiceItem
import
com.yidianling.consultant.model.bean.Extras
import
com.yidianling.consultant.model.bean.FunctionWordBean
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
4a0521ab
...
...
@@ -6,10 +6,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.consultant.bean.ExpertSearchTopShowBean
import
com.yidianling.consultant.bean.GuideBean
import
com.yidianling.consultant.bean.HotSearchBean
import
com.yidianling.consultant.bean.SearchWordsBean
import
com.yidianling.consultant.bean.*
import
com.yidianling.consultant.model.bean.ExpertBean
import
com.yidianling.consultant.model.bean.FunctionWordBean
import
com.yidianling.consultant.model.bean.HeadData
...
...
@@ -50,6 +47,12 @@ interface SearchApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
searchFunctionWord
(
@Body
map
:
Map
<
String
,
@JvmSuppressWildcards
Any
>):
Observable
<
BaseAPIResponse
<
List
<
FunctionWordBean
>>>
//查询功能词、底纹词
//(1热门词,2底纹词,3跳转词)
@POST
(
"function/word/queryList"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
searchFunctionWordApi
(
@Body
map
:
Map
<
String
,
@JvmSuppressWildcards
Any
>):
Observable
<
BaseAPIResponse
<
List
<
FunctionWordConsultBean
>>>
/**
* 新咨询师列表接口(包含搜索、筛选咨询师)
*/
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
View file @
4a0521ab
...
...
@@ -9,14 +9,17 @@ import android.text.TextUtils
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.google.gson.Gson
import
com.google.gson.reflect.TypeToken
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.y
idianling.common.tools.LogUtil
import
com.y
dl.ydlcommon.utils.remind.HttpErrorUtils
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.ExpertSearchFragment
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.GuideBean
import
com.yidianling.consultant.bean.Keyworks
import
com.yidianling.consultant.data.ConsultantDataManager
import
com.yidianling.consultant.OnBottomWordListener
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.utils.ConsultAssistantEntryUtils
...
...
@@ -118,14 +121,35 @@ class ConsultantServiceImp : IConsultantService {
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
activity
,
location
,
null
)
}
override
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
{
ConsultAssistantEntryUtils
.
getTypeJump
(
activity
,
location
,
doctorId
,
url
)
override
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
{
ConsultAssistantEntryUtils
.
getTypeJump
(
activity
,
location
,
doctorId
,
url
)
}
override
fun
showConfideListDialog
(
activity
:
Activity
)
{
ConsultAssistantDialogUtils
.
INSTANCE
.
showFromConfideListHome
(
activity
)
}
@SuppressLint
(
"CheckResult"
)
override
fun
getbottomWord
(
type
:
Int
,
listener
:
OnBottomWordListener
)
{
val
map
=
HashMap
<
String
,
Any
>()
map
[
"type"
]
=
type
SearchApi
.
getSearchApi
()
.
searchFunctionWordApi
(
map
)
.
compose
(
RxUtils
.
resultJavaData
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
resp
->
listener
.
onBottomWord
(
resp
)
},
{
t
->
HttpErrorUtils
.
handleError
(
BaseApp
.
getApp
(),
t
)
})
}
override
fun
resetConsultAssistantDialogStatus
()
{
ConsultAssistantDialogUtils
.
INSTANCE
.
resetStatus
()
}
...
...
m-consultant/src/main/modular_api/com/yidianling/consultant/OnBottomWordListener.kt
0 → 100644
View file @
4a0521ab
package
com.yidianling.consultant
import
com.yidianling.consultant.bean.FunctionWordConsultBean
interface
OnBottomWordListener
{
fun
onBottomWord
(
wordList
:
List
<
FunctionWordConsultBean
>)
}
\ No newline at end of file
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
View file @
4a0521ab
...
...
@@ -6,6 +6,7 @@ import androidx.fragment.app.Fragment
import
com.alibaba.android.arouter.facade.template.IProvider
import
com.yidianling.consultant.bean.GuideBean
import
com.yidianling.consultant.bean.Keyworks
import
com.yidianling.consultant.OnBottomWordListener
/**
* Created by xj on 2019/11/14.
...
...
@@ -39,11 +40,15 @@ interface IConsultantService: IProvider {
fun
requestGuideData
()
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
)
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
)
//根据返回Type跳转自主或者导医
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
// 咨询列表页显示咨询助理弹框
fun
showConfideListDialog
(
activity
:
Activity
)
//获取底纹词
fun
getbottomWord
(
type
:
Int
,
listener
:
OnBottomWordListener
)
}
\ No newline at end of file
m-consultant/src/main/modular_api/com/yidianling/consultant/bean/FunctionWordConsultBean.kt
0 → 100644
View file @
4a0521ab
package
com.yidianling.consultant.bean
data class
FunctionWordConsultBean
(
var
id
:
Long
?,
var
word
:
String
?,
var
type
:
Int
?,
var
jumpUrl
:
String
?
)
\ No newline at end of file
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
4a0521ab
...
...
@@ -26,7 +26,9 @@ import com.ydl.ydlcommon.base.BaseMvpFragment
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.*
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
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
...
...
@@ -42,10 +44,15 @@ import com.yidianling.home.ui.view.CouponDialog
import
com.yidianling.home.ui.view.HomeSpaceItemDecoration
import
com.yidianling.home.utils.HomeAnimUtils
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.ydl.home_fragment.*
import
kotlinx.android.synthetic.ydl.home_fragment.tab_layout
import
kotlinx.android.synthetic.ydl.home_muse_view.*
import
kotlinx.android.synthetic.ydl.home_muse_view.view.*
import
java.util.concurrent.TimeUnit
import
kotlin.properties.Delegates
...
...
@@ -99,13 +106,15 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
open
var
searchText
:
String
=
""
open
var
doctorName
:
String
=
""
var
startTime
=
0L
var
endTime
=
0L
var
startTime
=
0L
var
endTime
=
0L
/**
* 如果是第一次加载,则调用所有接口进行刷新,否则,只调用咨询和倾诉接口
*/
private
var
isFromCreate
:
Boolean
=
true
private
lateinit
var
bottomWordlist
:
List
<
FunctionWordConsultBean
>
var
bottomWordDisposable
:
Disposable
?
=
null
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
home_fragment
...
...
@@ -122,6 +131,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
open
fun
initHomeEvent
()
{
homeEvent
=
HomeImpl
(
mActivity
,
this
)
getBottomWord
()
}
private
fun
initAdapter
()
{
...
...
@@ -177,7 +187,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
searchText
=
doctorName
}
home_tv
.
setOnClickListener
{
homeEvent
?.
searchTvClick
(
searchText
)
}
home_tv
.
text
=
searchText
//
home_tv.text = searchText
}
/**
...
...
@@ -509,6 +519,35 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
.
showConsultAssistantDialog
(
mActivity
)
}
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
)
{
home_tv
.
text
=
bottomWordlist
[
0
].
word
}
else
{
if
(
bottomWordDisposable
!=
null
)
{
bottomWordDisposable
?.
dispose
()
}
else
{
bottomWordDisposable
=
Observable
.
interval
(
0
,
5
,
TimeUnit
.
SECONDS
)
.
subscribeOn
(
Schedulers
.
computation
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
home_tv
.
text
=
bottomWordlist
[(
it
%
bottomWordlist
.
size
).
toInt
()].
word
},
{
},
{
})
}
}
}
})
}
private
fun
hideConsultAssistantDialog
()
{
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
hideConsultAssistantDialog
()
}
...
...
@@ -656,5 +695,6 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
override
fun
onDestroyView
()
{
super
.
onDestroyView
()
HomeAnimUtils
.
clear
()
bottomWordDisposable
?.
dispose
()
}
}
\ 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