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
c9e642e5
Commit
c9e642e5
authored
Nov 14, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加咨询模块的导医代码
parent
3c78d0a1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
16 deletions
+119
-16
build.gradle
app/build.gradle
+2
-0
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+15
-12
config.gradle
config.gradle
+1
-1
modular.gradle
m-consultant/modular.gradle
+2
-2
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+2
-1
ConsultantServiceImp.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
+27
-0
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+55
-0
IConsultantService.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
+15
-0
No files found.
app/build.gradle
View file @
c9e642e5
...
...
@@ -117,6 +117,7 @@ android {
signingConfig
signingConfigs
.
ydl
}
xlzx
{
applicationId
rootProject
.
ext
.
xlzx_app
[
"applicationId"
]
versionName
rootProject
.
ext
.
xlzx_app
[
"versionName"
]
...
...
@@ -170,6 +171,7 @@ dependencies {
implementation
modularPublication
(
'com.ydl:m-user-api'
)
// api project(':m-tests')
api
project
(
':m-consultant'
)
implementation
modularPublication
(
'com.ydl:m-consultant-api'
)
// api project(':m-confide')
api
(
project
(
':ydl-platform'
)){
transitive
=
true
...
...
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
c9e642e5
...
...
@@ -16,7 +16,7 @@ import com.umeng.analytics.MobclickAgent
import
com.ydl.component.music.MusicPlayActivity
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.mvp.DemoPresenter
import
com.ydl.confide.home.ConfideHomeActivity
//
import com.ydl.confide.home.ConfideHomeActivity
import
com.ydl.media.audio.PlayService
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
...
...
@@ -24,6 +24,8 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.fm.api.service.IFMService
//import com.yidianling.tests.home.TestHomeActivity
import
kotlinx.android.synthetic.main.activity_main.*
...
...
@@ -76,15 +78,15 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
.
withBoolean
(
"isFromGuide"
,
true
)
.
navigation
()
}
//
bt_to_consultant.setOnClickListener {
//
ARouter.getInstance()
//
.build("/consult/hot_search")
//
.withString(
//
HOT_SEARCH_DOCTOR_NAME,
//
this.resources?.getString(R.string.platform_search_hint)
//
)
//
.navigation()
//
}
bt_to_consultant
.
setOnClickListener
{
ARouter
.
getInstance
()
.
build
(
"/consult/hot_search"
)
.
withString
(
HOT_SEARCH_DOCTOR_NAME
,
this
.
resources
?.
getString
(
R
.
string
.
platform_search_hint
)
)
.
navigation
()
}
bt_to_music
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
MusicPlayActivity
::
class
.
java
))
}
...
...
@@ -92,7 +94,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// startActivity(Intent(this, TestHomeActivity::class.java))
}
bt_to_confide
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
ConfideHomeActivity
::
class
.
java
))
//
startActivity(Intent(this, ConfideHomeActivity::class.java))
}
bt_to_muse
.
setOnClickListener
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MUSE
,
...
...
@@ -128,7 +130,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
override
fun
reLoadData
()
{
mPresenter
?.
loadUsers
()
}
...
...
@@ -168,6 +169,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
override
fun
onResume
()
{
super
.
onResume
()
MobclickAgent
.
onResume
(
this
)
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
showConsultAssistantDialog
(
this
)
}
...
...
config.gradle
View file @
c9e642e5
ext
{
kotlin_version
=
'1.3.21'
dev_mode
=
tru
e
dev_mode
=
fals
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
m-consultant/modular.gradle
View file @
c9e642e5
...
...
@@ -15,7 +15,7 @@ modular {
groupId
=
"com.ydl"
artifactId
=
"m-consultant-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version
=
"0.0.1
4
"
version
=
"0.0.1
5
"
}
}
...
...
@@ -24,7 +24,7 @@ modular {
groupId
=
"com.ydl"
artifactId
=
"m-consultant-api"
//开发时注释掉版本号,发布api时打开
//
version = "0.0.1"
version
=
"0.0.1"
// API 层打包时需要引入的依赖
apiDependencies
{
implementation
"com.google.code.gson:gson:2.8.2"
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
c9e642e5
...
...
@@ -1477,7 +1477,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//todo xujian 条件添加完整
if
(
ConsultantIn
.
isLogin
()
&&
ConsultantIn
.
getUserImpl
().
getUserInfo
()
?.
user_type
==
1
/** && YdlDataManager.getRam().getChannelName() == "android_huawei"*/
)
{
/** WalleChannelReader.getChannel(BaseApp.Companion.getApp()) == "android_huawei" */
)
{
getPresenter
().
requestConsultAssistantBtnShown
()
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
0 → 100644
View file @
c9e642e5
package
com.yidianling.consultant.modular
import
android.app.Activity
import
android.content.Context
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
/**
* Created by xj on 2019/11/14.
*/
@Route
(
path
=
"/consultant/ConsultantService"
)
class
ConsultantServiceImp
:
IConsultantService
{
override
fun
init
(
context
:
Context
?)
{
}
override
fun
showConsultAssistantDialog
(
activity
:
Activity
)
{
ConsultAssistantDialogUtils
.
INSTANCE
.
showDialog
(
activity
)
}
override
fun
hideConsultAssistantDialog
()
{
ConsultAssistantDialogUtils
.
INSTANCE
.
hideDialog
()
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
0 → 100644
View file @
c9e642e5
package
com.yidianling.consultant.modular.singlton
import
android.app.Activity
import
android.content.Context
import
android.support.v7.app.AppCompatActivity
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.dialog.ConsultAssistantDialog
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
/**
* Created by xj on 2019/11/14.
*/
class
ConsultAssistantDialogUtils
private
constructor
(){
companion
object
{
val
INSTANCE
by
lazy
{
ConsultAssistantDialogUtils
()
}
}
var
consultAssistantDialog
:
ConsultAssistantDialog
?
=
null
fun
showDialog
(
activity
:
Activity
)
{
if
(
consultAssistantDialog
==
null
)
{
consultAssistantDialog
=
ConsultAssistantDialog
(
activity
,
object
:
ConsultAssistantDialog
.
OnConsultAssistantClickListener
{
override
fun
onClickAction
()
{
//获取用户uid
getConsultAssistantUid
(
activity
)
}
})
}
consultAssistantDialog
!!
.
show
()
}
fun
hideDialog
()
{
consultAssistantDialog
?.
dismiss
()
consultAssistantDialog
=
null
}
private
fun
getConsultAssistantUid
(
activity
:
Activity
)
{
SearchApi
.
getSearchApi
().
getConsultAssistantUidRequest
()
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
())
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
())
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
}
}
}
}
\ No newline at end of file
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
0 → 100644
View file @
c9e642e5
package
com.yidianling.consultant.api
import
android.app.Activity
import
com.alibaba.android.arouter.facade.template.IProvider
/**
* Created by xj on 2019/11/14.
*/
interface
IConsultantService
:
IProvider
{
// 显示咨询助理弹框
fun
showConsultAssistantDialog
(
activity
:
Activity
)
// 隐藏咨询助理弹框
fun
hideConsultAssistantDialog
()
}
\ 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