Commit c2159b02 by 范玉宾

fix 18713

parent 56fee5a1
...@@ -12,6 +12,8 @@ import android.widget.TextView; ...@@ -12,6 +12,8 @@ import android.widget.TextView;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.launcher.ARouter;
import com.google.gson.Gson;
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,12 +22,17 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; ...@@ -20,12 +22,17 @@ 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.TellData;
import com.ydl.ydlcommon.base.config.HttpConfig; import com.ydl.ydlcommon.base.config.HttpConfig;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.router.IYDLRouterConstant; import com.ydl.ydlcommon.router.IYDLRouterConstant;
import com.ydl.ydlcommon.utils.ActivityManager;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.Utils; import com.ydl.ydlcommon.utils.Utils;
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.im.api.service.IImService;
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;
...@@ -117,9 +124,38 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -117,9 +124,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 +181,12 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -145,29 +181,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);
}
} }
}); });
} }
...@@ -218,5 +237,8 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -218,5 +237,8 @@ public class ConfideOrderInfoView extends RelativeLayout {
} }
private void toConfide(){
}
} }
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