Commit 532811f2 by 徐健

咨询师列表页的导医弹框渠道号由接口控制

parent b5135122
...@@ -43,7 +43,7 @@ ext { ...@@ -43,7 +43,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.16", "m-confide" : "0.0.16",
"m-consultant" : "0.0.23", "m-consultant" : "0.0.24",
"m-course" : "0.0.9", "m-course" : "0.0.9",
"m-fm" : "0.0.12", "m-fm" : "0.0.12",
"m-muse" : "0.0.8", "m-muse" : "0.0.8",
......
...@@ -6,6 +6,7 @@ import com.yidianling.common.tools.ToastUtil ...@@ -6,6 +6,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.dialog.ConsultAssistantDialog import com.yidianling.consultant.dialog.ConsultAssistantDialog
import com.yidianling.consultant.model.SearchApi import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.router.ConsultantIn import com.yidianling.consultant.router.ConsultantIn
import com.yidianling.consultant.router.ConsultantRouterImp
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
...@@ -35,14 +36,12 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -35,14 +36,12 @@ class ConsultAssistantDialogUtils private constructor() {
"home_index" -> { "home_index" -> {
if (ConsultantIn.isLogin() && if (ConsultantIn.isLogin() &&
ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1 ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
/** WalleChannelReader.getChannel(BaseApp.Companion.getApp()) == "android_huawei" */
) { ) {
shouldShowDialog(activity, origin) shouldShowDialog(activity, origin)
} }
} }
"doctor_list" -> { "doctor_list" -> {
if (ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1 if (ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
/** WalleChannelReader.getChannel(BaseApp.Companion.getApp()) == "android_huawei" */
) { ) {
shouldShowDialog(activity, origin) shouldShowDialog(activity, origin)
} }
...@@ -109,8 +108,8 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -109,8 +108,8 @@ class ConsultAssistantDialogUtils private constructor() {
override fun run() { override fun run() {
Observable.just(1).observeOn(AndroidSchedulers.mainThread()) Observable.just(1).observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
showDialog(activity)
expertSearchPageHasShown = true expertSearchPageHasShown = true
showDialog(activity)
} }
} }
}, 5000) }, 5000)
...@@ -127,8 +126,13 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -127,8 +126,13 @@ class ConsultAssistantDialogUtils private constructor() {
consultAssistantDialog = null consultAssistantDialog = null
consultAssistantDialog = ConsultAssistantDialog(activity, object : ConsultAssistantDialog.OnConsultAssistantClickListener { consultAssistantDialog = ConsultAssistantDialog(activity, object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
//获取用户uid // 咨询师列表页面且未登录情况下,跳转登录页面
getConsultAssistantUid(activity) if (expertSearchPageHasShown && !ConsultantIn.isLogin()) {
ConsultantIn.toLogin(activity)
}else {
//获取用户uid
getConsultAssistantUid(activity)
}
} }
}) })
......
...@@ -36,4 +36,8 @@ object ConsultantIn { ...@@ -36,4 +36,8 @@ object ConsultantIn {
return ModularServiceManager.provide(IUserService::class.java) return ModularServiceManager.provide(IUserService::class.java)
} }
fun toLogin(activity: Activity) {
ModularServiceManager.provide(IUserService::class.java).loginWayIntent(activity)
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment