Commit 4bc9694d by 刘鹏

Merge remote-tracking branch 'origin/4.2.60' into 4.2.60

# Conflicts:
#	config.gradle
parents c27adb13 114024fa
......@@ -9,9 +9,9 @@ ext {
"m-consultant" : "0.0.59.89",
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.37",
"m-home" : "0.0.22.65",
"m-im" : "0.0.19.28",
"m-dynamic" : "0.0.7.22",
"m-home" : "0.0.22.67",
"m-im" : "0.0.19.29",
"m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.24",
......@@ -21,7 +21,7 @@ ext {
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.11",
"m-consultant-api": "0.0.5.62",
"m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3",
"m-muse-api" : "0.0.1",
......@@ -33,10 +33,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.13",
"ydl-platform" : "0.0.40.15",
//第二步 若干
"ydl-webview" : "0.0.38.46",
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.9",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
......@@ -92,21 +92,18 @@ ext {
"m-consultant" : "0.0.59.89",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.37",
"m-home" : "0.0.22.65",
"m-im" : "0.0.19.20",
"m-dynamic" : "0.0.7.22",
"m-home" : "0.0.22.67",
"m-im" : "0.0.19.29",
"m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.24",
"m-tests" : "0.0.24.14",
"m-course" : "0.0.42.62",
"m-muse" : "0.0.28.23",
"m-tests" : "0.0.24.13",
"m-course" : "0.0.42.24",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.1",
"m-consultant-api": "0.0.5.62",
"m-confide-api" : "0.0.2.11",
"m-consultant-api": "0.0.5.63",
"m-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3",
"m-muse-api" : "0.0.1",
......@@ -118,10 +115,10 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.13",
"ydl-platform" : "0.0.40.15",
//第二步 若干
"ydl-webview" : "0.0.38.46",
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.9",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
......@@ -136,7 +133,7 @@ ext {
dependencies = [
//support
"appcompat-v7" : 'androidx.appcompat:appcompat:1.2.0',
"design" : 'com.google.android.material:material:1.0.0',
"design" : 'com.google.android.material:material:1.3.0',
"support-v4" : 'androidx.legacy:legacy-support-v4:1.0.0',
"cardview-v7" : 'androidx.cardview:cardview:1.0.0',
"annotations" : "androidx.annotation:annotation:1.0.0",
......
......@@ -6,10 +6,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.QueryMap
import retrofit2.http.Url
import retrofit2.http.*
/**
* @author yuanwai
......@@ -22,7 +19,7 @@ interface ConfideHomeApi{
//倾诉首页
@Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json")
@GET
fun confideHome(@Url url: String): Observable<BaseAPIResponse<MutableList<ConfideHomeDataBean>>>
fun confideHome(@Url url: String,@Query("cateSource") cateSource:Int): Observable<BaseAPIResponse<MutableList<ConfideHomeDataBean>>>
//每日精选 换一批
@Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA,"Content-Type:application/json")
......
......@@ -35,7 +35,7 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{
override fun confideHomeRequest(): Observable<BaseAPIResponse<MutableList<ConfideHomeDataBean>>> {
return RxUtils.mapObservable(ConfideHomeParam(0))
.flatMap {
confideHomeApi.confideHome(HttpConfig.JAVA_BASE_URL+"auth/listen/home")
confideHomeApi.confideHome(HttpConfig.JAVA_BASE_URL+"auth/listen/home",2)
}
}
......
......@@ -11,7 +11,6 @@ import com.ydl.ydlcommon.utils.RxLifecycleUtils
import com.ydl.ydlcommon.utils.YDLAsyncUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.consultant.http.ExpertSearchDataManager
import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.model.bean.AllFilter
......@@ -29,8 +28,8 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
@SuppressLint("CheckResult")
fun fetchListHead() {
SearchApi.getSearchApi()
.searchConditions()
.compose(RxLifecycleUtils.bindToLifecycle(mView!!))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁
.searchConditions(2)
.compose(RxLifecycleUtils.bindToLifecycle(mView))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁
.compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -106,7 +105,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
@SuppressLint("CheckResult")
fun fetchListData(allFilter: AllFilter, page: Int) {
//是否亲子教育字段
ConsultAssistantDialogUtils.REALATION_EDUCATION = allFilter.categories.size==1&&allFilter.categories[0].cateId==23
ConsultAssistantDialogUtils.REALATION_EDUCATION = allFilter.categories.size==1&&allFilter.categories[0].cateId=="23"
var showType = 0
val sb = StringBuffer()
......@@ -116,7 +115,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if ("0" == categorys) {
categorys = ""
}
sb.append("&categories=").append(categorys)
sb.append("&directionTags=").append(categorys)
}
if (allFilter.sub.key != null) {
sb.append("&city=").append(Integer.parseInt(allFilter.sub.key))
......@@ -133,6 +132,10 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if (allFilter.ages.isNotEmpty()) {
sb.append("&ages=").append(allFilter.ages.map { it.key }.joinToString(","))
}
// 擅长人群拼接
if (allFilter.specialityCrowd.isNotEmpty()){
sb.append("&crowdsTags=").append(allFilter.specialityCrowd.map { it.key }.joinToString(","))
}
if (allFilter.others.isNotEmpty()) {
sb.append("&others=").append(allFilter.others.map { it.key }.joinToString(","))
}
......@@ -149,18 +152,18 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
}
sb.append("&page=").append(page)
ExpertSearchDataManager.getHttp().searchDoctor(sb.toString())
.compose(RxLifecycleUtils.bindToLifecycle(mView!!))
.compose(RxLifecycleUtils.bindToLifecycle(mView))
.compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
if (null != it.list && !it.list!!.isEmpty()) {
if (null != it.list && it.list.isNotEmpty()) {
// if (showType == 0) {
// mView.onDoctorListFetched(it.list!!, page, it.pages)
// } else {
// mView.onServiceListFetched(it.list!!, page, it.pages)
// }
mView.onDoctorListFetched(it.list!!, page, it.pages)
mView.onDoctorListFetched(it.list, page, it.pages)
//更新缓存 只更新第一页的缓存
if (page == 1){
updateCache(showType,it)
......
......@@ -331,7 +331,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}
ExpertSearchActivity.start(this, keyWord)
ExpertSearchActivity.startSearch(this, keyWord)
this.finish()
}
......
......@@ -449,6 +449,7 @@ class ExpertSearchAdapter(
if (!TextUtils.isEmpty(doctor.uid)) {
//跳转私聊
ConsultantIn.startP2PSession(context as AppCompatActivity, doctor.uid!!)
ActionCountUtils.count(ConsultBIConstants.UserMainEvent.YDL_PRIVATE_CHAT_CLICK)
} else {
ToastHelper.show("请联系客服,专家参数错误!")
}
......
......@@ -13,6 +13,7 @@ class ConsultBIConstants {
const val POSITION_AVERAGE_SERVICE_INPUT = "average_service_input" //服务均价
const val POSITION_AGE_CHOICE_CLICK = "age_choice_click" //年龄选择
const val POSITION_QUALIFICATION_CHOICE_CLICK = "qualification_choice_click" //资质选择
const val POSITION_GOOD_AT_CLICK = "good_at_click" // 擅长人群
const val POSITION_OTHER_CHOICE_CLICK = "other_choice_click" //其他选择
const val POSITION_CONSULT_FILTER_RESET_CLICK = "consult_filter_reset_click" //重置
const val POSITION_CONSULT_FILTER_CHECKOUT_CLICK = "consult_filter_checkoutallconsultants_click" //查看XXX位咨询师
......@@ -53,7 +54,8 @@ class ConsultBIConstants {
private const val YDL_USER_MAIN_PAGE: String = "ydl_user_main_page|"//壹点灵用户版首页 partId
const val YDL_USER_SEARCH_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_search_click"//搜索栏
const val YDL_USER_SEARCH_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_search_click" //搜索栏
const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 点击私聊按钮
}
}
......
......@@ -40,7 +40,7 @@ interface SearchApi {
//搜索条件
@GET("consult/search/conditions")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun searchConditions(): Observable<BaseAPIResponse<HeadData>>
fun searchConditions(@Query("cateSource") cateSource: Int): Observable<BaseAPIResponse<HeadData>>
//专家服务搜索
@retrofit2.http.Headers("Content-Type:application/json")
......
......@@ -21,5 +21,6 @@ data class AllFilter(
val ages: ArrayList<AgeItem> = ArrayList(), //年龄
val others: ArrayList<OtherItem> = ArrayList(),//其他筛选
val title:ArrayList<ReorderItem> = ArrayList()//资质
val title:ArrayList<ReorderItem> = ArrayList(), //资质
val specialityCrowd:ArrayList<SpecialityCrowdBean> = ArrayList() // 擅长人群
)
\ No newline at end of file
......@@ -10,25 +10,30 @@ data class CateItem(
var cateName: String? = null,
@field:SerializedName("cate_id")
var cateId: Int? = null
var cateId: String? = null
) : Parcelable {
constructor(source: Parcel) : this(
source.readString(),
source.readValue(Int::class.java.classLoader) as Int?
)
constructor(parcel: Parcel) : this(
parcel.readString(),
parcel.readString()
) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(cateName)
parcel.writeString(cateId)
}
override fun describeContents() = 0
override fun describeContents(): Int {
return 0
}
override fun writeToParcel(dest: Parcel, flags: Int) = with(dest) {
writeString(cateName)
writeValue(cateId)
companion object CREATOR : Parcelable.Creator<CateItem> {
override fun createFromParcel(parcel: Parcel): CateItem {
return CateItem(parcel)
}
companion object {
@JvmField
val CREATOR: Parcelable.Creator<CateItem> = object : Parcelable.Creator<CateItem> {
override fun createFromParcel(source: Parcel): CateItem = CateItem(source)
override fun newArray(size: Int): Array<CateItem?> = arrayOfNulls(size)
override fun newArray(size: Int): Array<CateItem?> {
return arrayOfNulls(size)
}
}
}
\ No newline at end of file
......@@ -8,5 +8,8 @@ data class EnquiryItem(
val value: String? = null,
@field:SerializedName("key")
val key: Int? = null
val key: Int? = null,
val checkRrl: String?,
val unCheckUrl: String?
)
\ No newline at end of file
......@@ -37,5 +37,18 @@ data class Filters(
* 资质选择
*/
@field:SerializedName("title")
val title: List<ReorderItem> = ArrayList() //资质
val title: List<ReorderItem> = ArrayList(),
// /**
// * 擅长人群
// */
// @field:SerializedName("crowdsTags")
// val crowdsTags: List<AgeItem> = ArrayList()
/**
* 擅长人群
*/
@field:SerializedName("specialityCrowd")
val specialityCrowd: ArrayList<SpecialityCrowdBean> = ArrayList()
)
\ No newline at end of file
package com.yidianling.consultant.model.bean
import com.google.gson.annotations.SerializedName
data class SpecialityCrowdBean(
@field:SerializedName("value")
var value: String? = null,
@field:SerializedName("key")
var key: String? = null
)
\ No newline at end of file
......@@ -36,7 +36,7 @@ class ConsultantServiceImp : IConsultantService {
override fun expertSearchIntent(
activity: Activity,
category: Int,
category: String,
showType: Int,
isInitShowHot: Boolean
): Intent {
......@@ -72,14 +72,14 @@ class ConsultantServiceImp : IConsultantService {
override fun startExpertSearchActivity(
mContext: Context,
category: Int,
category: String,
categoryName: String,
showType: Int
) {
ExpertSearchActivity.start(mContext, category, categoryName, showType)
}
override fun startExpertSearchActivity(mContext: Context, category: Int) {
override fun startExpertSearchActivity(mContext: Context, category: String) {
ExpertSearchActivity.start(mContext, category)
}
......
......@@ -23,11 +23,11 @@ interface IConsultantService: IProvider {
fun resetConsultAssistantDialogStatus()
fun expertSearchIntent(activity: android.app.Activity, category: kotlin.Int, showType: kotlin.Int, isInitShowHot: kotlin.Boolean): android.content.Intent
fun expertSearchIntent(activity: android.app.Activity, category: String, showType: Int, isInitShowHot: kotlin.Boolean): android.content.Intent
fun startExpertSearchActivity(context: Context, category: Int, categoryName: String, showType: Int)
fun startExpertSearchActivity(context: Context, category: String, categoryName: String, showType: Int)
fun startExpertSearchActivity(mContext: Context, category: Int)
fun startExpertSearchActivity(mContext: Context, category: String)
fun getHotSearch(): kotlin.collections.MutableList<Keyworks>
......
......@@ -3,10 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@color/platform_white"
>
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.yidianling.consultant.ui.view.DisInterceptNestedScrollView
android:id="@+id/scroll"
......@@ -31,10 +30,10 @@
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"/>
android:text="@string/platform_theme"
android:textColor="@color/platform_color_242424" />
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvArea"
......@@ -42,10 +41,10 @@
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"/>
android:text="@string/platform_area"
android:textColor="@color/platform_color_242424" />
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvSort"
......@@ -53,10 +52,10 @@
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"/>
android:text="@string/platform_sort"
android:textColor="@color/platform_color_242424" />
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/tvFilter"
......@@ -64,25 +63,24 @@
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"/>
android:text="@string/platform_filter"
android:textColor="@color/platform_color_242424" />
</LinearLayout>
<LinearLayout
android:id="@+id/lin_filter2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="10dp"
android:paddingBottom="10dp"
android:orientation="horizontal">
</LinearLayout>
android:paddingBottom="10dp"/>
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:background="@drawable/consult_fillter_bg"/>
android:background="@drawable/consult_fillter_bg" />
</LinearLayout>
......@@ -96,9 +94,7 @@
android:id="@+id/viewSep2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/transparent"
/>
android:background="@color/transparent" />
<androidx.recyclerview.widget.RecyclerView
......@@ -106,36 +102,35 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platform_white"
android:overScrollMode="never"/>
android:overScrollMode="never" />
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
android:visibility="gone" />
<LinearLayout
android:id="@+id/ll_network_error"
android:layout_width="match_parent"
android:layout_height="400dp"
android:orientation="vertical"
android:background="@color/platform_white"
android:gravity="center_horizontal"
android:visibility="gone"
>
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:id="@+id/iv_exception"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/consultant_img_netwrok_error"/>
android:src="@drawable/consultant_img_netwrok_error" />
<TextView
android:id="@+id/tv_reload_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/consultant_reload_hint"/>
android:text="@string/consultant_reload_hint" />
<TextView
android:id="@+id/tv_reload"
......@@ -148,7 +143,7 @@
android:paddingRight="@dimen/platform_dp_32"
android:paddingBottom="@dimen/platform_dp_8"
android:text="重新加载"
android:textColor="@color/platform_main_theme"/>
android:textColor="@color/platform_main_theme" />
</LinearLayout>
<ImageButton
......@@ -162,14 +157,13 @@
android:background="@color/platform_transparent"
android:padding="0dp"
android:src="@drawable/consultant_ico_totop"
android:visibility="gone"
/>
android:visibility="gone" />
<View
android:id="@+id/viewDim"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#40000000"
android:visibility="invisible"/>
android:visibility="invisible" />
</RelativeLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginBottom="4dp"
android:background="@drawable/consultant_bg_search_filter_selector"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_consultant_method"
android:layout_width="@dimen/platform_dp_18"
android:layout_height="@dimen/platform_dp_18" />
<TextView
android:id="@+id/tvFilterName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:orientation="vertical"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:layout_marginStart="@dimen/platform_dp_4"
android:textColor="@color/consultant_color_search_filter_selector"
android:textSize="13sp"
tools:text="当面" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platform_white"
......@@ -9,16 +10,16 @@
<ScrollView
android:id="@+id/sv_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/platform_white"
android:overScrollMode="never">
android:overScrollMode="never"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:layout_marginTop="@dimen/platform_dp_20"
android:layout_marginStart="8dp"
android:orientation="vertical">
<TextView
......@@ -42,7 +43,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginTop="@dimen/platform_dp_28"
android:text="咨询方式"
android:textColor="@color/platform_color_242424"
......@@ -58,7 +58,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginTop="@dimen/platform_dp_28"
android:text="服务均价"
android:textColor="@color/platform_color_242424"
......@@ -74,7 +73,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginTop="@dimen/platform_dp_28"
android:text="年龄选择"
android:textColor="@color/platform_color_242424"
......@@ -90,7 +88,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginTop="@dimen/platform_dp_28"
android:text="资质选择"
android:textColor="@color/platform_color_242424"
......@@ -108,7 +105,53 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginTop="28dp"
android:text="擅长人群"
android:textColor="@color/platform_color_242424"
android:textSize="16sp"
android:textStyle="bold" />
<cn.lankton.flowlayout.FlowLayout
android:id="@+id/fl_crowd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:paddingLeft="5dp"
app:lineSpacing="10dp" />
<LinearLayout
android:id="@+id/ll_crowd_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="MissingConstraints"
tools:visibility="visible">
<TextView
android:id="@+id/tv_crowd_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="展开"
android:textSize="12sp"
android:textColor="@color/platform_color_666666"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/iv_crowd_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_crowd_open"
/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_28"
android:text="其他选择"
android:textColor="@color/platform_color_242424"
......@@ -131,9 +174,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
android:layout_marginTop="10dp"
android:background="@color/platform_white"
android:orientation="horizontal">
......@@ -154,12 +197,12 @@
android:layout_height="44dp"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_weight="2"
android:layout_weight="1"
android:background="@drawable/consultant_bg_radius_5_light"
android:gravity="center"
android:hint="暂无匹配咨询师"
android:textColorHint="@color/platform_color_E0E0E0"
android:textColor="@color/platform_but_text_color"
android:textColorHint="@color/platform_color_E0E0E0"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
......@@ -78,7 +78,7 @@ object DynamicIn {
fun getUserInfo(): UserResponseBean.UserInfo? = getUserService().getUserInfo()
fun loginWayIntent(activity: Activity): Intent? {
fun loginWayIntent(activity: Activity): Intent {
return getUserService().loginWayIntent(activity)
}
......@@ -86,7 +86,7 @@ object DynamicIn {
getAppService().personalInfoIntent(activity)
}
fun inputPhoneIntent(activity: Activity, smsAction: String): Intent? {
fun inputPhoneIntent(activity: Activity, smsAction: String): Intent {
return getUserService().inputPhoneIntent(activity, smsAction)
}
......@@ -104,7 +104,7 @@ object DynamicIn {
showType: Int,
isInitShowHot: Boolean
): Intent? {
return getConsultService().expertSearchIntent(activity, category, showType, isInitShowHot)
return getConsultService().expertSearchIntent(activity, category.toString(), showType, isInitShowHot)
}
fun testResultH5(testResultId: Int) {
......@@ -115,11 +115,11 @@ object DynamicIn {
getTestsService().testDetailH5(testId.toString());
}
fun phoneCallIntent(activity: Activity): Intent? {
fun phoneCallIntent(activity: Activity): Intent {
return getConfideService().phoneCallIntent(activity)
}
fun fmDetailIntent(activity: Activity, fmId: Int): Intent? {
fun fmDetailIntent(activity: Activity, fmId: Int): Intent {
return getFMService().fmDetailIntent(activity, fmId)
}
......@@ -131,7 +131,7 @@ object DynamicIn {
getAppService().rechargeIntent(activity)
}
fun phoneCallFragment(head: String, callId: String): DialogFragment? {
fun phoneCallFragment(head: String, callId: String): DialogFragment {
return getConfideService().phoneCallFragment(head, callId)
}
......@@ -141,11 +141,11 @@ object DynamicIn {
}
fun isFmPlaying(): Boolean {
return getFMService().isPlaying() ?: false
return getFMService().isPlaying()
}
fun isCoursePlaying(): Boolean {
return getCourseService().isPlaying() ?: false
return getCourseService().isPlaying()
}
fun playCourse() {
......
......@@ -35,7 +35,7 @@ class HomeBIConstants {
const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多
const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域
const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit "//首页浏览事件
const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 首页咨询分类点击私聊按钮
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ class HomeBaseHttp {
//首页头部 分类&Banner 请求
fun newHomeHeaderRequest(): Observable<BaseAPIResponse<HomeHeaderBean>> {
return getHomePagerApi().getHomeHeaderData()
return getHomePagerApi().getHomeHeaderData(2)
}
//首页倾述请求
......
......@@ -25,7 +25,7 @@ interface HomeBasePagerApi {
*/
@GET("home/index")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getHomeHeaderData(): Observable<BaseAPIResponse<HomeHeaderBean>>
fun getHomeHeaderData(@Query("cateSource") cateSource: Int): Observable<BaseAPIResponse<HomeHeaderBean>>
/**
* 首页咨询请求
......@@ -34,7 +34,7 @@ interface HomeBasePagerApi {
@GET("doctor/nlist")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getConsultData(
@Query("categories") category: String,
@Query("directionTags") category: String,
@Query("limit") limit: String = "3",
@Query("page") page: String = "1",
@Query("uid") uid: String,
......
......@@ -122,6 +122,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
tv_consult_chat.setOnClickListener {
homeEvent!!.consultChatClick(bodyBean.uid.toString())
ActionCountUtils.count(HomeBIConstants.YDL_PRIVATE_CHAT_CLICK)
}
}
}
......@@ -134,18 +134,13 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
*/
private fun setConfideButton(bodyBean: HomeConsultBean.ListBean) {
tv_consult_chat.setOnClickListener {
// homeEvent!!.consultChatClick(bodyBean.uid.toString())
/*ModularServiceManager.provide(IConsultantService::class.java).jumpConsultAssistant(
mContext as Activity,
11
)*/
ModularServiceManager.provide(IConsultantService::class.java).dueToTypeJumpAutoOrGuide(
mContext as Activity,
11,
bodyBean.uid,
""
)
ActionCountUtils.count(HomeBIConstants.YDL_PRIVATE_CHAT_CLICK)
}
}
......
......@@ -6,7 +6,8 @@ public class MultipleSelectedEvent (
val strSelected:String?,
var othersState:OthersState?,
var multipleAnswerBean:MultipleAnswerBean?,
var isFromInputPanel:Boolean
var isFromInputPanel:Boolean,
var recoverInput:Boolean
)
data class OthersState(
var isOthers:Boolean,
......
......@@ -193,7 +193,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
//请求接口发送所选题目,通过发通知到YDLMessageFragment统一回答问题。
EventBus.getDefault().post(new MultipleSelectedEvent(null, null,
new MultipleAnswerBean(examId, questionPaperId, ImIn.INSTANCE.getUserInfo().getUid(),
questionId, answersItems,message.getFromAccount()),false));
questionId, answersItems,message.getFromAccount()),false,false));
});
multiple_choice_title.setText(customAttachLingxiWhichQuestion.name);
adapterLingxiMultipleChoice = new AdapterLingxiMultipleChoice();
......@@ -221,6 +221,12 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
@Override
public void onItemClick(@NotNull QuestionItemBean itemBean, int position) {
/*
* 单选题:分其他选项和非其他选项
* 其他选项,唤起输入框
* 点击非其他选项直接发送答案
* */
if (isClickable) {
for (int i = 0; i < questionList.size(); i++) {
if (questionList.get(i).isSelected()) {
......@@ -229,21 +235,31 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
isClickable = true;
questionList.get(i).setSelected(false);
selectedStr.remove(questionList.get(i).getName());
break;
}
}
} else {
if (i == position) {
questionList.get(i).setSelected(true);
selectedStr.add(questionList.get(i).getName());
}else{
questionList.get(i).setSelected(false);
if (questionList.get(i).getName().contains("其他")){
selectedStr.remove(questionList.get(i).getName());
}
}
}
questionList.get(i).setSelected(i == position);
}
adapterLingxiWhichQuestion.setTagData(questionList, isSingleChoice);
for (int i = 0; i < questionList.size(); i++) {
if (questionList.get(i).isSelected()){
answersItems.clear();
answersItems.add(new AnswersItem(questionList.get(position).getId(),
questionList.get(position).getName(), "", questionList.get(position).getRelates()));
break;
}
}
stringBuffer.delete(2, stringBuffer.length());
for (int i = 0; i < selectedStr.size(); i++) {
stringBuffer.append("#").append(selectedStr.get(i));
......@@ -255,9 +271,12 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
answerLingxiQuestion(examId, questionPaperId, ImIn.INSTANCE.getUserInfo().getUid().toString(), questionId, answersItems);
//更新本地消息
updateLocalMsg(position,null);
//发通知取消隐藏输入框表情等符号
EventBus.getDefault().post(new MultipleSelectedEvent(stringBuffer.toString(), new OthersState(isOthers, questionList.get(position).isSelected()), new MultipleAnswerBean(examId, questionPaperId, ImIn.INSTANCE.getUserInfo().getUid(),
questionId, answersItems,message.getFromAccount()),false,true));
}else{
EventBus.getDefault().post(new MultipleSelectedEvent(stringBuffer.toString(), new OthersState(isOthers, questionList.get(position).isSelected()), new MultipleAnswerBean(examId, questionPaperId, ImIn.INSTANCE.getUserInfo().getUid(),
questionId, answersItems,message.getFromAccount()),false));
questionId, answersItems,message.getFromAccount()),false,false));
}
}
}
......@@ -325,7 +344,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
}
isOthers = questionList.get(position).getName().contains("其他");
EventBus.getDefault().post(new MultipleSelectedEvent(stringBuffer.toString(), new OthersState(isOthers, questionList.get(position).isSelected()), new MultipleAnswerBean(examId, questionPaperId, ImIn.INSTANCE.getUserInfo().getUid(),
questionId, answersItems,message.getFromAccount()),false));
questionId, answersItems,message.getFromAccount()),false,false));
adapterLingxiMultipleChoice.setTagData(questionList);
}
}
......
......@@ -56,6 +56,12 @@ public class MsgViewHolderModifyTime extends MsgViewHolderBase {
@Override
protected void onItemClick() {
NewH5Activity.start(context, new H5Params(userUrl + "&dsmId=" + dsmId, "预约时间修改"));
String url;
if (userUrl.endsWith("?")) {
url = userUrl + "dsmId=" + dsmId;
} else {
url = userUrl + "&dsmId=" + dsmId;
}
NewH5Activity.start(context, new H5Params(url, "预约时间修改"));
}
}
......@@ -287,7 +287,7 @@ class ChatFragment : BaseFragment(), XRecyclerView.LoadingListener {
ll_chat_unusual_view.setListener(object : ChatUnusualView.ChatUnusualListener {
override fun onButtonClick() {
startActivity(
ImIn.getConsultService().expertSearchIntent(activity!!, 0, 0, false)
ImIn.getConsultService().expertSearchIntent(activity!!, "0", 0, false)
)
}
})
......
......@@ -225,14 +225,18 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
JSONObject json = JSON.parseObject(content);
int id = json.getIntValue("id");
if (id == 1) {
//对方输入中
oldName= tb.getTitle();
tb.setTitle("对方正在输入...");
} else if (id==2){
//对方结束输入
tb.setTitle(oldName);
}else{
tb.setTitle(oldName);
}
} catch (Exception e) {
tb.setTitle(oldName);
}
}
......
......@@ -1055,6 +1055,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
answersItems=event.getMultipleAnswerBean().getAnswersItems();
multipleAnswerBean=event.getMultipleAnswerBean();
multipleAnswerBean.setAnswersItems(answersItems);
if (event.getRecoverInput()){
inputPanel.onlyShowTextEnd();
return;
}
if (event.getOthersState().isOthers()){
//用户点击了其他事件
if (event.getOthersState().getOthersSelect()){
......@@ -1071,10 +1075,16 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
isOthers=event.getOthersState().getOthersSelect();
inputPanel.onlyShowTextEnd();
}
if (event.getStrSelected().contains("其他")){
question_multiple.setVisibility(View.VISIBLE);
question_multiple.setText(event.getStrSelected());
}
}else{
if (event.getStrSelected().contains("其他")){
question_multiple.setVisibility(View.VISIBLE);
question_multiple.setText(event.getStrSelected());
}
}
}else if (event.isFromInputPanel()){
for (int i=0;i<answersItems.size();i++){
if (answersItems.get(i).getName().contains("其他")){
......@@ -1133,6 +1143,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
inputPanel.setInputContent("");
question_multiple.setText("");
question_multiple.setVisibility(View.GONE);
inputPanel.onlyShowTextEnd();
answerLingxiQuestion(multipleAnswerBean.getExamId(),multipleAnswerBean.getQuestionPaperId(),
multipleAnswerBean.getUid(),multipleAnswerBean.getQuestionId(),multipleAnswerBean.getAnswersItems(),
......
......@@ -418,7 +418,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
} else if (v == sendMessageButtonInInputBar) {
if (onlyShowInputTest){
EventBus.getDefault().post(new MultipleSelectedEvent(null, null,
null,true));
null,true,false));
}else{
onTextMessageSendButtonPressed();
}
......
......@@ -590,12 +590,17 @@
android:textStyle="bold" />
</RelativeLayout>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/im_sp_14"
android:maxHeight="@dimen/platform_dp_20"
android:textColor="@color/im_color_242424"
android:layout_gravity="bottom"
android:maxLines="3"
android:visibility="gone"
android:id="@+id/question_multiple"
tools:text="已选:#工作压力 #生活压力#其他"
android:layout_marginStart="@dimen/platform_dp_12"
......@@ -604,8 +609,6 @@
>
</TextView>
</FrameLayout>
<FrameLayout
android:id="@+id/fl_question_content"
android:layout_width="match_parent"
......
......@@ -101,7 +101,7 @@ class ApkInstallTool {
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
if (Build.VERSION.SDK_INT >= 24) { //判读版本是否在7.0以上
//参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致 参数3 共享的文件
val apkUri = FileProvider.getUriForFile(context!!, "com.cxzapp.yidianling.fileprovider", file)
val apkUri = context?.let { FileProvider.getUriForFile(it, "${it.applicationContext.packageName}.fileprovider", file) }
//添加这一句表示对目标应用临时授权该Uri所代表的文件
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
intent.setDataAndType(apkUri, "application/vnd.android.package-archive")
......
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