Commit 532811f2 by 徐健

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

parent b5135122
......@@ -43,7 +43,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.16",
"m-consultant" : "0.0.23",
"m-consultant" : "0.0.24",
"m-course" : "0.0.9",
"m-fm" : "0.0.12",
"m-muse" : "0.0.8",
......
......@@ -6,6 +6,7 @@ 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 com.yidianling.consultant.router.ConsultantRouterImp
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
......@@ -35,14 +36,12 @@ class ConsultAssistantDialogUtils private constructor() {
"home_index" -> {
if (ConsultantIn.isLogin() &&
ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
/** WalleChannelReader.getChannel(BaseApp.Companion.getApp()) == "android_huawei" */
) {
shouldShowDialog(activity, origin)
}
}
"doctor_list" -> {
if (ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
/** WalleChannelReader.getChannel(BaseApp.Companion.getApp()) == "android_huawei" */
) {
shouldShowDialog(activity, origin)
}
......@@ -109,8 +108,8 @@ class ConsultAssistantDialogUtils private constructor() {
override fun run() {
Observable.just(1).observeOn(AndroidSchedulers.mainThread())
.subscribe {
showDialog(activity)
expertSearchPageHasShown = true
showDialog(activity)
}
}
}, 5000)
......@@ -127,9 +126,14 @@ class ConsultAssistantDialogUtils private constructor() {
consultAssistantDialog = null
consultAssistantDialog = ConsultAssistantDialog(activity, object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
// 咨询师列表页面且未登录情况下,跳转登录页面
if (expertSearchPageHasShown && !ConsultantIn.isLogin()) {
ConsultantIn.toLogin(activity)
}else {
//获取用户uid
getConsultAssistantUid(activity)
}
}
})
consultAssistantDialog?.show()
......
......@@ -36,4 +36,8 @@ object ConsultantIn {
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