Commit 5713bcfa by 万齐军

feat: bug修改

parent baaabd67
......@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.83",
"m-confide" : "0.0.49.84",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
......@@ -35,7 +35,7 @@ ext {
//mdt 组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.41.13",
"ydl-platform" : "0.0.41.16",
//第二步 若干
"ydl-webview" : "0.0.38.80",
......@@ -91,7 +91,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.83",
"m-confide" : "0.0.49.84",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
......@@ -119,7 +119,7 @@ ext {
//mdt组件
"ydl-tuicore" : "0.0.22",
//第一步
"ydl-platform" : "0.0.41.13",
"ydl-platform" : "0.0.41.16",
//第二步 若干
"ydl-webview" : "0.0.38.80",
......
......@@ -394,6 +394,13 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
return false
}
override fun onResume() {
super.onResume()
if (doctorId.isNotBlank()) {
onLoadDialStatus(doctorId)
}
}
fun getUnReadByUid(uid:String):Int{
return ARouter.getInstance().navigation(IImService::class.java).getUnReadByUid(uid)
}
......
......@@ -189,7 +189,6 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
override fun initDataAndEvent() {
//来自首页倾诉红包入口
val isFromRed = intent.getBooleanExtra(IYDLRouterConstant.EXTRA_RED_PACKET,false)
val listenFree = intent.getBooleanExtra("listenFree",false)
isSplash = intent.getBooleanExtra("isSplash", false)
//初始化View
......@@ -211,9 +210,6 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
// .load(R.drawable.confide__free)
// .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
// .into(confide_Free)
val isLogin = (findRouteService(IUserService::class.java)?.isLogin()) ?: false
findViewById<View>(R.id.confide_Free).visibility =
if (isFromRed || listenFree || !isLogin) View.VISIBLE else View.GONE
if (isFromRed){
ToastUtil.toastLong(this@ConfideHomeActivity,"红包已领取成功 可立即点击拨打")
}
......@@ -223,9 +219,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
super.onResume()
//登录了回来之后就不显示了
val isLogin = (findRouteService(IUserService::class.java)?.isLogin()) ?: false
if (isLogin) {
findViewById<View>(R.id.confide_Free).visibility = View.GONE
}
findViewById<View>(R.id.confide_Free).visibility = if (isLogin) View.GONE else View.INVISIBLE
}
......
......@@ -89,7 +89,11 @@ class ItemVideoShowViewModel {
internal fun ItemVideoShowViewModel.mapOf(bean: ConfideHomeBodyBean): ItemVideoShowViewModel {
name.set(bean.confidedName)
coverUrl.set(bean.confidedIcon)
videoCoverUrl.set(bean.coverVideoPicture)
if (bean.coverVideoPicture.isNullOrBlank()) {
videoCoverUrl.set(bean.coverPicture)
} else {
videoCoverUrl.set(bean.coverVideoPicture)
}
state.set(bean.confideLine ?: 0)
doctorId = bean.doctorId
confideId = bean.confidedId
......
......@@ -18,6 +18,7 @@ import com.ydl.confide.home.ConfideHomeActivity
import com.ydl.webview.TellData
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.YDLConstants
import com.ydl.ydlcommon.ui.Loading
import com.ydl.ydlcommon.utils.YDLCacheUtils
/**
......@@ -52,6 +53,7 @@ class ConfdieServiceImpl : IConfideService {
}
override fun connectionJava(id: Int, type: Int, activity: Activity, tellData: String?, callType: String?) {
Loading.show(activity)
val myTellData: TellData? = if (tellData == null ) null else Gson().fromJson(tellData, TellData::class.java)
ConfideWebServiceImpl().connectionJava(id, type, activity, myTellData, callType)
}
......
......@@ -17,6 +17,7 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.webview.TellData
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.ui.Loading
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.ToastUtil
......@@ -182,6 +183,7 @@ class ConfideWebServiceImpl {
ExpertInfoBean.ListenRemainingTime(expertInfo.totalDuration);
}
YDLavManager.instances.callEventSave("10","用户点击拨打",expertInfo.channelId,"7")
Loading.close()
ARouter.getInstance().build("/av/AudioHomeActivity")
.withString(IntentConstants.INTENT_EXPERT_HEAD_URL, expertInfo.expertHeadUrl)
.withString(IntentConstants.INTENT_EXPERT_NAME, expertInfo.expertName)
......
......@@ -19,6 +19,7 @@ import com.ydl.confide.home.config.IConfideHomeConfig
import com.ydl.confide.home.contract.IConfideHomeContract
import com.ydl.confide.home.event.IConfideHomeEvent
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxImageTool
import kotlinx.android.synthetic.main.confide_recommend_view_new.view.*
......@@ -115,7 +116,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
.setFontSize(11, true)
.create()
tv_score.text = bodyBean.confidePraiseScore
if (bodyBean.listenFree == true) {
if (bodyBean.listenFree == true && bodyBean.confideLine == 1) {
confide_free_logo.visibility = VISIBLE
Glide.with(context)
.load(R.drawable.confide__free)
......@@ -299,13 +300,15 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
}
}
tv_confide.setOnClickListener {
ActionCountUtils.record(
"listen_counselor_list_page",
"listen_counselor_icon_click",
bodyBean.confidedId ?: "",
sign2.toString()
)
click(bodyBean)
if (!Utils.isFastClick()) {
ActionCountUtils.record(
"listen_counselor_list_page",
"listen_counselor_icon_click",
bodyBean.confidedId ?: "",
sign2.toString()
)
click(bodyBean)
}
}
}
......
......@@ -107,7 +107,7 @@ class ExpertIntroActivity : AppCompatActivity() {
}
})
adapter.checkNetwork()
binding.viewPager.currentItem = initPos
binding.viewPager.setCurrentItem(initPos, false)
}
private fun loadMore() {
......
......@@ -177,7 +177,7 @@ internal class IntroAdapter(
private fun onLoadDialStatus(position: Int) {
val confideApi = YDLHttpUtils.obtainApi(ConfideHomeApi::class.java)
val curUid = data[position].uid
val doctorId = data[position].doctorId
val confideId = data[position].confideId
val video = data[position].isVideo
ActionCountUtils.record(
......@@ -187,9 +187,9 @@ internal class IntroAdapter(
if (video) "1" else "2",
"1"
)
if (curUid != null) {
if (doctorId != null) {
dispose?.dispose()
dispose = confideApi.getDialStatus(curUid)
dispose = confideApi.getDialStatus(doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp ->
......
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_marginStart="@dimen/platform_dp_15"
android:layout_marginEnd="@dimen/platform_dp_15"
android:background="@color/transparent"
android:gravity="center_horizontal"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layoutCall"
android:layout_width="150dp"
android:layout_height="42dp"
android:layout_marginBottom="32dp"
android:background="@drawable/confide_line_bg_1"
android:visibility="gone"
tools:visibility="visible"
android:id="@+id/layoutCall"
android:layout_width="150dp"
android:layout_height="44dp"
android:layout_marginBottom="32dp"
android:background="@drawable/confide_line_bg_1"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/layoutChange"
tools:visibility="visible">
<ImageView
android:id="@+id/ivCall"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="4dp"
android:src="@drawable/ic_confide_call"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/layoutChange"
>
app:layout_constraintRight_toLeftOf="@+id/tvCall"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivCall"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="4dp"
android:src="@drawable/ic_confide_call"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tvCall"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="继续倾诉"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toTopOf="@+id/tvTime"
app:layout_constraintLeft_toRightOf="@+id/ivCall"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/tvCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="继续倾诉"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintBottom_toTopOf="@+id/tvTime"
app:layout_constraintLeft_toRightOf="@+id/ivCall"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/tvTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/white"
android:textSize="10sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/tvCall"
app:layout_constraintRight_toRightOf="@+id/tvCall"
app:layout_constraintTop_toBottomOf="@+id/tvCall"
tools:text="剩余1分40秒" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tvTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_confide_free"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="首单免费"
android:text=""
android:textColor="@color/white"
android:textSize="11sp"
android:id="@+id/first_order"
android:textSize="10sp"
android:visibility="gone"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/tvCall"
app:layout_constraintRight_toRightOf="@+id/tvCall"
app:layout_constraintTop_toBottomOf="@+id/tvCall"
tools:text="剩余1分40秒" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/first_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_confide_free"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="首单免费"
android:textColor="@color/white"
android:textSize="11sp"
android:visibility="gone"
app:layout_constraintCircle="@+id/layoutCall"
app:layout_constraintCircleAngle="70"
app:layout_constraintCircleRadius="70dp" />
<LinearLayout
android:id="@+id/layoutChange"
android:layout_width="150dp"
android:layout_height="42dp"
android:layout_height="44dp"
android:layout_marginStart="@dimen/platform_dp_23"
android:layout_marginBottom="32dp"
android:visibility="gone"
tools:visibility="visible"
android:background="@drawable/confide_line_bg_change"
app:layout_constraintTop_toTopOf="@id/layoutCall"
app:layout_constraintLeft_toRightOf="@id/layoutCall"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center"
android:paddingLeft="28dp"
android:paddingRight="28dp">
android:paddingRight="28dp"
android:visibility="gone"
app:layout_constraintLeft_toRightOf="@id/layoutCall"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/layoutCall"
tools:visibility="visible">
<TextView
android:id="@+id/layout_change_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="再换一位"
android:id="@+id/layout_change_text"
android:textColor="@color/white"
android:textSize="17sp"
/>
android:textSize="17sp" />
<ProgressBar
android:id="@+id/confide_progress"
android:layout_width="@dimen/platform_dp_20"
android:layout_height="@dimen/platform_dp_20"
android:id="@+id/confide_progress"
android:visibility="gone"
android:indeterminateDrawable="@drawable/confide_progress"
>
</ProgressBar>
android:visibility="gone"></ProgressBar>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -87,9 +87,7 @@
android:layout_marginTop="@dimen/platform_dp_12"
android:textColor="@color/white"
android:textSize="13sp"
android:drawableRight="@drawable/confide_right_arrow"
/>
android:drawableRight="@drawable/confide_right_arrow" />
<TextView
android:id="@+id/confide_Free"
......@@ -102,6 +100,7 @@
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="首单免费"
android:visibility="gone"
android:textColor="@color/white"
android:textSize="11sp" />
</FrameLayout>
......
......@@ -90,7 +90,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layoutCall"
android:layout_width="160dp"
android:layout_height="42dp"
android:layout_height="44dp"
android:layout_marginBottom="32dp"
android:background="@{item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -115,6 +115,7 @@
android:id="@+id/tvCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="立即拨打"
android:textColor="@color/white"
android:textSize="16sp"
app:confideLineText="@{item.lineStatus}"
......@@ -122,7 +123,7 @@
app:layout_constraintLeft_toRightOf="@+id/ivCall"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="通话中" />
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/tvTime"
......@@ -157,15 +158,17 @@
<TextView
android:id="@+id/tvTag"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="60dp"
android:text="@{item.tag}"
android:textColor="#99FFFFFF"
android:textSize="13sp"
app:layout_constraintBottom_toTopOf="@+id/layoutCall"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/btnShare"
tools:text="tag|tag|tag" />
<TextView
......
......@@ -303,7 +303,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
//倾诉首页 ydl-user://confide/home
ActionCountUtils.record("listen_counselor_list_page", "listen_counselor_list_page_visit", "1")
route(mContext, ConfideRoute.R_CONFIDE_HOME, "listenFree" to listenFree)
route(mContext, ConfideRoute.R_CONFIDE_HOME)
}
override fun psychologyClassClick() {
......
package com.ydl.ydlcommon.ui
import android.content.Context
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity
object Loading {
private var loadingDialogFragment: DialogFragment? = null
fun show(context: Context?) {
if (context !is FragmentActivity) return
if (loadingDialogFragment == null) {
loadingDialogFragment = LoadingDialogFragment.newInstance(null)
}
if (loadingDialogFragment?.isAdded!!) {
return
}
loadingDialogFragment?.show(context.supportFragmentManager, Loading::class.java.simpleName)
}
fun close() {
loadingDialogFragment?.dismissAllowingStateLoss()
}
}
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