Commit 822b9325 by 徐健

私聊部分的逻辑完成

parent 4974e23c
......@@ -43,7 +43,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.48.7.7",
"m-consultant" : "0.0.57.4",
"m-consultant" : "0.0.58.5",
"m-fm" : "0.0.29.3",
"m-user" : "0.0.60.1",
"m-home" : "0.0.19.1",
......
......@@ -87,6 +87,8 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
initViews()
initData(intent)
ActionCountUtils.count("main_page|app_consult_list_page_visit|app_consult_list_page_visit")
}
override fun getStatusViewOptions(): StatusBarOptions {
......
......@@ -73,6 +73,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
title_layout.setPadding(DisplayUtils.dp2px(context,15),0,0,0)
initViews()
initData()
ActionCountUtils.count("main_page|app_consult_list_page_visit|app_consult_list_page_visit")
}
override fun initDataAndEventLazy() {
......
......@@ -8,6 +8,7 @@ import android.text.TextUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.ConsultAssistantCenterActivity
......@@ -104,6 +105,7 @@ class ConsultAssistantDialogUtils private constructor() {
object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
//获取用户uid
ActionCountUtils.count("main_page|main_daoyi_entry_click")
YdlBuryPointUtil.sendClick("home_page_assistant_click")
getConsultAssistantUid(activity)
}
......@@ -157,6 +159,7 @@ class ConsultAssistantDialogUtils private constructor() {
activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click")
// 咨询师列表页面且未登录情况下,跳转登录页面
if (!ConsultantIn.isLogin()) {
......@@ -178,6 +181,7 @@ class ConsultAssistantDialogUtils private constructor() {
activity,
object : ConsultAssistantDialog.OnConsultAssistantClickListener {
override fun onClickAction() {
ActionCountUtils.count("app_consult_list_page|app_consult_list_daoyi_entry_click")
YdlBuryPointUtil.sendClick("assistant_list_click")
// 咨询师列表页面且未登录情况下,跳转登录页面
if (!ConsultantIn.isLogin()) {
......
......@@ -76,6 +76,7 @@ import com.yidianling.uikit.custom.bridge.ActionHandlerStorage;
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import com.yidianling.uikit.custom.http.ServiceImpl;
import com.yidianling.uikit.custom.http.response.CommonQuestionBean;
import com.yidianling.uikit.custom.http.response.NewUserMesBean;
import com.yidianling.uikit.custom.http.response.SubmitUserInfoBean;
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean;
import com.yidianling.uikit.custom.widget.ConfideOrderInfoView;
......@@ -405,7 +406,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
targetUid = ActionHandlerStorage.getL(sessionId).getInfo().toUid;
}
}
ServiceImpl.Companion.getInstance().getNewUserMes(targetUid)
ServiceImpl.Companion.getInstance().getNewUserMes(new NewUserMesBean(targetUid))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasCollectedInResp -> {
......@@ -1294,7 +1295,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(resp -> {
if (resp.data != null && resp.data.size() > 0) {
ServiceImpl.Companion.getInstance().getNewUserMes("")
ServiceImpl.Companion.getInstance().getNewUserMes(new NewUserMesBean(""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasCollectedInResp -> {
......
......@@ -50,10 +50,9 @@ interface ServiceApi {
//获取新用户收集的信息
@FormUrlEncoded
@POST("user/getNewUserMes")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getNewUserMes(@Field("targetUid") targetUid: String): Observable<BaseAPIResponse<List<UserQuestInfoBean>>>
fun getNewUserMes(@Body body: RequestBody): Observable<BaseAPIResponse<List<UserQuestInfoBean>>>
//获取用户来源的信息
@GET("user/getExChannel")
......
package com.yidianling.uikit.custom.http
import com.alibaba.fastjson.JSON
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.uikit.custom.http.response.*
......@@ -66,8 +67,13 @@ class ServiceImpl private constructor() {
/**
* 获取新用户收集的信息
*/
fun getNewUserMes(targetUid: String): Observable<BaseAPIResponse<List<UserQuestInfoBean>>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getNewUserMes(targetUid)
fun getNewUserMes(bean: NewUserMesBean): Observable<BaseAPIResponse<List<UserQuestInfoBean>>> {
val beanStr = JSON.toJSONString(bean)
val body = RequestBody.create(
MediaType.parse("application/json; charset=utf-8"),
beanStr
) as RequestBody
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getNewUserMes(body)
}
/**
......
package com.yidianling.uikit.custom.http.response
class NewUserMesBean(val targetUid: String)
\ 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