Commit 94c76795 by 刘鹏

前置信息页消息集成完毕,发送70、71类型消息未进行

Merge branch '4.2.60_lp_test' into 4.2.60

# Conflicts:
#	m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
#	m-im/src/main/res/values/colors.xml
parents 6233367b af53ee64
......@@ -88,8 +88,9 @@ dependencies {
implementation 'com.netease.nimlib:basesdk:7.2.0'
implementation 'com.netease.nimlib:avchat:7.2.0'
implementation 'com.netease.nimlib:nrtc:7.2.0'
api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
if (rootProject.ext.dev_mode){
//开发时使用
api project(':ydl-webview')
......
{
"questionPaper":{
"id":"601128023407726592",
"createTime":"2021-06-12T08:29:14.000+0000",
"updateTime":"2021-06-23T12:43:07.000+0000",
"isDeleted":0,
"category":"pre_diagnosis",
"name":"用户首次进入灵犀系统前置信息收集",
"cateId":53210621000798,
"cateName":"信息收集卡",
"questionNum":4,
"status":0,
"remark":"用户首次进入灵犀系统前置信息收集",
"questionChains":{
"601128318581870592":{
"id":"601128318581870592",
"createTime":null,
"updateTime":null,
"isDeleted":null,
"questionPaperId":"601128023407726592",
"questionId":"601128318581870592",
"head":true,
"options":{
"601128318544121856":"601128931717812224",
"601128318544121857":"601128931717812224",
"601128318544121858":"601129312090853376",
"601128318544121859":"601128931717812224"
}
},
"601128931717812224":{
"id":"601128931717812224",
"createTime":null,
"updateTime":null,
"isDeleted":null,
"questionPaperId":"601128023407726592",
"questionId":"601128931717812224",
"head":false,
"options":{
"601128931680063488":"601129312090853376",
"601128931680063489":"601129312090853376",
"601128931680063490":"601129312090853376",
"601128931680063491":"601129312090853376"
}
},
"601129312090853376":{
"id":"601129312090853376",
"createTime":null,
"updateTime":null,
"isDeleted":null,
"questionPaperId":"601128023407726592",
"questionId":"601129312090853376",
"head":false,
"options":{
"601129312040521728":"605178179136524288",
"601129312040521729":"605178179136524288",
"601129312040521730":"605178179136524288"
}
},
"605178179136524288":{
"id":"605178179136524288",
"createTime":null,
"updateTime":null,
"isDeleted":null,
"questionPaperId":"601128023407726592",
"questionId":"605178179136524288",
"head":false,
"options":null
}
},
"questions":{
"601128318581870592":{
"id":"601128318581870592",
"createTime":"2021-06-12T08:30:25.000+0000",
"updateTime":"2021-06-12T08:30:25.000+0000",
"isDeleted":0,
"questionPaperId":"601128023407726592",
"category":"pre_diagnosis",
"order":"1.0",
"name":"服药历",
"type":"radio",
"remarks":[
"请问你有服药史么?"
],
"options":[
{
"id":"601128318544121856",
"name":"1~3 个月",
"relates":[
{
"id":null,
"category":"症状",
"name":"幻觉",
"score":null
}
]
},
{
"id":"601128318544121857",
"name":"4~6 个月",
"relates":[
{
"id":null,
"category":"症状",
"name":"幻觉",
"score":null
}
]
},
{
"id":"601128318544121858",
"name":"7~9 个月",
"relates":[
{
"id":null,
"category":"症状",
"name":"幻觉",
"score":null
}
]
},
{
"id":"601128318544121859",
"name":"10~12 个月",
"relates":[
{
"id":null,
"category":"症状",
"name":"幻觉",
"score":null
}
]
}
]
},
"601128931717812224":{
"id":"601128931717812224",
"createTime":"2021-06-12T08:32:51.000+0000",
"updateTime":"2021-06-12T08:32:51.000+0000",
"isDeleted":0,
"questionPaperId":"601128023407726592",
"category":"pre_diagnosis",
"order":"2.0",
"name":"晚上睡觉会醒几次",
"type":"radio",
"remarks":[
"晚上睡觉会醒几次?"
],
"options":[
{
"id":"601128931680063488",
"name":"1~3 次",
"relates":[
{
"id":null,
"category":"症状",
"name":"思绪混乱",
"score":null
}
]
},
{
"id":"601128931680063489",
"name":"4~6 次",
"relates":[
{
"id":null,
"category":"症状",
"name":"思绪混乱",
"score":null
}
]
},
{
"id":"601128931680063490",
"name":"7~9 次",
"relates":[
{
"id":null,
"category":"症状",
"name":"思绪混乱",
"score":null
}
]
},
{
"id":"601128931680063491",
"name":"10~12 次",
"relates":[
{
"id":null,
"category":"症状",
"name":"思绪混乱",
"score":null
}
]
}
]
},
"601129312090853376":{
"id":"601129312090853376",
"createTime":"2021-06-12T08:34:22.000+0000",
"updateTime":"2021-06-12T08:34:22.000+0000",
"isDeleted":0,
"questionPaperId":"601128023407726592",
"category":"pre_diagnosis",
"order":"3.0",
"name":"有逃离的想法么?",
"type":"check",
"remarks":[
"有逃离的想法么?"
],
"options":[
{
"id":"601129312040521728",
"name":"有",
"relates":[
{
"id":null,
"category":"症状",
"name":"妄想症",
"score":null
}
]
},
{
"id":"601129312040521729",
"name":"无",
"relates":[
{
"id":null,
"category":"症状",
"name":"妄想症",
"score":null
}
]
},
{
"id":"601129312040521730",
"name":"其他",
"relates":null
}
]
},
"605178179136524288":{
"id":"605178179136524288",
"createTime":"2021-06-23T12:43:07.000+0000",
"updateTime":"2021-06-23T12:43:07.000+0000",
"isDeleted":0,
"questionPaperId":"601128023407726592",
"category":"pre_diagnosis",
"order":"1.624452187016E12",
"name":"问题1",
"type":"radio",
"remarks":null,
"options":[
{
"id":"605178178335412224",
"name":"选项1",
"relates":[
{
"id":53210524000648,
"category":"类目",
"name":"1类目2",
"score":null
}
]
},
{
"id":"605178178335412225",
"name":"选项2",
"relates":[
{
"id":53210528000703,
"category":"MOT节点标签",
"name":"匹配推荐",
"score":null
}
]
}
]
}
}
},
"questions":[
{
"question":"这是问题1",
"example":"这是描述1"
},
{
"question":"这是问题2",
"example":"这是描述2"
},
{
"question":"这是问题3",
"example":"这是描述3"
}
]
}
\ No newline at end of file
......@@ -2,10 +2,10 @@ package com.yidianling.im.helper
import android.annotation.SuppressLint
import android.content.Context
import androidx.core.content.ContextCompat
import androidx.appcompat.app.AppCompatActivity
import android.text.TextUtils
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.data.http.BaseAPIResponse
......@@ -35,6 +35,7 @@ import com.yidianling.im.http.ImRetrofitApi.Companion.getImRetrofitApi
import com.yidianling.im.router.ImIn
import com.yidianling.im.router.ImIn.isLogin
import com.yidianling.im.session.SessionHelper
import com.yidianling.im.ui.activity.CmsExamQuestionPaperActivity
import com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import com.yidianling.uikit.business.session.fragment.YDLMessageFragment
import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper
......@@ -55,10 +56,11 @@ import java.net.URLEncoder
*/
object IMChatUtil {
private var loadingDialog: LoadingDialogFragment? = null
private const val USER_TYPE_EXPERT=2//专家
private const val USER_TYPE_ASSISTANT=3//助理
private const val USER_TYPE_USER=1//用户
lateinit var doctorId:String
private const val USER_TYPE_EXPERT = 2//专家
private const val USER_TYPE_ASSISTANT = 3//助理
private const val USER_TYPE_USER = 1//用户
lateinit var doctorId: String
/**
* 接口数据请求完成回调
*/
......@@ -85,14 +87,74 @@ object IMChatUtil {
* @param context
* @param chatItemBean
*/
@SuppressLint("CheckResult")
fun startChat(context: AppCompatActivity?, chatItemBean: ChatItemBean) {
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
if (context == null || (!isLogin(context, true))) {
return
}
if (loadingDialog == null) {
loadingDialog = newInstance(null)
}
if (context.supportFragmentManager != null && !context.isDestroyed) {
loadingDialog?.show(context.supportFragmentManager, null)
}
getImJavaApi().getUserType(chatItemBean.toUid.toString())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ res: BaseResponse<UserTypeBean> ->
if (res.code == 200 && res.data != null) {
if (res.data!!.collectEvent &&TextUtils.equals(res.data!!.userType, USER_TYPE_ASSISTANT.toString()) && res.data!!.collectEvent) {
//和助理私聊需要打开信息采集弹窗
prepareAssistantChatData(
context,
chatItemBean.toUid.toString(),
object : ChatDataRequestListener {
override fun onSuccess(expertInfo: IMExpertBuild) { //新前置信息收集入口
CmsExamQuestionPaperActivity.start(
context, chatItemBean.toUid.toString(), expertInfo,
0
)
}
})
} else {
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
}
} else {
if (loadingDialog != null && loadingDialog!!.isVisible) {
loadingDialog?.dismissAllowingStateLoss()
}
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
}
}, { throwable: Throwable? ->
if (loadingDialog != null && loadingDialog!!.isVisible) {
loadingDialog?.dismissAllowingStateLoss()
}
SessionHelper.startP2PSession(
context,
chatItemBean.utype,
chatItemBean.toUid.toString(),
null,
P2PCustomActionHandlerImpl(chatItemBean)
)
})
}
/**
......@@ -147,12 +209,24 @@ object IMChatUtil {
}) { t: Throwable? ->
handleError(context, t!!)
}
} else if (TextUtils.equals(res.data!!.userType, USER_TYPE_ASSISTANT.toString()) && res.data!!.collectEvent) {//助理
prepareAssistantChatData(context, toUid, object : ChatDataRequestListener {
override fun onSuccess(expertInfo: IMExpertBuild) { //新前置信息收集入口
CmsExamQuestionPaperActivity.start(
context,
toUid,
expertInfo,
isFromQingShu
)
}
})
} else {
prepareAssistantChatData(context, toUid, object : ChatDataRequestListener {
override fun onSuccess(expertInfo: IMExpertBuild) {
startChatSession(toUid, expertInfo, isFromQingShu, context)
}
})
}
} else {
if (loadingDialog != null && loadingDialog!!.isVisible) {
......@@ -165,8 +239,7 @@ object IMChatUtil {
loadingDialog?.dismissAllowingStateLoss()
}
handleError(context, throwable!!)
}
)
})
}
......@@ -197,7 +270,8 @@ object IMChatUtil {
isFromQingShu: Int,
context: AppCompatActivity
) {
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession(
......@@ -209,6 +283,18 @@ object IMChatUtil {
)
}
/**
* 信息收集前置页调用方法
* */
open fun startChatSessionByCms(
toUid: String,
expertInfo: IMExpertBuild,
isFromQingShu: Int,
context: AppCompatActivity
) {
startChatSession(toUid, expertInfo, isFromQingShu, context)
}
//====================准备私聊数据====================
/**
* 初始化聊天数据
......@@ -489,7 +575,7 @@ object IMChatUtil {
val showExpertList = !(promptRule == 1 || promptRule == 3)
if (actionHandler.userType == USER_TYPE_EXPERT && status == 2) { //当该专家离线时
sendRecommendExpertListMessage(1, showExpertList, toUid, actionHandler)
} else if (actionHandler.userType == USER_TYPE_EXPERT&& status >= 3) { //当该专家忙碌时
} else if (actionHandler.userType == USER_TYPE_EXPERT && status >= 3) { //当该专家忙碌时
sendRecommendExpertListMessage(2, showExpertList, toUid, actionHandler)
}
}
......
package com.yidianling.listener;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
/**
* Created by Ykai on 2020/9/11.
*
* 键盘打开关闭监听类
*/
public class SoftKeyBoardListener {
private View rootView; //activity的根视图
int rootViewVisibleHeight; //纪录根视图的显示高度
private OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener;
public SoftKeyBoardListener(Activity activity) {
//获取activity的根视图
rootView = activity.getWindow().getDecorView();
//监听视图树中全局布局发生改变或者视图树中的某个视图的可视状态发生改变
rootView.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
//获取当前根视图在屏幕上显示的大小
Rect r = new Rect();
rootView.getWindowVisibleDisplayFrame(r);
int visibleHeight = r.height();
System.out.println("" + visibleHeight);
if (rootViewVisibleHeight == 0) {
rootViewVisibleHeight = visibleHeight;
return;
}
//根视图显示高度没有变化,可以看作软键盘显示/隐藏状态没有改变
if (rootViewVisibleHeight == visibleHeight) {
return;
}
//根视图显示高度变小超过200,可以看作软键盘显示了
if (rootViewVisibleHeight - visibleHeight > 200) {
if (onSoftKeyBoardChangeListener != null) {
onSoftKeyBoardChangeListener.keyBoardShow(rootViewVisibleHeight - visibleHeight);
}
rootViewVisibleHeight = visibleHeight;
return;
}
//根视图显示高度变大超过200,可以看作软键盘隐藏了
if (visibleHeight - rootViewVisibleHeight > 200) {
if (onSoftKeyBoardChangeListener != null) {
onSoftKeyBoardChangeListener.keyBoardHide(visibleHeight - rootViewVisibleHeight);
}
rootViewVisibleHeight = visibleHeight;
}
});
}
private void setOnSoftKeyBoardChangeListener(OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) {
this.onSoftKeyBoardChangeListener = onSoftKeyBoardChangeListener;
}
public interface OnSoftKeyBoardChangeListener {
void keyBoardShow(int height);
void keyBoardHide(int height);
}
public static void setListener(Activity activity, OnSoftKeyBoardChangeListener onSoftKeyBoardChangeListener) {
SoftKeyBoardListener softKeyBoardListener = new SoftKeyBoardListener(activity);
softKeyBoardListener.setOnSoftKeyBoardChangeListener(onSoftKeyBoardChangeListener);
}
}
......@@ -88,7 +88,6 @@ import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper;
import com.yidianling.uikit.business.session.module.input.InputPanel;
import com.yidianling.uikit.business.session.module.list.MessageListPanelEx;
import com.yidianling.uikit.business.session.view.ChatPrivateTips;
import com.yidianling.uikit.business.session.view.CollectInfoPopupWindow;
import com.yidianling.uikit.business.session.view.CommonQuestionView;
import com.yidianling.uikit.business.session.view.ImCommentBannerView;
import com.yidianling.uikit.business.session.view.ImRedStarGradeView;
......@@ -97,7 +96,6 @@ 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;
import com.yidianling.uikit.custom.widget.ExpertInfoDialog;
......@@ -169,7 +167,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private int timeCount = 0;
protected AitManager aitManager;
private CollectInfoPopupWindow collectInfoPopupWindow;
private CircleImageView small_head_img; //小头像
private TextView help_num_tv; //帮助人数
......@@ -315,7 +312,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private void initView() {
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3) {
/* rl_common_question_enter.setOnClickListener(v -> {
//助理
/*rl_common_question_enter.setOnClickListener(v -> {
rl_common_question_enter.setOnClickListener(v -> {
if (commonQuestionBeanList != null && commonQuestionBeanList.size() > 0) {
openOrCloseCommonQuestionLayout(true);
} else {
......@@ -329,54 +328,18 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
try {
YdlBuryPointUtil.sendPv("common_question_pager");
} catch (Exception e) {
e.printStackTrace();
}
getCommonQuestionListData();
}
ChatStatusCacheHelper.clearDataByKey("chatEvent");
}
if (ChatStatusCacheHelper.getStatusCache("collectEvent")) {
String time = Calendar.getInstance().get(Calendar.YEAR) + "-" + Calendar.getInstance().get(Calendar.MONTH) + Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
if (!TextUtils.equals(time, SharedPreferencesEditor.getString("skip_time_" + ImIn.INSTANCE.getUserInfo().getUid()))) {
collectInfoPopupWindow = new CollectInfoPopupWindow(getActivity(), new CollectInfoPopupWindow.OnSendMsgListener() {
@Override
public void sendMsg(@NotNull String content, @NotNull List<UserQuestInfoBean> result) {
if (TextUtils.isEmpty(content)) {//点击跳过后当天不再显示此弹窗
SharedPreferencesEditor.putString("skip_time_" + ImIn.INSTANCE.getUserInfo().getUid()
, time);
} else {
IMMessage textMessage = MessageBuilder.createTextMessage(sessionId, sessionType, content);
if (sendMessage(textMessage)) {
openOrCloseCommonQuestionLayout(false);
}
submitUserCollect(result);
}
}
@Override
public void finishPage() {
getActivity().finish();
}
});
getUserInfoCollect();
if (!getActivity().isFinishing()) {
try {
YdlBuryPointUtil.sendPv("user_collect_pager");
} catch (Exception e) {
}
collectInfoPopupWindow.show(top_expert_info_cl);
}
}
ChatStatusCacheHelper.clearDataByKey("collectEvent");
}
}
//有未完成订单或者有未评价订单时,显示订单布局
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
if (ActionHandlerStorage.getL(sessionId).getInfo().hasAvailableListenOrder == 2 || ActionHandlerStorage.getL(sessionId).getInfo().listenOrderCommentStatus == 1) {
//2专家 1用户
ConfideOrderInfoView confideOrderInfoView = new ConfideOrderInfoView(getContext(), sessionId);
confideOrderInfoView.setData(ActionHandlerStorage.getL(sessionId).getInfo());
rl_contain.addView(confideOrderInfoView);
......@@ -1553,46 +1516,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
});
}
@SuppressLint("CheckResult")
private void getUserInfoCollect() {
ServiceImpl.Companion.getInstance().userCollectList()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(resp -> {
if (resp.data != null && resp.data.size() > 0) {
ServiceImpl.Companion.getInstance().getNewUserMes(new NewUserMesBean(""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasCollectedInResp -> {
if (hasCollectedInResp.data != null && hasCollectedInResp.data.size() > 0) {
collectInfoPopupWindow.setData(resp.data, hasCollectedInResp.data);
} else {
collectInfoPopupWindow.setData(resp.data, null);
}
}, throwable -> {
collectInfoPopupWindow.setData(resp.data, null);
});
} else {
collectInfoPopupWindow.dismiss();
}
}, throwable -> {
collectInfoPopupWindow.dismiss();
});
}
@SuppressLint("CheckResult")
private void submitUserCollect(List<UserQuestInfoBean> result) {
SubmitUserInfoBean submitUserInfoBean = new SubmitUserInfoBean();
submitUserInfoBean.userInfoList = result;
ServiceImpl.Companion.getInstance().submitUserCollect(JSON.toJSONString(submitUserInfoBean))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(resp -> {
}, throwable -> {
});
}
private void showCheckAgeDialog() {
CommonDialog.create(getActivity())
.setLeftOnclick("返回", v -> {
......
package com.yidianling.uikit.business.session.view
import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.ViewGroup
import android.widget.PopupWindow
import com.yidianling.common.tools.ToastUtil
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2019/12/10
*/
class CollectInfoPopupWindow(var mContext: Context, var listener: OnSendMsgListener) :
PopupWindow(mContext) {
private var collectUserInformationView: CollectUserInformationView
private var isFromBack = true
init {
height = ViewGroup.LayoutParams.MATCH_PARENT
width = ViewGroup.LayoutParams.MATCH_PARENT
setBackgroundDrawable(BitmapDrawable())
collectUserInformationView = CollectUserInformationView(mContext, {
listener.sendMsg("", ArrayList())
isFromBack = false
dismiss()
}, {
dismiss()
listener.finishPage()
}, { _content, _list ->
listener.sendMsg(_content, _list)
isFromBack = false
dismiss()
})
collectUserInformationView.isFocusableInTouchMode = true
collectUserInformationView.setOnKeyListener { v, keyCode, event ->
if (keyCode == KeyEvent.KEYCODE_BACK) {
showSkipDialog()
true
}
false
}
contentView = collectUserInformationView
isFocusable = true
isTouchable = true
isOutsideTouchable = false
}
fun setData(list: List<UserQuestInfoBean>, hasCompleteInfoList: List<UserQuestInfoBean>?) {
if (list.isEmpty()) {
ToastUtil.toastShort("数据异常,请稍后重试")
return
}
collectUserInformationView.setData(list, hasCompleteInfoList)
}
override fun dismiss() {
if (isFromBack) {
showSkipDialog()
isFromBack = false
} else {
super.dismiss()
}
}
private fun showSkipDialog() {
collectUserInformationView.showSkipDialog()
}
fun show(v: View) {
v.post { showAtLocation(v, Gravity.BOTTOM, 0, 0) }
}
interface OnSendMsgListener {
fun sendMsg(content: String, result: List<UserQuestInfoBean>)
fun finishPage()
}
}
\ No newline at end of file
package com.yidianling.uikit.business.session.view.question;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.yidianling.uikit.custom.http.response.question.QuestionsBean;
import com.yidianling.uikit.custom.http.response.question.QuestionsBeanExample;
/**
* @author liupeng
*/
public class QuestionMultiItem implements MultiItemEntity {
public int viewType;
public String type1Text;
public String type2Text;
/***type 3 单选 type 4 多选 */
public QuestionsBean questionsBean;
public boolean type4CanClick;
/**
* type5
*/
public QuestionsBeanExample type5Bean;
/***type5 展开or 收起*/
public boolean type5Open = true;
@Override
public int getItemType() {
return viewType;
}
}
package com.yidianling.uikit.business.session.view.question;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yidianling.im.R;
import com.yidianling.uikit.custom.http.response.question.OptionsBean;
import java.util.List;
public class QuestionOneCheckAdapter extends BaseQuickAdapter<OptionsBean, BaseViewHolder> {
public QuestionOneCheckAdapter(@Nullable List<OptionsBean> data) {
super(R.layout.left_one_check_layout_item,data);
}
@Override
protected void convert(BaseViewHolder helper, OptionsBean item) {
TextView tv_which_question= helper.getView(R.id.tv_which_question);
tv_which_question.setText(item.name);
if (item.check){
tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_1da1f2));
tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.white));
}else {
tv_which_question.setBackground(ContextCompat.getDrawable(mContext, R.drawable.im_background_18dp_e8f5fe));
tv_which_question.setTextColor(ContextCompat.getColor(mContext, R.color.platform_color_1DA1F2));
}
}
}
package com.yidianling.uikit.business.session.view.question
import com.yidianling.uikit.custom.http.response.question.OptionsBean
import com.yidianling.uikit.custom.http.response.question.QuestionsBean
interface QuestionOneCheckListener {
/**
* 单选点击 多选确定按钮点击获取item信息
*/
fun itemClick(bean: List<OptionsBean>, question: QuestionsBean)
/**
* 展示其他
*/
fun showOtherEdit(list: List<OptionsBean>, question: QuestionsBean)
/**
* 隐藏其他
*/
fun hideOtherEdit()
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.yidianling.uikit.custom.http.response.*
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*
......@@ -67,7 +68,10 @@ interface ServiceApi {
//关注
@GET("consult/expert-page/toggle-follow")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun focus(@Query("doctorId") doctorId: String, @Query("status") status: String): Observable<BaseAPIResponse<Any>>
fun focus(
@Query("doctorId") doctorId: String,
@Query("status") status: String
): Observable<BaseAPIResponse<Any>>
//服务列表
@GET("consult/expert-page/nproducts")
......@@ -83,7 +87,32 @@ interface ServiceApi {
//获取代运营关联的专家的信息
@GET("chat/get-source-doctor")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
//注意:这个接口返回的还有很多字段,但是暂时不需要,就先取这两个字段
fun getSourceDoctor(
@Query("scene") scene: Int,
@Query("userUid") userUid: String,
@Query("assistantUid") assistantUid: String
): Observable<BaseAPIResponse<SourceDoctorInfoBean>>
//新版前置信息收集 客户端灵犀信息收集卡题库
@GET("cms/exam/api/v1/exams/lingxi/pre-exam-question-paper")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
//注意:这个接口返回的还有很多字段,但是暂时不需要,就先取这两个字段
fun getSourceDoctor(@Query("scene") scene: Int,@Query("userUid") userUid: String,@Query("assistantUid") assistantUid: String): Observable<BaseAPIResponse<SourceDoctorInfoBean>>
fun preExamQuestionPaper(): Observable<BaseAPIResponse<QuestionsInfoBean>>
//创建答题信息
@POST("cms/exam/api/v1/exams")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun createEexams(@Body body: RequestBody): Observable<BaseAPIResponse<String>>
//答题
@POST("cms/exam/api/v1/exams/{id}/lingxi/answer-question")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun answerQuestion(
@Path("id") id: String,
@Body body: RequestBody
): Observable<BaseAPIResponse<String>>
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.uikit.custom.http.response.*
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import io.reactivex.Observable
import okhttp3.MediaType
import okhttp3.RequestBody
......@@ -65,6 +66,13 @@ class ServiceImpl private constructor() {
}
/**
* 信息采集的问题新版
*/
fun preExamQuestionPaper(): Observable<BaseAPIResponse<QuestionsInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).preExamQuestionPaper()
}
/**
* 获取新用户收集的信息
*/
fun getNewUserMes(bean: NewUserMesBean): Observable<BaseAPIResponse<List<UserQuestInfoBean>>> {
......@@ -117,10 +125,36 @@ class ServiceImpl private constructor() {
/**
* 获取代运营关联的专家的信息
* 客户端灵犀信息收集卡题库
*/
fun getSourceDoctor(userUid: String, assistantUid: String): Observable<BaseAPIResponse<SourceDoctorInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getSourceDoctor(1, userUid, assistantUid)
fun getSourceDoctor(
userUid: String,
assistantUid: String
): Observable<BaseAPIResponse<SourceDoctorInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java)
.getSourceDoctor(1, userUid, assistantUid)
}
/**
* 创建答题信息
*/
fun createEexams(params: String): Observable<BaseAPIResponse<String>> {
val body = RequestBody.create(
MediaType.parse("application/json; charset=utf-8"),
params
) as RequestBody
return YDLHttpUtils.obtainApi(ServiceApi::class.java).createEexams(body)
}
/**
* 回答问题
*/
fun answerQuestion(id: String, params: String): Observable<BaseAPIResponse<String>> {
val body = RequestBody.create(
MediaType.parse("application/json; charset=utf-8"),
params
) as RequestBody
return YDLHttpUtils.obtainApi(ServiceApi::class.java).answerQuestion(id, body)
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
/**
* 回答问题bean
*
* @author liupeng
*/
public class AnswerQuestionRequestBean {
/**
* questionPaperId : 601128023407726592
* type : adviser_pre_diagnosis
* name : 灵犀用户首次问诊信息收集卡
* dataId : 13131313
* uid : 1313
*/
public String examId;
public String questionPaperId;
public String uid;
public String questionId;
public List<AnswersBean> answers;
}
package com.yidianling.uikit.custom.http.response.question;
/**
* @author liupeng
* <p>
* 测试前置-回答消息(区分其他类型与主诉类型)
* 用户APP -》灵犀
* type 70
* <p>
* 地址 https://note.youdao.com/ynoteshare1/index.html?id=ac018cb5b65b7d5fc5e961410b14621a&type=note
*/
public class AnswerQuestionType70RequestBean {
public String type = "70";
public AnswerQuestionRequestBean data;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
/**
* @author liupeng
*/
public class AnswersBean {
public String optionId;
public String name;
public String other;
public List<RelatesBean> relates;
}
package com.yidianling.uikit.custom.http.response.question;
public class CreateExamsRequestBean {
/**
* questionPaperId : 601128023407726592
* type : adviser_pre_diagnosis
* name : 灵犀用户首次问诊信息收集卡
* dataId : 13131313
* uid : 1313
*/
public String questionPaperId;
public String type;
public String name;
public String uid;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
public class OptionsBean {
/**
* id : 601128318544121856
* name : 1~3 个月
* relates : [{"category":"症状","name":"幻觉"}]
*/
public String id;
public String name;
public List<RelatesBean> relates;
public boolean check;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.Map;
public class QuestionChainsBean {
/**
* id : 601145789934211072
* create_time : 2021-06-12 17:39:50
* update_time : 2021-06-12 17:41:31
* question_paper_id : 601128023407726592
* question_id : 601128318581870592
* head : true
* options : {"601128318544121856":"601128931717812224"}
*/
public String id;
public String createTime;
public String updateTime;
public String isDeleted;
public String questionPaperId;
public String questionId;
public boolean head;
public Map<String, String> options;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.Map;
public class QuestionPaperBean {
public String id;
public String createTime;
public String updateTime;
public int isDeleted;
public String category;
public String name;
public String cateId;
public String cateName;
public int questionNum;
public int status;
public String remark;
public Map<String, QuestionChainsBean> questionChains;
public Map<String, QuestionsBean> questions;
}
package com.yidianling.uikit.custom.http.response.question;
import java.io.Serializable;
import java.util.List;
public class QuestionsBean implements Serializable {
/**
* id : 601128318581870592
* create_time : 2021-06-12 16:30:25
* update_time : 2021-06-12 16:30:25
* is_deleted : 0
* question_paper_id : 601128023407726592
* category : pre_diagnosis
* order : 1
* name : 服药历
* type : radio
* remarks : ["请问你有服药史么?"]
* options : [{"id":"601128318544121856","name":"1~3 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121857","name":"4~6 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121858","name":"7~9 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121859","name":"10~12 个月","relates":[{"category":"症状","name":"幻觉"}]}]
*/
public String id;
public String createTime;
public String updateTime;
public int isDeleted;
public String questionPaperId;
public String category;
public String order;
public String name;
/***类型:
* radio(单选)
* /check(复选)
* /true_or_false(判断)
* /fill(填空)
* */
public String type;
public List<String> remarks;
public List<OptionsBean> options;
}
package com.yidianling.uikit.custom.http.response.question;
public class QuestionsBeanExample {
public String question;
public String example;
}
package com.yidianling.uikit.custom.http.response.question;
import java.util.List;
/**
* 题库信息
*
* @author liupeng
*/
public class QuestionsInfoBean {
/**
* id : 601128023407726592
* create_time : 2021-06-12 16:29:14
* update_time : 2021-06-12 16:34:22
* is_deleted : 0
* category : pre_diagnosis
* name : 灵犀用户首次进入问诊信息收集
* cate_id : 1313
* cate_name : 信息收集卡
* question_num : 3
* status : 0
* remark : 用户首次进入灵犀系统问诊信息收集
* question_chains : {"601128318581870592":{"id":"601145789934211072","create_time":"2021-06-12 17:39:50","update_time":"2021-06-12 17:41:31","question_paper_id":"601128023407726592","question_id":"601128318581870592","head":true,"options":{"601128318544121856":"601128931717812224"}}}
* questions : {"601128318581870592":{"id":"601128318581870592","create_time":"2021-06-12 16:30:25","update_time":"2021-06-12 16:30:25","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":1,"name":"服药历","type":"radio","remarks":["请问你有服药史么?"],"options":[{"id":"601128318544121856","name":"1~3 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121857","name":"4~6 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121858","name":"7~9 个月","relates":[{"category":"症状","name":"幻觉"}]},{"id":"601128318544121859","name":"10~12 个月","relates":[{"category":"症状","name":"幻觉"}]}]},"601128931717812224":{"id":"601128931717812224","create_time":"2021-06-12 16:32:51","update_time":"2021-06-12 16:32:51","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":2,"name":"晚上睡觉会醒几次","type":"radio","remarks":["晚上睡觉会醒几次?"],"options":[{"id":"601128931680063488","name":"1~3 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063489","name":"4~6 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063490","name":"7~9 次","relates":[{"category":"症状","name":"思绪混乱"}]},{"id":"601128931680063491","name":"10~12 次","relates":[{"category":"症状","name":"思绪混乱"}]}]},"601129312090853376":{"id":"601129312090853376","create_time":"2021-06-12 16:34:22","update_time":"2021-06-12 16:34:22","is_deleted":0,"question_paper_id":"601128023407726592","category":"pre_diagnosis","order":3,"name":"有逃离的想法么?","type":"radio","remarks":["有逃离的想法么?"],"options":[{"id":"601129312040521728","name":"有","relates":[{"category":"症状","name":"妄想症"}]},{"id":"601129312040521729","name":"无","relates":[{"category":"症状","name":"妄想症"}]},{"id":"601129312040521730","name":"其他"}]}}
*/
public QuestionPaperBean questionPaper;
public List<QuestionsBeanExample> questions;
}
package com.yidianling.uikit.custom.http.response.question;
/**
* @author liupeng
*/
public class RelatesBean {
/**
* category : 症状
* name : 幻觉
*/
public String id;
public String category;
public String name;
public String score;
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/platform_color_1DA1F2" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_f8f8f8" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/platform_color_1DA1F2" />
<corners
android:bottomLeftRadius="@dimen/platform_dp_8"
android:bottomRightRadius="@dimen/platform_dp_8"
android:topLeftRadius="@dimen/platform_dp_8"
android:topRightRadius="0dp" />
<padding
android:bottom="9dp"
android:left="22dp"
android:right="22dp"
android:top="9dp" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/multiple_choice_title"
android:layout_width="239dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?" />
<TextView
android:id="@+id/tv_notes"
android:layout_width="239dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/question_notes"
android:textColor="@color/color_grey_999999"
android:textSize="14sp" />
<View
android:id="@+id/type5_line"
android:layout_width="239dp"
android:layout_height="@dimen/platform_dp_05"
android:layout_marginTop="8dp"
android:background="@color/im_color_EBEBEB"
android:visibility="gone" />
<TextView
android:id="@+id/example"
android:layout_width="239dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_14"
android:visibility="gone"
tools:text="例:大学毕业后不知道该找什么工作,去年七月当过一次超市导购员,每天都要给顾客推荐这推荐那,感觉这不是我了,一想到上班后每天过着自己都排斥的日子我就越不敢继续找工作,就好像工作剥夺了我什么东西是的。" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/more_title"
android:layout_width="263dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?"></TextView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_more_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintStart_toStartOf="@id/multiple_choice_title"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title"
tools:itemCount="6"
tools:listitem="@layout/left_one_check_layout_item"
tools:spanCount="2" />
<TextView
android:id="@+id/tv_more_define"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="@color/white"
android:layout_marginTop="8dp"
android:background="@drawable/im_background_18dp_ebebeb"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:text="确定"
android:textSize="@dimen/im_text_size_15">
</TextView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/multiple_choice_title"
android:layout_width="239dp"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_one_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxWidth="270dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_left_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:maxWidth="270dp"
android:padding="12dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingRight="12dp"
android:paddingBottom="12dp">
<androidx.cardview.widget.CardView
android:id="@+id/cv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:elevation="0dp"
app:cardCornerRadius="18dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/platform_head_place_hold_pic" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tv_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:background="@drawable/im_question_message_round_1da1f2_8dp_bg"
android:maxWidth="270dp"
android:textColor="@color/white"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/cv_header"
app:layout_constraintTop_toTopOf="parent"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_which_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_16"
android:layout_marginRight="@dimen/platform_dp_9"
android:background="@drawable/im_background_18dp_e8f5fe"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:text="婚姻家庭婚姻混"
android:textColor="@color/platform_color_1DA1F2">
</TextView>
\ No newline at end of file
......@@ -59,5 +59,8 @@
<color name="im_color_grey_d0d0d0">#d0d0d0</color>
<color name="color_9f9f9f">#9f9f9f</color>
<color name="color_666666">#666666</color>
<color name="color_242424">#242424</color>
<color name="color_bfbfbf">#bfbfbf</color>
<color name="color_f8f8f8">#f8f8f8</color>
<color name="color_c2e7ff">#c2e7ff</color>
</resources>
......@@ -245,5 +245,6 @@
<string name="im_chat_private_title">私聊须知</string>
<string name="im_chat_pivate_content">如系统检测到涉黄、涉爆、涉政等信息,可能会封号处理并追究法律责任!</string>
<string name="im_video_play">视频播放</string>
<string name="question_notes">注:描述中请包涵问题持续时间、问题发生原因、当前的问题。如何描述?</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="@color/white">
<ImageView
android:id="@+id/iv_close"
android:layout_width="26dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@+id/tv_title"
android:src="@drawable/im_ico_default_avatar" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center_vertical"
android:text="咨询前评估"
android:textColor="@color/im_color_242424"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_skip"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="跳过"
android:textColor="@color/im_color_grey_999999"
android:textSize="14sp" />
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingConstraints">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/color_f8f8f8"
android:paddingBottom="12dp"
app:layout_constraintBottom_toTopOf="@id/cl_input"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
tools:visibility="visible">
<TextView
android:id="@+id/tv_problem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_f8f8f8"
android:paddingStart="12dp"
android:paddingBottom="13dp"
android:textColor="@color/color_242424"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="已选:"
tools:visibility="visible" />
<EditText
android:id="@+id/et_input_problem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="top"
android:hint="请简单描述遇到的问题......"
android:maxHeight="200dp"
android:padding="12dp"
android:textColor="@color/color_242424"
android:textColorHint="@color/color_bfbfbf"
android:textSize="17sp"
app:layout_constraintTop_toBottomOf="@id/tv_problem" />
<HorizontalScrollView
android:id="@+id/hsv_problem_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="69dp"
android:layout_marginBottom="14dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_input_problem">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_cur_problem"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="当前问题"
android:textColor="@color/color_242424"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_duration"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginStart="12dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="持续时间"
android:textColor="@color/color_242424"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_problem_impact"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginStart="12dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="问题影响"
android:textColor="@color/color_242424"
android:textSize="14sp" />
</LinearLayout>
</HorizontalScrollView>
<LinearLayout
android:layout_width="86dp"
android:layout_height="36dp"
android:layout_marginBottom="8dp"
android:background="#80ffffff"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<TextView
android:id="@+id/tv_send"
android:layout_width="54dp"
android:layout_height="28dp"
android:background="@drawable/bg_shape_1da1f2_r4"
android:gravity="center"
android:text="发送"
android:textColor="@color/white"
android:textSize="15sp"
android:visibility="gone" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 开始-->
<TextView
android:id="@+id/tv_finish"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="14dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="14dp"
android:background="@drawable/im_background_collect_info_bottom_start"
android:gravity="center"
android:text="去沟通"
android:textColor="@color/white"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
tools:visibility="gone" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
\ 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