Commit b126dd0a by 洪国微

咨询ui调整及倾诉axb增加参数

parents e4159e8f f00da74a
......@@ -42,8 +42,10 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.19",
"m-consultant" : "0.0.29",
"m-confide" : "0.0.20",
"m-consultant" : "0.0.33",
"m-course" : "0.0.17",
"m-fm" : "0.0.15",
"m-muse" : "0.0.11",
......
......@@ -12,11 +12,14 @@ class ConnectParamJava : BaseCommand {
var id: String = "0" //倾诉id
var type: String = "1" //1 走AxB 2双呼 3声网
var callType:Int? = null //
constructor() : super()
constructor(id: String, type: String) : super() {
constructor(id: String, type: String, callType: Int?) : super() {
this.id = id
this.type = type
this.callType = callType
}
}
......@@ -6,7 +6,6 @@ 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,16 +34,13 @@ class ConsultAssistantDialogUtils private constructor() {
when (origin) {
"home_index" -> {
if (ConsultantIn.isLogin() &&
ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
) {
ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
) {
shouldShowDialog(activity, origin)
}
}
"doctor_list" -> {
if (ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
) {
shouldShowDialog(activity, origin)
}
shouldShowDialog(activity, origin)
}
}
......@@ -56,17 +52,17 @@ class ConsultAssistantDialogUtils private constructor() {
private fun shouldShowDialog(activity: Activity, origin: String, isDelay: Boolean = false) {
// 请求接口判断导医咨询助理按钮是否展示
SearchApi.getSearchApi().getConsultAssistantRequest(origin)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
if (it.data) {
if (origin == "home_index") {
showFromYdlHome(activity)
} else if (origin == "doctor_list") {
show(activity)
}
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
if (it.data) {
if (origin == "home_index") {
showFromYdlHome(activity)
} else if (origin == "doctor_list") {
show(activity)
}
}
}
}
////////////////////////////////////// 首页的展示隐藏逻辑 代码块start ///////////////////////////////////////////////////
......@@ -77,13 +73,15 @@ class ConsultAssistantDialogUtils private constructor() {
fun showFromYdlHome(activity: Activity) {
consultAssistantDialogFromHomePage?.dismiss()
consultAssistantDialogFromHomePage = null
consultAssistantDialogFromHomePage = ConsultAssistantDialog(activity, object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
//获取用户uid
getConsultAssistantUid(activity)
}
consultAssistantDialogFromHomePage = ConsultAssistantDialog(
activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
//获取用户uid
getConsultAssistantUid(activity)
}
})
})
consultAssistantDialogFromHomePage?.show()
}
......@@ -107,10 +105,10 @@ class ConsultAssistantDialogUtils private constructor() {
timer!!.schedule(object : TimerTask() {
override fun run() {
Observable.just(1).observeOn(AndroidSchedulers.mainThread())
.subscribe {
expertSearchPageHasShown = true
showDialog(activity)
}
.subscribe {
expertSearchPageHasShown = true
showDialog(activity)
}
}
}, 5000)
} else {
......@@ -124,18 +122,20 @@ class ConsultAssistantDialogUtils private constructor() {
fun showDialog(activity: Activity) {
consultAssistantDialog?.dismiss()
consultAssistantDialog = null
consultAssistantDialog = ConsultAssistantDialog(activity, object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
// 咨询师列表页面且未登录情况下,跳转登录页面
if (expertSearchPageHasShown && !ConsultantIn.isLogin()) {
ConsultantIn.toLogin(activity)
}else {
//获取用户uid
getConsultAssistantUid(activity)
consultAssistantDialog = ConsultAssistantDialog(
activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
// 咨询师列表页面且未登录情况下,跳转登录页面
if (expertSearchPageHasShown && !ConsultantIn.isLogin()) {
ConsultantIn.toLogin(activity)
} else {
//获取用户uid
getConsultAssistantUid(activity)
}
}
}
})
})
consultAssistantDialog?.show()
}
......@@ -163,14 +163,14 @@ class ConsultAssistantDialogUtils private constructor() {
private fun getConsultAssistantUid(activity: Activity) {
// 请求接口获取咨询助理的uid
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("咨询助理忙碌中,请稍后再试")
}
.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
......@@ -3,6 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="MissingDefaultResource">
<corners android:radius="16dp" />
<corners android:radius="90dp" />
<solid android:color="@color/platform_color_F7F7F7" />
</shape>
\ No newline at end of file
......@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include
......
......@@ -39,7 +39,6 @@
android:layout_alignBottom="@+id/cvHead"
app:srcCompat="@drawable/consultant_online_yue"
tools:visibility="visible"
android:layout_marginBottom="@dimen/platform_dp_05"
android:visibility="gone"/>
......@@ -51,9 +50,7 @@
android:scaleType="centerCrop"
android:layout_alignBottom="@+id/cvHead"
app:srcCompat="@drawable/consultant_online_server"
android:layout_marginLeft="@dimen/platform_dp_2"
tools:visibility="visible"
android:layout_marginBottom="@dimen/platform_dp_05"
android:visibility="gone"/>
......@@ -99,8 +96,7 @@
android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp"
android:scaleType="centerCrop"
tools:background="@drawable/consultant_service_free"
android:layout_marginStart="@dimen/platform_dp_4" />
tools:background="@drawable/consultant_service_free" />
<!--新驻图标-->
<ImageView
android:id="@+id/imgNewEnter"
......@@ -108,8 +104,7 @@
android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp"
android:scaleType="fitCenter"
tools:background="@drawable/consultant_new_enter"
android:layout_marginStart="@dimen/platform_dp_4" />
tools:background="@drawable/consultant_new_enter" />
<!--优质图标-->
<ImageView
android:id="@+id/imgAbilityLevel"
......@@ -118,7 +113,6 @@
android:layout_marginRight="4dp"
android:scaleType="fitCenter"
tools:background="@drawable/consultant_expert_search_shixi"
android:layout_marginStart="@dimen/platform_dp_4"
android:visibility="gone"/>
</LinearLayout>
......
......@@ -12,66 +12,64 @@
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!--筛选框-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/platform_white"
android:orientation="horizontal">
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvSubject"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_theme"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvArea"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_area"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvSort"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_sort"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvFilter"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_filter"/>
</LinearLayout>
android:orientation="vertical">
<!--筛选框-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/platform_white"
android:orientation="horizontal">
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvSubject"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_theme"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvArea"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_area"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvSort"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_sort"/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvFilter"
style="@style/consultant_FilterTextViewStyle"
android:layout_width="0dp"
android:layout_weight="1"
android:width="0dp"
android:textColor="@color/platform_color_242424"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="@string/platform_filter"/>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="0.5dp">
<LinearLayout
android:id="@+id/lin_filter2"
android:layout_width="match_parent"
......@@ -80,9 +78,13 @@
android:paddingBottom="10dp"
android:orientation="horizontal">
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:background="@drawable/consult_fillter_bg"/>
</LinearLayout>
</com.yidianling.consultant.ui.view.DisInterceptNestedScrollView>
......@@ -94,7 +96,7 @@
android:id="@+id/viewSep2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/platform_divide_color"
android:background="@color/transparent"
/>
<android.support.v4.widget.SwipeRefreshLayout
......@@ -171,7 +173,6 @@
android:id="@+id/viewDim"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/viewSep2"
android:background="#40000000"
android:visibility="invisible"/>
</RelativeLayout>
......
......@@ -30,9 +30,10 @@
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginLeft="12dp"
android:layout_gravity="center_vertical"
android:src="@drawable/consultant_icon_search_zixun" />
<TextView
......
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