Commit 918cc67f by YKai

Merge remote-tracking branch 'origin/4.2.41(筛选专家标签适配)' into 4.2.60

# Conflicts:
#	config.gradle
parents 2dc5f8aa 6f746d54
...@@ -6,12 +6,12 @@ ext { ...@@ -6,12 +6,12 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.09", "m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.79", "m-consultant" : "0.0.59.87",
"m-fm" : "0.0.30.03", "m-fm" : "0.0.30.03",
"m-user" : "0.0.61.37", "m-user" : "0.0.61.37",
"m-home" : "0.0.22.65", "m-home" : "0.0.22.66",
"m-im" : "0.0.19.28", "m-im" : "0.0.19.28",
"m-dynamic" : "0.0.7.22", "m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.24", "m-muse" : "0.0.28.24",
...@@ -21,7 +21,7 @@ ext { ...@@ -21,7 +21,7 @@ ext {
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.11", "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-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
"m-muse-api" : "0.0.1", "m-muse-api" : "0.0.1",
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.13", "ydl-platform" : "0.0.40.14",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.46", "ydl-webview" : "0.0.38.46",
...@@ -89,24 +89,21 @@ ext { ...@@ -89,24 +89,21 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.09", "m-confide" : "0.0.49.09",
"m-consultant" : "0.0.59.79", "m-consultant" : "0.0.59.87",
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.37", "m-user" : "0.0.61.37",
"m-home" : "0.0.22.65", "m-home" : "0.0.22.66",
"m-im" : "0.0.19.20", "m-im" : "0.0.19.24",
"m-dynamic" : "0.0.7.22", "m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.24", "m-muse" : "0.0.28.24",
"m-tests" : "0.0.24.14", "m-tests" : "0.0.24.14",
"m-course" : "0.0.42.62", "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 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.1", "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-course-api" : "0.0.3.6",
"m-fm-api" : "0.0.3", "m-fm-api" : "0.0.3",
"m-muse-api" : "0.0.1", "m-muse-api" : "0.0.1",
...@@ -118,7 +115,7 @@ ext { ...@@ -118,7 +115,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.13", "ydl-platform" : "0.0.40.14",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.46", "ydl-webview" : "0.0.38.46",
...@@ -136,7 +133,7 @@ ext { ...@@ -136,7 +133,7 @@ ext {
dependencies = [ dependencies = [
//support //support
"appcompat-v7" : 'androidx.appcompat:appcompat:1.2.0', "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', "support-v4" : 'androidx.legacy:legacy-support-v4:1.0.0',
"cardview-v7" : 'androidx.cardview:cardview:1.0.0', "cardview-v7" : 'androidx.cardview:cardview:1.0.0',
"annotations" : "androidx.annotation:annotation:1.0.0", "annotations" : "androidx.annotation:annotation:1.0.0",
......
...@@ -6,10 +6,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN ...@@ -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.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse import com.ydl.ydlcommon.data.http.BaseAPIResponse
import io.reactivex.Observable import io.reactivex.Observable
import retrofit2.http.GET import retrofit2.http.*
import retrofit2.http.Headers
import retrofit2.http.QueryMap
import retrofit2.http.Url
/** /**
* @author yuanwai * @author yuanwai
...@@ -22,7 +19,7 @@ interface ConfideHomeApi{ ...@@ -22,7 +19,7 @@ interface ConfideHomeApi{
//倾诉首页 //倾诉首页
@Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json") @Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json")
@GET @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") @Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA,"Content-Type:application/json")
......
...@@ -35,7 +35,7 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{ ...@@ -35,7 +35,7 @@ class ConfideHomeHttpImpl private constructor(): IConfideHomeHttp{
override fun confideHomeRequest(): Observable<BaseAPIResponse<MutableList<ConfideHomeDataBean>>> { override fun confideHomeRequest(): Observable<BaseAPIResponse<MutableList<ConfideHomeDataBean>>> {
return RxUtils.mapObservable(ConfideHomeParam(0)) return RxUtils.mapObservable(ConfideHomeParam(0))
.flatMap { .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 ...@@ -11,7 +11,6 @@ import com.ydl.ydlcommon.utils.RxLifecycleUtils
import com.ydl.ydlcommon.utils.YDLAsyncUtils import com.ydl.ydlcommon.utils.YDLAsyncUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.consultant.http.ExpertSearchDataManager import com.yidianling.consultant.http.ExpertSearchDataManager
import com.yidianling.consultant.model.SearchApi import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.model.bean.AllFilter import com.yidianling.consultant.model.bean.AllFilter
...@@ -29,8 +28,8 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -29,8 +28,8 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
fun fetchListHead() { fun fetchListHead() {
SearchApi.getSearchApi() SearchApi.getSearchApi()
.searchConditions() .searchConditions(2)
.compose(RxLifecycleUtils.bindToLifecycle(mView!!))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁 .compose(RxLifecycleUtils.bindToLifecycle(mView))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁
.compose(RxUtils.resultJavaData()) .compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
...@@ -106,7 +105,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -106,7 +105,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
fun fetchListData(allFilter: AllFilter, page: Int) { 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 var showType = 0
val sb = StringBuffer() val sb = StringBuffer()
...@@ -116,7 +115,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -116,7 +115,7 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if ("0" == categorys) { if ("0" == categorys) {
categorys = "" categorys = ""
} }
sb.append("&categories=").append(categorys) sb.append("&directionTags=").append(categorys)
} }
if (allFilter.sub.key != null) { if (allFilter.sub.key != null) {
sb.append("&city=").append(Integer.parseInt(allFilter.sub.key)) sb.append("&city=").append(Integer.parseInt(allFilter.sub.key))
...@@ -133,6 +132,10 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -133,6 +132,10 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if (allFilter.ages.isNotEmpty()) { if (allFilter.ages.isNotEmpty()) {
sb.append("&ages=").append(allFilter.ages.map { it.key }.joinToString(",")) 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()) { if (allFilter.others.isNotEmpty()) {
sb.append("&others=").append(allFilter.others.map { it.key }.joinToString(",")) sb.append("&others=").append(allFilter.others.map { it.key }.joinToString(","))
} }
...@@ -149,18 +152,18 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() { ...@@ -149,18 +152,18 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
} }
sb.append("&page=").append(page) sb.append("&page=").append(page)
ExpertSearchDataManager.getHttp().searchDoctor(sb.toString()) ExpertSearchDataManager.getHttp().searchDoctor(sb.toString())
.compose(RxLifecycleUtils.bindToLifecycle(mView!!)) .compose(RxLifecycleUtils.bindToLifecycle(mView))
.compose(RxUtils.resultJavaData()) .compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer { .subscribe(Consumer {
if (null != it.list && !it.list!!.isEmpty()) { if (null != it.list && it.list.isNotEmpty()) {
// if (showType == 0) { // if (showType == 0) {
// mView.onDoctorListFetched(it.list!!, page, it.pages) // mView.onDoctorListFetched(it.list!!, page, it.pages)
// } else { // } else {
// mView.onServiceListFetched(it.list!!, page, it.pages) // mView.onServiceListFetched(it.list!!, page, it.pages)
// } // }
mView.onDoctorListFetched(it.list!!, page, it.pages) mView.onDoctorListFetched(it.list, page, it.pages)
//更新缓存 只更新第一页的缓存 //更新缓存 只更新第一页的缓存
if (page == 1){ if (page == 1){
updateCache(showType,it) updateCache(showType,it)
......
...@@ -331,7 +331,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon ...@@ -331,7 +331,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
} }
ExpertSearchActivity.start(this, keyWord) ExpertSearchActivity.startSearch(this, keyWord)
this.finish() this.finish()
} }
......
...@@ -13,6 +13,7 @@ class ConsultBIConstants { ...@@ -13,6 +13,7 @@ class ConsultBIConstants {
const val POSITION_AVERAGE_SERVICE_INPUT = "average_service_input" //服务均价 const val POSITION_AVERAGE_SERVICE_INPUT = "average_service_input" //服务均价
const val POSITION_AGE_CHOICE_CLICK = "age_choice_click" //年龄选择 const val POSITION_AGE_CHOICE_CLICK = "age_choice_click" //年龄选择
const val POSITION_QUALIFICATION_CHOICE_CLICK = "qualification_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_OTHER_CHOICE_CLICK = "other_choice_click" //其他选择
const val POSITION_CONSULT_FILTER_RESET_CLICK = "consult_filter_reset_click" //重置 const val POSITION_CONSULT_FILTER_RESET_CLICK = "consult_filter_reset_click" //重置
const val POSITION_CONSULT_FILTER_CHECKOUT_CLICK = "consult_filter_checkoutallconsultants_click" //查看XXX位咨询师 const val POSITION_CONSULT_FILTER_CHECKOUT_CLICK = "consult_filter_checkoutallconsultants_click" //查看XXX位咨询师
......
...@@ -13,7 +13,6 @@ import com.yidianling.consultant.model.bean.ExpertSearchBean ...@@ -13,7 +13,6 @@ import com.yidianling.consultant.model.bean.ExpertSearchBean
import com.yidianling.consultant.model.bean.HeadData import com.yidianling.consultant.model.bean.HeadData
import io.reactivex.Observable import io.reactivex.Observable
import retrofit2.http.* import retrofit2.http.*
import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
/** /**
...@@ -41,7 +40,7 @@ interface SearchApi { ...@@ -41,7 +40,7 @@ interface SearchApi {
//搜索条件 //搜索条件
@GET("consult/search/conditions") @GET("consult/search/conditions")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @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") @retrofit2.http.Headers("Content-Type:application/json")
......
...@@ -21,5 +21,6 @@ data class AllFilter( ...@@ -21,5 +21,6 @@ data class AllFilter(
val ages: ArrayList<AgeItem> = ArrayList(), //年龄 val ages: ArrayList<AgeItem> = ArrayList(), //年龄
val others: ArrayList<OtherItem> = 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
...@@ -6,29 +6,34 @@ import com.google.gson.annotations.SerializedName ...@@ -6,29 +6,34 @@ import com.google.gson.annotations.SerializedName
data class CateItem( data class CateItem(
@field:SerializedName("cate_name") @field:SerializedName("cate_name")
var cateName: String? = null, var cateName: String? = null,
@field:SerializedName("cate_id") @field:SerializedName("cate_id")
var cateId: Int? = null var cateId: String? = null
) : Parcelable { ) : Parcelable {
constructor(source: Parcel) : this( constructor(parcel: Parcel) : this(
source.readString(), parcel.readString(),
source.readValue(Int::class.java.classLoader) as Int? parcel.readString()
) ) {
}
override fun describeContents() = 0 override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(cateName)
parcel.writeString(cateId)
}
override fun writeToParcel(dest: Parcel, flags: Int) = with(dest) { override fun describeContents(): Int {
writeString(cateName) return 0
writeValue(cateId)
} }
companion object { companion object CREATOR : Parcelable.Creator<CateItem> {
@JvmField override fun createFromParcel(parcel: Parcel): CateItem {
val CREATOR: Parcelable.Creator<CateItem> = object : Parcelable.Creator<CateItem> { return CateItem(parcel)
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
...@@ -4,9 +4,12 @@ import com.google.gson.annotations.SerializedName ...@@ -4,9 +4,12 @@ import com.google.gson.annotations.SerializedName
data class EnquiryItem( data class EnquiryItem(
@field:SerializedName("value") @field:SerializedName("value")
val value: String? = null, val value: String? = null,
@field:SerializedName("key") @field:SerializedName("key")
val key: Int? = null val key: Int? = null,
val checkRrl: String?,
val unCheckUrl: String?
) )
\ No newline at end of file
...@@ -3,39 +3,52 @@ package com.yidianling.consultant.model.bean ...@@ -3,39 +3,52 @@ package com.yidianling.consultant.model.bean
import com.google.gson.annotations.SerializedName import com.google.gson.annotations.SerializedName
data class Filters( data class Filters(
/** /**
* 按服务或者按专家 * 按服务或者按专家
*/ */
@field:SerializedName("show_type") @field:SerializedName("show_type")
val showType: List<ShowTypeItem> = ArrayList(), val showType: List<ShowTypeItem> = ArrayList(),
/** /**
* 其他选择 * 其他选择
*/ */
@field:SerializedName("other") @field:SerializedName("other")
val other: List<OtherItem> = ArrayList(), val other: List<OtherItem> = ArrayList(),
/** /**
* 咨询方式 * 咨询方式
*/ */
@field:SerializedName("enquiry") @field:SerializedName("enquiry")
val enquiry: List<EnquiryItem> = ArrayList(), val enquiry: List<EnquiryItem> = ArrayList(),
/** /**
* 服务均价 * 服务均价
*/ */
@field:SerializedName("priceRanges") @field:SerializedName("priceRanges")
val priceRanges: List<PriceRangesItem> = ArrayList(), val priceRanges: List<PriceRangesItem> = ArrayList(),
/** /**
* 年龄选择 * 年龄选择
*/ */
@field:SerializedName("age") @field:SerializedName("age")
val age: List<AgeItem> = ArrayList(), val age: List<AgeItem> = ArrayList(),
/** /**
* 资质选择 * 资质选择
*/ */
@field:SerializedName("title") @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
...@@ -4,33 +4,33 @@ import com.google.gson.annotations.SerializedName ...@@ -4,33 +4,33 @@ import com.google.gson.annotations.SerializedName
data class HeadData( data class HeadData(
/** /**
* 主题 * 主题
*/ */
@field:SerializedName("cates") @field:SerializedName("cates")
val cates: ArrayList<CateItem> = ArrayList(), val cates: ArrayList<CateItem> = ArrayList(),
/** /**
* 排序 * 排序
*/ */
@field:SerializedName("reorder") @field:SerializedName("reorder")
val reorder: ArrayList<ReorderItem> = ArrayList(), val reorder: ArrayList<ReorderItem> = ArrayList(),
/** /**
* 筛选 * 筛选
*/ */
@field:SerializedName("filters") @field:SerializedName("filters")
val filters: Filters = Filters(), val filters: Filters = Filters(),
/** /**
* 热门 * 热门
*/ */
@field:SerializedName("highlighter") @field:SerializedName("highlighter")
val highlighter: ArrayList<HighlighterItem> = ArrayList(), val highlighter: ArrayList<HighlighterItem> = ArrayList(),
/** /**
* 地区 * 地区
*/ */
@field:SerializedName("region") @field:SerializedName("region")
val region: ArrayList<RegionItem> = ArrayList() val region: ArrayList<RegionItem> = 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 { ...@@ -36,7 +36,7 @@ class ConsultantServiceImp : IConsultantService {
override fun expertSearchIntent( override fun expertSearchIntent(
activity: Activity, activity: Activity,
category: Int, category: String,
showType: Int, showType: Int,
isInitShowHot: Boolean isInitShowHot: Boolean
): Intent { ): Intent {
...@@ -72,14 +72,14 @@ class ConsultantServiceImp : IConsultantService { ...@@ -72,14 +72,14 @@ class ConsultantServiceImp : IConsultantService {
override fun startExpertSearchActivity( override fun startExpertSearchActivity(
mContext: Context, mContext: Context,
category: Int, category: String,
categoryName: String, categoryName: String,
showType: Int showType: Int
) { ) {
ExpertSearchActivity.start(mContext, category, categoryName, showType) ExpertSearchActivity.start(mContext, category, categoryName, showType)
} }
override fun startExpertSearchActivity(mContext: Context, category: Int) { override fun startExpertSearchActivity(mContext: Context, category: String) {
ExpertSearchActivity.start(mContext, category) ExpertSearchActivity.start(mContext, category)
} }
......
...@@ -23,11 +23,11 @@ interface IConsultantService: IProvider { ...@@ -23,11 +23,11 @@ interface IConsultantService: IProvider {
fun resetConsultAssistantDialogStatus() 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> fun getHotSearch(): kotlin.collections.MutableList<Keyworks>
......
<?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>
...@@ -78,7 +78,7 @@ object DynamicIn { ...@@ -78,7 +78,7 @@ object DynamicIn {
fun getUserInfo(): UserResponseBean.UserInfo? = getUserService().getUserInfo() fun getUserInfo(): UserResponseBean.UserInfo? = getUserService().getUserInfo()
fun loginWayIntent(activity: Activity): Intent? { fun loginWayIntent(activity: Activity): Intent {
return getUserService().loginWayIntent(activity) return getUserService().loginWayIntent(activity)
} }
...@@ -86,7 +86,7 @@ object DynamicIn { ...@@ -86,7 +86,7 @@ object DynamicIn {
getAppService().personalInfoIntent(activity) getAppService().personalInfoIntent(activity)
} }
fun inputPhoneIntent(activity: Activity, smsAction: String): Intent? { fun inputPhoneIntent(activity: Activity, smsAction: String): Intent {
return getUserService().inputPhoneIntent(activity, smsAction) return getUserService().inputPhoneIntent(activity, smsAction)
} }
...@@ -104,7 +104,7 @@ object DynamicIn { ...@@ -104,7 +104,7 @@ object DynamicIn {
showType: Int, showType: Int,
isInitShowHot: Boolean isInitShowHot: Boolean
): Intent? { ): Intent? {
return getConsultService().expertSearchIntent(activity, category, showType, isInitShowHot) return getConsultService().expertSearchIntent(activity, category.toString(), showType, isInitShowHot)
} }
fun testResultH5(testResultId: Int) { fun testResultH5(testResultId: Int) {
...@@ -115,11 +115,11 @@ object DynamicIn { ...@@ -115,11 +115,11 @@ object DynamicIn {
getTestsService().testDetailH5(testId.toString()); getTestsService().testDetailH5(testId.toString());
} }
fun phoneCallIntent(activity: Activity): Intent? { fun phoneCallIntent(activity: Activity): Intent {
return getConfideService().phoneCallIntent(activity) return getConfideService().phoneCallIntent(activity)
} }
fun fmDetailIntent(activity: Activity, fmId: Int): Intent? { fun fmDetailIntent(activity: Activity, fmId: Int): Intent {
return getFMService().fmDetailIntent(activity, fmId) return getFMService().fmDetailIntent(activity, fmId)
} }
...@@ -131,7 +131,7 @@ object DynamicIn { ...@@ -131,7 +131,7 @@ object DynamicIn {
getAppService().rechargeIntent(activity) getAppService().rechargeIntent(activity)
} }
fun phoneCallFragment(head: String, callId: String): DialogFragment? { fun phoneCallFragment(head: String, callId: String): DialogFragment {
return getConfideService().phoneCallFragment(head, callId) return getConfideService().phoneCallFragment(head, callId)
} }
...@@ -141,11 +141,11 @@ object DynamicIn { ...@@ -141,11 +141,11 @@ object DynamicIn {
} }
fun isFmPlaying(): Boolean { fun isFmPlaying(): Boolean {
return getFMService().isPlaying() ?: false return getFMService().isPlaying()
} }
fun isCoursePlaying(): Boolean { fun isCoursePlaying(): Boolean {
return getCourseService().isPlaying() ?: false return getCourseService().isPlaying()
} }
fun playCourse() { fun playCourse() {
......
...@@ -39,7 +39,7 @@ class HomeBaseHttp { ...@@ -39,7 +39,7 @@ class HomeBaseHttp {
//首页头部 分类&Banner 请求 //首页头部 分类&Banner 请求
fun newHomeHeaderRequest(): Observable<BaseAPIResponse<HomeHeaderBean>> { fun newHomeHeaderRequest(): Observable<BaseAPIResponse<HomeHeaderBean>> {
return getHomePagerApi().getHomeHeaderData() return getHomePagerApi().getHomeHeaderData(2)
} }
//首页倾述请求 //首页倾述请求
......
...@@ -25,7 +25,7 @@ interface HomeBasePagerApi { ...@@ -25,7 +25,7 @@ interface HomeBasePagerApi {
*/ */
@GET("home/index") @GET("home/index")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @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 { ...@@ -34,7 +34,7 @@ interface HomeBasePagerApi {
@GET("doctor/nlist") @GET("doctor/nlist")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getConsultData( fun getConsultData(
@Query("categories") category: String, @Query("directionTags") category: String,
@Query("limit") limit: String = "3", @Query("limit") limit: String = "3",
@Query("page") page: String = "1", @Query("page") page: String = "1",
@Query("uid") uid: String, @Query("uid") uid: String,
......
...@@ -56,6 +56,12 @@ public class MsgViewHolderModifyTime extends MsgViewHolderBase { ...@@ -56,6 +56,12 @@ public class MsgViewHolderModifyTime extends MsgViewHolderBase {
@Override @Override
protected void onItemClick() { 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 { ...@@ -287,7 +287,7 @@ class ChatFragment : BaseFragment(), XRecyclerView.LoadingListener {
ll_chat_unusual_view.setListener(object : ChatUnusualView.ChatUnusualListener { ll_chat_unusual_view.setListener(object : ChatUnusualView.ChatUnusualListener {
override fun onButtonClick() { override fun onButtonClick() {
startActivity( startActivity(
ImIn.getConsultService().expertSearchIntent(activity!!, 0, 0, false) ImIn.getConsultService().expertSearchIntent(activity!!, "0", 0, false)
) )
} }
}) })
......
...@@ -101,7 +101,7 @@ class ApkInstallTool { ...@@ -101,7 +101,7 @@ class ApkInstallTool {
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
if (Build.VERSION.SDK_INT >= 24) { //判读版本是否在7.0以上 if (Build.VERSION.SDK_INT >= 24) { //判读版本是否在7.0以上
//参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致 参数3 共享的文件 //参数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所代表的文件 //添加这一句表示对目标应用临时授权该Uri所代表的文件
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
intent.setDataAndType(apkUri, "application/vnd.android.package-archive") 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