Commit 8817ed2c by 徐健

升级咨询模块

parent 84f65e74
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = false dev_mode = true
ydl_app = [ ydl_app = [
appName : "心理咨询壹点灵", appName : "心理咨询壹点灵",
...@@ -43,7 +43,7 @@ ext { ...@@ -43,7 +43,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.18", "m-confide" : "0.0.18",
"m-consultant" : "0.0.33", "m-consultant" : "0.0.34",
"m-course" : "0.0.17", "m-course" : "0.0.17",
"m-fm" : "0.0.15", "m-fm" : "0.0.15",
"m-muse" : "0.0.11", "m-muse" : "0.0.11",
......
...@@ -71,25 +71,27 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -71,25 +71,27 @@ class ConsultAssistantDialogUtils private constructor() {
* 首页页展示 * 首页页展示
*/ */
fun showFromYdlHome(activity: Activity) { fun showFromYdlHome(activity: Activity) {
consultAssistantDialogFromHomePage?.dismiss() if (!activity.isFinishing) {
consultAssistantDialogFromHomePage = null if (consultAssistantDialogFromHomePage == null) {
consultAssistantDialogFromHomePage = ConsultAssistantDialog( consultAssistantDialogFromHomePage = ConsultAssistantDialog(
activity, activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
//获取用户uid //获取用户uid
getConsultAssistantUid(activity) getConsultAssistantUid(activity)
} }
}) })
consultAssistantDialogFromHomePage?.show() }
consultAssistantDialogFromHomePage?.show()
}
} }
/** /**
* 首页隐藏 * 首页隐藏
*/ */
fun hideFromHomePage() { fun hideFromHomePage() {
consultAssistantDialogFromHomePage?.dismiss() consultAssistantDialogFromHomePage?.hide()
} }
////////////////////////////////////// 首页的展示隐藏逻辑 代码块end /////////////////////////////////////////////////// ////////////////////////////////////// 首页的展示隐藏逻辑 代码块end ///////////////////////////////////////////////////
...@@ -120,23 +122,25 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -120,23 +122,25 @@ class ConsultAssistantDialogUtils private constructor() {
* 咨询师列表页展示浮层 * 咨询师列表页展示浮层
*/ */
fun showDialog(activity: Activity) { fun showDialog(activity: Activity) {
consultAssistantDialog?.dismiss() if (!activity.isFinishing) {
consultAssistantDialog = null if (consultAssistantDialog == null) {
consultAssistantDialog = ConsultAssistantDialog( consultAssistantDialog = ConsultAssistantDialog(
activity, activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener { object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() { override fun onClickAction() {
// 咨询师列表页面且未登录情况下,跳转登录页面 // 咨询师列表页面且未登录情况下,跳转登录页面
if (!ConsultantIn.isLogin()) { if (!ConsultantIn.isLogin()) {
ConsultantIn.toLogin(activity) ConsultantIn.toLogin(activity)
} else { } else {
//获取用户uid //获取用户uid
getConsultAssistantUid(activity) getConsultAssistantUid(activity)
} }
} }
}) })
consultAssistantDialog?.show() }
consultAssistantDialog?.show()
}
} }
...@@ -144,7 +148,7 @@ class ConsultAssistantDialogUtils private constructor() { ...@@ -144,7 +148,7 @@ class ConsultAssistantDialogUtils private constructor() {
* 咨询师列表页隐藏 * 咨询师列表页隐藏
*/ */
fun hide() { fun hide() {
consultAssistantDialog?.dismiss() consultAssistantDialog?.hide()
} }
/** /**
......
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