Commit 4b3c125c by konghaorui

Merge branch 'feature/v3' of…

Merge branch 'feature/v3' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into feature/v3
parents 776bc4d7 c87dabe8
......@@ -47,12 +47,12 @@ ext {
"m-consultant" : "0.0.50.1",
"m-fm" : "0.0.23.1",
"m-user" : "0.0.40.1",
"m-home" : "0.0.6.2",
"m-home" : "0.0.6.3",
"m-muse" : "0.0.20.1",
"m-tests" : "0.0.15.1",
"m-course" : "0.0.34.1",
"m-im" : "0.0.1.1",
"m-im" : "0.0.2",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
......@@ -64,7 +64,7 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.7",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.1",
"m-im-api" : "0.0.2",
//-------------- 功能组件 --------------
//第一步
......@@ -107,7 +107,7 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.7",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.1",
"m-im-api" : "0.0.2",
//-------------- 功能组件 --------------
//第一步
......
......@@ -35,16 +35,16 @@ object CourseSendPlugin {
fun sendMsg(isPlaying: Boolean) {
eventSink!!.success(isPlaying)
eventSink?.success(isPlaying)
}
fun sendRequestData() {
eventSink!!.success("requestData")
eventSink?.success("requestData")
}
fun sendLoginSuccess() {
eventSink!!.success("loginSuccess")
eventSink?.success("loginSuccess")
}
}
\ No newline at end of file
......@@ -58,15 +58,11 @@ class HomeConsultBean: HomeItemBaseBean {
*/
//字段名称改了
@SerializedName("uid")
var doctorUid: Int = 0
var doctorId: String = ""
@SerializedName("name")
var doctorName: String? = null
@SerializedName("head")
var doctorHead: String? = null
var profesBack: String? = null
@SerializedName("minBookingPrice")
var serviceFee: Int = 0
var zixunOrderNum: Int = 0
var feedbackRate: Float = 0f
......@@ -74,7 +70,6 @@ class HomeConsultBean: HomeItemBaseBean {
var city: String? = null
var isOnline: Int = 0
var mUrl: String? = null
@SerializedName("linkUrl")
var hUrl: String? = null
var share: ShareBean? = null
var isHiddenXcx: String? = null
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-im-api"
//开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
package com.yidianling.uikit.business.session.activity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
......@@ -115,6 +116,7 @@ public abstract class YDLBaseMessageActivity extends UI {
//==================== ChatUI Override ====================
@SuppressLint("CheckResult")
public void setToolBar(int toolBarId) {
tb = (TitleBarBottom) findViewById(toolBarId);
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
......@@ -144,6 +146,8 @@ public abstract class YDLBaseMessageActivity extends UI {
Disposable dis = ServiceImpl.Companion.getInstance().getDoctorChatStatus(Long.parseLong(ActionHandlerStorage.getL(sessionId).getInfo().toUid))
.subscribe(chatStatusBean -> {
if (ActionHandlerStorage.getL(sessionId) != null) {
int status = chatStatusBean.data.getStatus();
ActionHandlerStorage.getL(sessionId).setDoctorStatus(status);
ActionHandlerStorage.getL(sessionId).setDoctorBusyNum(chatStatusBean.data.getBusyTotal());
......@@ -168,6 +172,7 @@ public abstract class YDLBaseMessageActivity extends UI {
}
initSystemMessage(chatStatusBean.data.getPromptRule(), status);
}
}, throwable -> {
});
......@@ -178,6 +183,7 @@ public abstract class YDLBaseMessageActivity extends UI {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if (ActionHandlerStorage.getL(sessionId) != null) {
if (res.data == 1) {
//在线
tb.setMinTitleText("在线");
......@@ -189,6 +195,7 @@ public abstract class YDLBaseMessageActivity extends UI {
tb.setMinTitleColor(getResources().getColor(R.color.platform_color_666666));
tb.setMinTitleDrawable(getResources().getDrawable(R.drawable.im_background_chat_top_status_off_line));
}
}
}, throwable -> {
});
} else {
......@@ -221,6 +228,7 @@ public abstract class YDLBaseMessageActivity extends UI {
/**
* 发送推荐专家列表
*/
@SuppressLint("CheckResult")
public void sendRecommendExpertListMessage(int type, boolean showExpertList) {
// 调取接口获取推荐专家列表
......@@ -232,7 +240,9 @@ public abstract class YDLBaseMessageActivity extends UI {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
//发送推荐专家列表消息
if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).sendRecommendExpertListMessage(sessionId, res.data, type, showExpertList);
}
}, throwable -> {
ToastUtil.toastShort(throwable.toString());
});
......
......@@ -214,6 +214,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
* 初始化顶部专家信息栏
*/
private void initTopCustomBar() {
if (ActionHandlerStorage.getL(sessionId) != null) {
// 头像
String headUrl = ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoSmallImage;
if (!TextUtils.isEmpty(headUrl)) {
......@@ -242,6 +243,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
}
}
}
private void showTips() {
mHandler.sendEmptyMessageDelayed(1, 1000);
......@@ -347,23 +349,29 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public void onClick(View v) {
LogHelper.Companion.getInstance().writeLogSync("聊天界面点击常见问题");
if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).startHelp(getActivity());
}
}
});
rootView.findViewById(R.id.action_feedback).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LogHelper.Companion.getInstance().writeLogSync("聊天界面点击投诉与反馈");
if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).startFeedback(getActivity());
}
}
});
;
rootView.findViewById(R.id.action_call).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LogHelper.Companion.getInstance().writeLogSync("聊天界面点击免费热线");
if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).popCallDialog(getActivity());
}
}
});
}
......
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