Commit 7f1628e3 by 刘鹏

Merge branch 'fix/lancet/4398' into 'release'

Fix/lancet/4398

See merge request app_android_lib/YDL-Component!183
parents 3d4ade5a b6429ada
...@@ -3,7 +3,6 @@ package com.yidianling.uikit.custom.widget; ...@@ -3,7 +3,6 @@ package com.yidianling.uikit.custom.widget;
import android.content.Context; import android.content.Context;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -12,6 +11,7 @@ import android.widget.TextView; ...@@ -12,6 +11,7 @@ import android.widget.TextView;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.launcher.ARouter;
import com.netease.nimlib.sdk.NIMClient; import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallback; import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.msg.MessageBuilder; import com.netease.nimlib.sdk.msg.MessageBuilder;
...@@ -20,28 +20,22 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; ...@@ -20,28 +20,22 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage; import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.confide.api.ConfideRoute; import com.ydl.confide.api.ConfideRoute;
import com.ydl.confide.api.IConfideService; import com.ydl.confide.api.IConfideService;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.base.config.HttpConfig; import com.ydl.ydlcommon.base.config.HttpConfig;
import com.ydl.ydlcommon.router.IYDLRouterConstant; import com.ydl.ydlcommon.router.YdlCommonRouterManager;
import com.ydl.ydlcommon.utils.ActivityManager;
import com.ydl.ydlcommon.utils.StringUtils;
import com.ydl.ydlcommon.utils.Utils; import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.YDLCacheUtils;
import com.yidianling.common.tools.RxImageTool; import com.yidianling.common.tools.RxImageTool;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper; import com.yidianling.uikit.business.session.helper.MessageListPanelHelper;
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage; import com.yidianling.uikit.custom.bridge.ActionHandlerStorage;
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler; import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.router.YdlCommonRouterManager;
import com.ydl.ydlcommon.utils.StringUtils;
import com.ydl.ydlcommon.utils.YDLCacheUtils;
import java.util.HashMap;
import kotlin.Pair;
import static com.ydl.ydlcommon.modular.ModularServiceManagerKt.findRouteService; import static com.ydl.ydlcommon.modular.ModularServiceManagerKt.findRouteService;
import static com.ydl.ydlcommon.modular.ModularServiceManagerKt.route;
/** /**
* Created by haorui on 2019/5/22. * Created by haorui on 2019/5/22.
...@@ -117,9 +111,38 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -117,9 +111,38 @@ public class ConfideOrderInfoView extends RelativeLayout {
void setClick() { void setClick() {
iv_call.setOnClickListener(view -> { iv_call.setOnClickListener(view -> {
if (info.is_online == 1 || info.is_online == 4) {//通话中 // if (info.is_online == 1 || info.is_online == 4) {//通话中
//跳转专家倾述主页 // //跳转专家倾述主页
ActionHandlerStorage.getL(mSessionId).confide(); // ActionHandlerStorage.getL(mSessionId).confide();
// }
if (Utils.isFastClick()) {
return;
}
if (ActionHandlerStorage.getL(mSessionId) != null && ActionHandlerStorage.getL(mSessionId).getInfo() != null) {
IP2PCustomActionHandler.DocInfo docInfo = ActionHandlerStorage.getL(mSessionId).getInfo();
String remainTime = docInfo.listenOrderRemainTime;
if (TextUtils.isEmpty(remainTime)) {
if (docInfo != null) {
String confideId = docInfo.listenerId;
findRouteService(IConfideService.class)
.showExpertDetailDialog(
(FragmentActivity) mContext,
HttpConfig.Companion.getMH5_URL() + ConfideRoute.INSTANCE.h5ConfideIntro(confideId),
docInfo.doctorId,
docInfo.toUid);
}
} else {
try {
((IConfideService) ARouter.getInstance().build("/confide/ConfideService").navigation())
.connectionJava(
Integer.parseInt(docInfo.listenerId)
, 3, ActivityManager.Companion.getInstance().getTopTaskActivity(), null, "3");
} catch (Exception e) {
}
}
} }
}); });
tv_action.setOnClickListener(view -> { tv_action.setOnClickListener(view -> {
...@@ -145,29 +168,12 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -145,29 +168,12 @@ public class ConfideOrderInfoView extends RelativeLayout {
//点击整个view,跳转订单详情页面 //点击整个view,跳转订单详情页面
setOnClickListener(view -> { setOnClickListener(view -> {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
return; return;
} }
if (!TextUtils.isEmpty(info.listenOrderUrl)) {
String remainTime = ActionHandlerStorage.getL(mSessionId).getInfo().listenOrderRemainTime; H5Params h5Params = new H5Params(info.listenOrderUrl, "订单详情");
NewH5Activity.start(mContext, h5Params);
if (TextUtils.isEmpty(remainTime)) {
Pair<String, String> confideId = new Pair<>(IYDLRouterConstant.EXTRA_CONFIDEDID,
info.listenerId);
Pair<String, String> doctorId = new Pair<>(IYDLRouterConstant.EXTRA_DOCTORID,
info.doctorId);
route(getContext(), ConfideRoute.R_CONFIDE_HOME, confideId, doctorId);
} else {
if (info != null) {
String confideId = info.listenerId;
findRouteService(IConfideService.class)
.showExpertDetailDialog(
(FragmentActivity) mContext,
HttpConfig.Companion.getMH5_URL() + ConfideRoute.INSTANCE.h5ConfideIntro(confideId),
info.doctorId,
info.toUid);
}
} }
}); });
} }
...@@ -216,7 +222,6 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -216,7 +222,6 @@ public class ConfideOrderInfoView extends RelativeLayout {
}); });
MessageListPanelHelper.getInstance().notifyAddMessage(message); MessageListPanelHelper.getInstance().notifyAddMessage(message);
} }
} }
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