Commit d7f9853a by fengquan

Merge remote-tracking branch 'origin/d/v_confide_2.0' into darren_confide_2.0

# Conflicts:
#	m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
#	m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
parents e4489644 d4370995
......@@ -5,12 +5,12 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.95",
"m-confide" : "0.0.49.96",
"m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.18",
"m-user" : "0.0.62.25",
"m-home" : "0.0.23.74",
"m-im" : "0.0.21.47",
"m-im" : "0.0.21.48",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10",
......@@ -35,13 +35,13 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.23",
//第一步
"ydl-platform" : "0.0.41.21",
"ydl-platform" : "0.0.41.22",
//第二步 若干
"ydl-webview" : "0.0.38.80",
"ydl-media" : "0.0.21.45",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.00",
"m-audioim" : "0.0.49.30.01",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......@@ -90,12 +90,12 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.95",
"m-confide" : "0.0.49.96",
"m-consultant" : "0.0.60.27",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.18",
"m-user" : "0.0.62.25",
"m-home" : "0.0.23.74",
"m-im" : "0.0.21.47",
"m-im" : "0.0.21.48",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.8",
......@@ -118,13 +118,13 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.23",
//第一步
"ydl-platform" : "0.0.41.21",
"ydl-platform" : "0.0.41.22",
//第二步 若干
"ydl-webview" : "0.0.38.80",
"ydl-media" : "0.0.21.45",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.30.00",
"m-audioim" : "0.0.49.30.01",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......
......@@ -142,7 +142,6 @@ class YDLavManager {
val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) {
act.runOnUiThread {
act.callEventSave("33", "被叫拒绝,被叫点击了拒绝按钮")
callEndStatusUpdate(response?.ChannelId!!, 2, "被叫拒绝")
ToastUtil.toastShort("对方已挂断")
act.writeAgoraLog("被叫(专家)拒绝了通话邀请")
......
......@@ -3,6 +3,8 @@ package com.ydl.confide.home
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.net.Uri
import android.os.Build
import android.os.Bundle
......@@ -33,10 +35,12 @@ import com.ydl.webview.ProgressWebView
import com.ydl.webview.TellData
import com.ydl.webview.WebModularServiceUtils
import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.utils.ScreenUtil
import com.ydl.ydlcommon.utils.TimeUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.service.IUserService
......@@ -71,6 +75,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit var layout_change_text: View
lateinit var layoutBottom: View
lateinit var itemView: View
var bottomSheet :FrameLayout?=null
private var behavior: BottomSheetBehavior<*>? = null
......@@ -212,7 +218,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
onShowReady()
......@@ -227,28 +232,37 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
FrameLayout.LayoutParams.WRAP_CONTENT
).apply { gravity = Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL }
dialog?.window?.addContentView(itemView, layoutParams)
val bottomSheet =
bottomSheet =
(it as BottomSheetDialog).findViewById<View>(com.google.android.material.R.id.design_bottom_sheet) as FrameLayout?
behavior = BottomSheetBehavior.from(bottomSheet!!)
behavior?.peekHeight = (resources.displayMetrics.heightPixels * 0.7F).roundToInt()
if (jumpUrl?.contains("payPage=1")){
//支付70%高度
setMaxHeight(RxImageTool.dp2px(495f))
}else{
setMaxHeight(resources.displayMetrics.heightPixels)
}
//true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去
// behavior?.skipCollapsed=true
behavior?.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
override fun onStateChanged(bottomSheet: View, newState: Int) {
when (newState) {
3 -> {
BottomSheetBehavior.STATE_EXPANDED -> {
bottomSheet.background = ColorDrawable(Color.WHITE)
rl_title.visibility = View.VISIBLE
close_webview_Icon.visibility = View.VISIBLE
text_title.visibility = View.VISIBLE
line.visibility = View.GONE
}
1 -> {
BottomSheetBehavior.STATE_DRAGGING -> {
bottomSheet.setBackgroundResource(R.drawable.confide_bottom_webview)
rl_title.visibility = View.VISIBLE
close_webview_Icon.visibility = View.GONE
text_title.visibility = View.GONE
line.visibility = View.VISIBLE
}
4 -> {
BottomSheetBehavior.STATE_COLLAPSED -> {
rl_title.visibility = View.VISIBLE
line.visibility = View.VISIBLE
}
......@@ -260,7 +274,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
return dialog
}
private fun setMaxHeight(height : Int){
bottomSheet?.layoutParams?.height = height
bottomSheet?.requestLayout()
}
private fun callJsFun(wv_content: ProgressWebView, funcName: String) {
val sb = StringBuffer("javascript:")
sb.append(funcName)
......@@ -305,10 +322,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
private fun webViewInit(wv_content: ProgressWebView) {
val setting: WebSettings = wv_content?.settings!!
//支持js
//支持js
setting.setJavaScriptEnabled(true)
//设置字符编码
//设置字符编码
setting.setDefaultTextEncodingName("GBK")
setting.setDomStorageEnabled(true)
val appCachePath: String = context?.getCacheDir()?.getAbsolutePath().toString()
......
......@@ -239,9 +239,9 @@ class ConfideHomeActivity :
}
private fun showDoctorDetail(confideId: String, doctorId: String) {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(confideId)
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(this@ConfideHomeActivity, url, doctorId)
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(confideId)+"&payPage=1"
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(this@ConfideHomeActivity, url, doctorId)
}
override fun onResume() {
......
......@@ -68,13 +68,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
"6"
)
if (!item.confideId.isNullOrBlank()) {
ConfideWebServiceImpl().connectionJava(
item.confideId!!.toInt(),
3,
it.context as Activity,
null
) {
showDoctorDetail(item)
ConfideWebServiceImpl().connectionJava(item.confideId!!.toInt(), 3, it.context as Activity, null) {
showDoctorDetail(item,true)
}
}
// showDoctorDetail(item)
......@@ -116,7 +111,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "",
"4"
)
showDoctorDetail(item)
showDoctorDetail(item,false)
}
binding.ivAvatar.setOnClickListener {
ActionCountUtils.record(
......@@ -132,7 +127,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "",
"3"
)
showDoctorDetail(item)
showDoctorDetail(item,false)
}
binding.vDisableClick.setOnClickListener { }
binding.btnShare.setOnClickListener {
......@@ -307,9 +302,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
disposable?.dispose()
}
private fun showDoctorDetail(item: VideoViewModel) {
private fun showDoctorDetail(item: VideoViewModel,toPay:Boolean) {
item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else ""
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(
itemView.context as FragmentActivity,
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomRightRadius="6dp"/>
<solid android:color="#B3BBC1CD" />
<solid android:color="#4d000000" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomRightRadius="6dp"/>
<solid android:color="#CCFF994B"/>
<solid android:color="#4d000000"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:bottomRightRadius="6dp"/>
<solid android:color="#701da1f2" />
<solid android:color="#4d000000" />
</shape>
\ No newline at end of file
......@@ -79,7 +79,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_14"
android:textColor="#ACADB1"
android:textColor="#555555"
android:textStyle="bold"
tools:text="83%"
/>
......@@ -89,7 +89,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#BCBCBC"
android:textColor="#69696A"
android:text="接通率" />
</LinearLayout>
<LinearLayout
......@@ -104,7 +104,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_14"
android:textColor="#ACADB1"
android:textColor="#555555"
android:textStyle="bold"
android:layout_marginTop="12dp"
tools:text="8000人"
......@@ -115,7 +115,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#BCBCBC"
android:textColor="#69696A"
android:text="倾诉人次"
/>
</LinearLayout>
......@@ -131,7 +131,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_14"
android:textColor="#ACADB1"
android:textColor="#555555"
android:textStyle="bold"
android:layout_marginTop="12dp"
tools:text="4.9"
......@@ -142,7 +142,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#BCBCBC"
android:textColor="#69696A"
android:text="评分"
/>
</LinearLayout>
......
......@@ -466,7 +466,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachConsultPerfectData.class, MsgViewHolderPerfectConsultData.class);//完善咨询资料提醒消息
NimUIKit.registerMsgItemViewHolder(CustomAttachPleaseSubscribeConsultDate.class, MsgViewHolderPleaseSubscribeConsultDate.class);//请预约咨询时间
NimUIKit.registerMsgItemViewHolder(CustomCustomerServiceCardAttachment.class, MsgViewHolderCustomerServiceCard.class);//客服小壹名片
NimUIKit.registerMsgItemViewHolder(CustomAttachmentShareMsg.class, MsgViewHolderShareMsg.class);//分享推送
NimUIKit.registerMsgItemViewHolder(CustomAttachmentShareMsg.class, MsgViewHolderShareMsg.class);//分享推送30
NimUIKit.registerMsgItemViewHolder(CustomAttachConsultCallStatus.class, MsgViewHolderConsultCallStatus.class);//咨询声网的拨打状态 32
NimUIKit.registerMsgItemViewHolder(CustomAttachAssistantReceivedMoney.class, MsgViewHolderAssistantReceivedMoney.class);
NimUIKit.registerMsgItemViewHolder(CustomAttachmentBusinessCard.class, MsgViewHolderBusinessCard.class);//专家自定义名片 ,TYPE=34
......
package com.yidianling.im.session.viewholder;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
......@@ -52,14 +51,11 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
typeImageRight.setVisibility(View.VISIBLE);
}
if (TextUtils.equals("1", customAttachTipMsg.getStatus())) {
statusLabel.setText(customAttachTipMsg.getDuration());
if (isReceivedMessage()) {
statusLabel.setText(customAttachTipMsg.getCallee());
} else {
if (isReceivedMessage()) {
statusLabel.setText(customAttachTipMsg.getCallee());
} else {
statusLabel.setText(customAttachTipMsg.getCaller());
}
statusLabel.setText(customAttachTipMsg.getCaller());
}
//只有倾诉加角标,咨询不加
if (!"true".equals(customAttachTipMsg.getIsConsultOrder())) {
......
......@@ -8,6 +8,7 @@
<TextView
android:padding="12dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -20,9 +21,9 @@
android:id="@+id/message_layout"
android:layout_width="match_parent"
android:layout_height="88dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_below="@+id/tv_title"
android:layout_marginTop="10dp"
android:layout_marginBottom="11dp"
android:background="@drawable/im_bg_push_confide_content"
android:orientation="vertical"
android:padding="10dp">
......@@ -103,15 +104,15 @@
android:layout_below="@+id/message_layout"
android:layout_alignLeft="@+id/message_layout"
android:layout_weight="1"
android:padding="12dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="18dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:includeFontPadding="false"
android:text="¥"
android:textSize="8sp"
android:textStyle="bold" />
......
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