Commit cbe3b586 by 霍志良

Merge remote-tracking branch 'origin/最新Dev' into 倾诉优化专项

# Conflicts:
#	config.gradle
parents b513ec08 0b7fdfae
......@@ -5,12 +5,12 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.51",
"m-consultant" : "0.0.60.03",
"m-confide" : "0.0.49.38",
"m-consultant" : "0.0.60.04",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.94",
"m-home" : "0.0.22.84",
"m-im" : "0.0.20.99",
"m-home" : "0.0.22.92",
"m-im" : "0.0.21.15",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.10",
......@@ -36,10 +36,10 @@ ext {
"ydl-platform" : "0.0.40.79",
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-webview" : "0.0.38.58",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.69",
"m-audioim" : "0.0.49.29.59",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......@@ -92,8 +92,8 @@ ext {
"m-consultant" : "0.0.60.03",
"m-fm" : "0.0.30.07",
"m-user" : "0.0.61.94",
"m-home" : "0.0.22.83",
"m-im" : "0.0.20.99",
"m-home" : "0.0.22.92",
"m-im" : "0.0.21.15",
"m-dynamic" : "0.0.7.35",
"m-article" : "0.0.0.8",
......@@ -118,10 +118,10 @@ ext {
"ydl-platform" : "0.0.40.79",
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-webview" : "0.0.38.58",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.69",
"m-audioim" : "0.0.49.29.59",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......
......@@ -313,7 +313,7 @@ class AudioHomeActivity :
super.onConnectionStateChanged(state, reason)
// 3 网络连接被服务器中止 该情况现在是因为后端踢人逻辑
if (reason == 3) {
callEventSave("60", "通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason}")
callEventSave("50", "通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason}")
writeAgoraLog("通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason})")
AliYunRichLogsHelper.getInstance()
.sendRichLog(
......@@ -755,7 +755,7 @@ class AudioHomeActivity :
if (!isConnectSuccess) {
//关闭音乐
stopPlaying()
callEventSave("60", "未接通挂断:50s等待倒计时结束挂断")
callEventSave("80", "未接通挂断:50s等待倒计时结束挂断")
writeAgoraLog("未接通挂断:50s等待倒计时结束挂断")
AliYunRichLogsHelper.getInstance()
......@@ -1117,7 +1117,7 @@ class AudioHomeActivity :
}, {
LogUtil.d(it.message)
}, {
callEventSave("60", "倾诉时间已用完")
callEventSave("50", "倾诉时间已用完")
YDLavManager.instances.callEndStatusUpdate(channelId!!, 3, "倾诉时间已用完")
//注意:自动挂断时,如果对方离开频道的回调已经触发,就不要再重复调用接口
......
......@@ -52,11 +52,7 @@ class ConsultAssistantDialogUtils private constructor() {
fun fitRequest(activity: Activity, origin: String, fromActivity: Boolean = false) {
when (origin) {
"home_index" -> {
if (ConsultantIn.isLogin() &&
ConsultantIn.getUserImpl().getUserInfo()?.user_type == 1
) {
shouldShowDialog(activity, origin)
}
shouldShowDialog(activity, origin)
}
"doctor_list" -> {
if (!ConsultantIn.isLogin() || (ConsultantIn.getUserImpl()
......@@ -118,10 +114,12 @@ class ConsultAssistantDialogUtils private constructor() {
if (Utils.isFastClick()) {
return onClickAction()
}
//获取用户uid
ActionCountUtils.count("main_page|main_daoyi_entry_click")
YdlBuryPointUtil.sendClick("home_page_assistant_click")
getConsultAssistantUid("", activity, 1)
if (ConsultantIn.getUserImpl().loginByOneKeyLogin(activity,true)){
//获取用户uid
ActionCountUtils.count("main_page|main_daoyi_entry_click")
YdlBuryPointUtil.sendClick("home_page_assistant_click")
getConsultAssistantUid("", activity, 1)
}
}
})
......
......@@ -223,32 +223,32 @@
"doctorName": "",
"consultCategoryData": [
{
"id":"1",
"name":"恋爱情感"
"id": "1",
"name": "恋爱情感"
},
{
"id":"2",
"name":"婚姻家庭"
"id": "2",
"name": "婚姻家庭"
},
{
"id":"5",
"name":"亲子教育"
"id": "5",
"name": "亲子教育"
},
{
"id":"7",
"name":"职场发展"
"id": "7",
"name": "职场发展"
},
{
"id":"26",
"name":"个人成长"
"id": "26",
"name": "个人成长"
},
{
"id":"4",
"name":"情绪压力"
"id": "4",
"name": "情绪压力"
},
{
"id":"699",
"name":"心理健康"
"id": "699",
"name": "心理健康"
}
],
"activityResponse": {
......@@ -485,32 +485,36 @@
"doctorName": "",
"consultCategoryData": [
{
"id":"1",
"name":"恋爱情感"
"id": "23",
"name": "亲子教育"
},
{
"id":"2",
"name":"婚姻家庭"
"id": "27",
"name": "情绪压力"
},
{
"id":"5",
"name":"亲子教育"
"id": "1",
"name": "恋爱情感"
},
{
"id": "452",
"name": "婚姻家庭"
},
{
"id":"7",
"name":"职场发展"
"id": "26",
"name": "个人成长"
},
{
"id":"26",
"name":"个人成长"
"id": "25",
"name": "人际关系"
},
{
"id":"27",
"name":"情绪压力"
"id": "22",
"name": "职场发展"
},
{
"id":"699",
"name":"心理健康"
"id": "699",
"name": "心理健康"
}
],
"activityResponse": {
......
......@@ -156,6 +156,8 @@ interface ImRetrofitApi {
fun getConsultAssistantUidRequest(
@Query("location") location: Int,
@Query("ffrom_2") ffrom: String?,
@Query("naviType") naviType: String = "1"
@Query("naviType") naviType: String = "1",
@Query("examId") examId: String = "",
@Query("questionPaperId") questionPaperId: String = ""
): Observable<BaseAPIResponse<Long>>
}
\ No newline at end of file
package com.yidianling.im.ui.activity
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Handler
......@@ -86,8 +87,9 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
private var location: Int = 0
private var ffrom2: String? = null
/**单选类型*/
private const val RADIO_KEY="radio"
private const val RADIO_KEY = "radio"
@JvmStatic
fun start(context: Context, toUid: String, expertInfo: IMExpertBuild, isFromQingShu: Int) {
......@@ -96,6 +98,11 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
this.toUid = toUid
this.isFromQingShu = isFromQingShu
context.startActivity(starter)
val activity = context as Activity
activity.overridePendingTransition(
R.anim.platform_activity_anim_in,
R.anim.platform_activity_anim_in
)
}
@JvmStatic
......@@ -218,6 +225,10 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
showSkipDialog()
}
tv_finish.setOnClickListener {
if (Utils.isFastClick()) {
//防止连击
return@setOnClickListener
}
ActionCountUtils.count("daoyi_consult_assess_page|go_communication_click")
skipToIm()
}
......@@ -241,7 +252,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
//当前问题
tv_cur_problem.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
if (!TextUtils.isEmpty(problemContent)) {
problemContent = "$problemContent\n\n"
}
et_input_problem.setText("$problemContent${tv_cur_problem.text}:")
......@@ -251,7 +262,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
//持续时间
tv_duration.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
if (!TextUtils.isEmpty(problemContent)) {
problemContent = "$problemContent\n\n"
}
et_input_problem.setText("$problemContent${tv_duration.text}:")
......@@ -261,7 +272,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
//问题影响
tv_problem_impact.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
if (!TextUtils.isEmpty(problemContent)) {
problemContent = "$problemContent\n\n"
}
et_input_problem.setText("$problemContent${tv_problem_impact.text}:")
......@@ -322,6 +333,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}
}
}
/**
* 最后一题
* */
......@@ -348,6 +360,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
mData[index].type5CanClick = false
}
}
/**
* 隐藏输入框
* */
......@@ -405,10 +418,10 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
//还有下一题
questionMultiItem2.questionsBean = questionsBean
if (RADIO_KEY == questionsBean.type) {
if(!questionsBean.image.isNullOrEmpty()||!questionsBean.url.isNullOrEmpty()){
if (!TextUtils.isEmpty(questionsBean.image) || !TextUtils.isEmpty(questionsBean.url)) {
tv_skip.visibility = View.GONE
questionMultiItem2.viewType = 7
}else{
} else {
questionMultiItem2.viewType = 3
}
} else {
......@@ -418,6 +431,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
mData.add(questionMultiItem2)
} else {
//没有下一题了,跳转按钮展示
setFirstAndLatQuestion(mQuestionBean!!.questions[2].question)
tv_finish.visibility = View.VISIBLE
tv_skip.visibility = View.GONE
}
......@@ -589,10 +603,10 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
val questionsBean = mQuestionBean!!.questionPaper.questions[questionChain.questionId]
questionMultiItem2.questionsBean = questionsBean
if (RADIO_KEY == questionsBean?.type) {
if(!questionsBean.image.isNullOrEmpty()||!questionsBean.url.isNullOrEmpty()){
if (!TextUtils.isEmpty(questionsBean.image) || !TextUtils.isEmpty(questionsBean.url)) {
tv_skip.visibility = View.GONE
questionMultiItem2.viewType = 7
}else{
} else {
questionMultiItem2.viewType = 3
}
} else {
......@@ -741,6 +755,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
* */
@SuppressLint("CheckResult")
private fun skipToIm() {
showProgressDialog()
SharedPreferencesEditor.putString("skip_time_", System.currentTimeMillis().toString())
if (toUid != null) {
......@@ -772,8 +787,11 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}, 1000L)
} else {
//代表是导医进来的 导医进来的需要获取导医后再发送消息
var questionPaperId = ""
mQuestionBean?.questionPaper?.id?.let { questionPaperId = it }
ImRetrofitApi.getImJavaApi()
.getConsultAssistantUidRequest(location, ffrom2)
.getConsultAssistantUidRequest(location, ffrom2, answerQuestionId, questionPaperId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ uidBean ->
......@@ -810,10 +828,12 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
finish()
}, 1000L)
} else {
dismissProgressDialog()
ToastUtil.toastShort("咨询助理忙碌中,请稍后再试")
}
}, {
dismissProgressDialog()
ToastUtil.toastShort("咨询助理忙碌中,请稍后再试")
})
......@@ -890,4 +910,13 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
return false
}
override fun finish() {
super.finish()
dismissProgressDialog()
overridePendingTransition(
R.anim.platform_activity_anim_in,
R.anim.platform_activity_anim_in
)
}
}
\ No newline at end of file
......@@ -99,7 +99,7 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
break;
case 6:
convertType6(helper, item);
break;
case 7:
helper.setText(R.id.multiple_type7_title, item.questionsBean.name);
ImageView image = helper.getView(R.id.image);
......@@ -111,7 +111,7 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
.dontAnimate()
.into(image);
}
if (item.questionsBean.url != null) {
if (!TextUtils.isEmpty(item.questionsBean.url)) {
helper.setVisible(R.id.jump_url,true);
jumpUrlView.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -122,7 +122,6 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
});
} else {
helper.setVisible(R.id.jump_url,false);
}
break;
default:
......
......@@ -15,7 +15,7 @@ public class QuestionMultiItem implements MultiItemEntity {
public String type1Text;
public String type2Text;
public String type2Other;
/***type 3 单选 type 4 多选 type 6 终止选项 type 7 */
/***type 3 单选 type 4 多选 type 6 终止选项 type 7*/
public QuestionsBean questionsBean;
public boolean type3CanClick = true;
public boolean type4CanClick = true;
......
......@@ -3,6 +3,7 @@ package com.yidianling.uikit.custom.http.response.question;
import java.util.Map;
public class QuestionPaperBean {
//试卷id
public String id;
public String createTime;
public String updateTime;
......
......@@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/platform_color_1DA1F2" />
<corners android:radius="18dp" />
<corners android:radius="20dp" />
</shape>
\ No newline at end of file
......@@ -44,32 +44,42 @@
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生" />
<ImageView
android:id="@+id/image"
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp" />
android:layout_marginTop="12dp"
android:elevation="0dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_marginTop="12dp"
android:id="@+id/jump_url"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_height="40dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_shape_1da1f2_r18"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_marginBottom="1px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="点击前往"
android:textColor="@color/white"
android:textSize="14sp" />
android:textSize="16sp" />
<ImageView
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginTop="1px"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginLeft="4dp"
android:src="@drawable/ic_arrow_right" />
</LinearLayout>
......
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