Commit 31c2d5fa by 霍志良

feat:音频权限拒绝关联订单

parent dd507b37
......@@ -54,6 +54,7 @@ import com.yidianling.im.session.extension.CustomAttachTipMsg;
import com.yidianling.im.session.extension.CustomAttachment;
import com.yidianling.im.session.extension.CustomAttachmentBusinessCard;
import com.yidianling.im.session.extension.CustomAttachmentEvaluate;
import com.yidianling.im.session.extension.CustomAttachmentJumpToDaoYi;
import com.yidianling.im.session.extension.CustomAttachmentOrderStatus;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallRedPacket;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice;
......@@ -79,6 +80,7 @@ import com.yidianling.im.session.viewholder.MsgViewHolderCustomTip;
import com.yidianling.im.session.viewholder.MsgViewHolderCustomerServiceCard;
import com.yidianling.im.session.viewholder.MsgViewHolderDefCustom;
import com.yidianling.im.session.viewholder.MsgViewHolderEvaluate;
import com.yidianling.im.session.viewholder.MsgViewHolderJumpToDaoYi;
import com.yidianling.im.session.viewholder.MsgViewHolderModifyTime;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderPerfectConsultData;
......@@ -451,6 +453,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachConsultCallStatus.class, MsgViewHolderConsultCallStatus.class);//咨询声网的拨打状态
NimUIKit.registerMsgItemViewHolder(CustomAttachAssistantReceivedMoney.class, MsgViewHolderAssistantReceivedMoney.class);
NimUIKit.registerMsgItemViewHolder(CustomAttachmentBusinessCard.class, MsgViewHolderBusinessCard.class);//专家自定义名片 ,TYPE=34
NimUIKit.registerMsgItemViewHolder(CustomAttachmentJumpToDaoYi.class, MsgViewHolderJumpToDaoYi.class);//跳转导医聊天窗口触发导医分配逻辑,TYPE=35
}
private static void setSessionListener() {
......
......@@ -122,6 +122,10 @@ public class CustomAttachParser implements MsgAttachmentParser {
//专家自定义名片
attachment = new CustomAttachmentBusinessCard();
break;
case CustomAttachmentType.TYPE_JUMPTO_DAOYI:
//跳转导医聊天界面
attachment = new CustomAttachmentJumpToDaoYi();
break;
default:
attachment = new DefaultCustomAttachment();
break;
......
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/12/14
*/
public class CustomAttachmentJumpToDaoYi extends CustomAttachment{
private String DESC = "desc";
public String desc; //显示内容
CustomAttachmentJumpToDaoYi() {
super(CustomAttachmentType.TYPE_JUMPTO_DAOYI);
}
@Override
protected void parseData(JSONObject data) {
desc = data.getString(DESC);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(DESC, desc);
return data;
}
}
......@@ -36,4 +36,5 @@ public interface CustomAttachmentType {
int TYPE_CUSTOMER_CONSULT_CALL_STATUS = 32; //咨询的声网拨打状态的自定义消息
int ASSISTANT_RECEIVEDMONEY = 33;//发起收款
int TYPE_EXPERT_DETAIL_CARD=34;//专家名片
int TYPE_JUMPTO_DAOYI=35;//跳转导医聊天界面
}
package com.yidianling.im.session.viewholder;
import android.app.Activity;
import android.view.View;
import android.widget.TextView;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.yidianling.consultant.api.IConsultantService;
import com.yidianling.im.R;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase;
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/12/14
*/
public class MsgViewHolderJumpToDaoYi extends MsgViewHolderBase implements View.OnClickListener {
private TextView jumpToDaoYi;
public MsgViewHolderJumpToDaoYi(BaseMultiItemFetchLoadAdapter adapter) {
super(adapter);
}
@Override
protected int getContentResId() {
return R.layout.im_ui_message_custom_jump_to_daoyi;
}
@Override
protected void inflateContentView() {
jumpToDaoYi=findViewById(R.id.jumpToDaoYi);
jumpToDaoYi.setOnClickListener(this);
}
@Override
protected void bindContentView() {
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.jumpToDaoYi) {
/*--跳转导医逻辑
---PHP开发黄启群---沟通过后location和传0
不会走测评相关的逻辑*/
ModularServiceManager.INSTANCE.provide(IConsultantService.class).jumpConsultAssistant((Activity) context,0);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#159cef"
android:endColor="#22bfff"
android:angle="90"
/>
<corners android:radius="@dimen/platform_dp_18" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="您可以点击以下按钮,将会有专业的咨询顾问为您推荐适合您的专家哦~"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_6"
android:background="@drawable/im_custom_159cef_22bfff"
android:paddingLeft="@dimen/platform_dp_30"
android:paddingTop="@dimen/platform_dp_8"
android:paddingRight="@dimen/platform_dp_30"
android:paddingBottom="@dimen/platform_dp_8"
android:text="前往"
android:textColor="@color/white"
android:textSize="@dimen/im_text_size_15"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/desc"
android:id="@+id/jumpToDaoYi"
/>
</android.support.constraint.ConstraintLayout>
\ 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