Commit 31897a3d by 万齐军

feat: bugFix

parent 213c6ba2
......@@ -11,8 +11,6 @@ import androidx.fragment.app.FragmentActivity
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import com.alibaba.android.arouter.facade.annotation.Route
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.jcodecraeer.xrecyclerview.ProgressStyle
import com.jcodecraeer.xrecyclerview.XRecyclerView
import com.ydl.confide.R
......@@ -37,7 +35,6 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.base.config.HttpConfig.Companion.H5_URL
import com.ydl.ydlcommon.base.config.HttpConfig.Companion.YDL_H5
import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
......@@ -49,6 +46,7 @@ import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
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
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.confide_home_activity.*
import kotlinx.android.synthetic.main.confide_title_bar.*
......@@ -60,7 +58,7 @@ import kotlinx.android.synthetic.main.confide_title_bar.*
* @Company 壹点灵
* @date 2018/8/10
*/
@Route(path = "/confide/home")
@Route(path = ConfideRoute.R_CONFIDE_HOME)
class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHomeContract.Presenter>(),IConfideHomeContract.View,XRecyclerView.LoadingListener {
override fun getContentViewId(): Int {
......@@ -191,6 +189,7 @@ 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
......@@ -208,10 +207,13 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
initStatusBar()
// ModularServiceManager.provide(IConsultantService::class.java).showConfideListDialog(this)
// ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit","17")
Glide.with(this)
.load(R.drawable.confide__free)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(confide_Free)
// Glide.with(this)
// .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,"红包已领取成功 可立即点击拨打")
}
......@@ -271,6 +273,9 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
private fun initClick() {
quick_consult_card.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "akey_consult_icon_click")
if (!PhoneCallIn.loginByOneKeyLogin(this,true)) {
return@setOnClickListener
}
bottomSheetDialogFragment=ConfideBottomSheetDialogFragment()
bottomSheetDialogFragment.showBottomSheetDialog(this as FragmentActivity, HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro("0"),"0",true)
......@@ -300,7 +305,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
findViewById<View>(R.id.img_help)?.setOnClickListener {
ActionCountUtils.record("listen_counselor_list_page", "topright_corner_icon_click","3")
val params = H5Params(H5_URL + "help/", "")
val params = H5Params("https://activity.yidianling.com/activity/qs", "")//倾诉指南
params.isShowMenu = true
NewH5Activity.start(this, params)
}
......
......@@ -79,6 +79,9 @@ class ExpertIntroActivity : AppCompatActivity() {
}
data.addAll(vms)
}
if (data.isEmpty()) {
loadMore()
}
binding.ivBack.setOnClickListener { onBackPressed() }
binding.tvConfideRecord.setOnClickListener {
if (!PhoneCallIn.loginByOneKeyLogin(this, true)) {
......
......@@ -3,6 +3,7 @@ package com.ydl.confide.api
object ConfideRoute {
const val R_VIDEO_SHOW = "/confide/expert_video"
const val R_CONFIDE_HOME = "/confide/home"
fun h5ConfideIntro(id: String) = "jy/listenMask?listenerId=${id}"
......
......@@ -26,10 +26,12 @@
android:layout_alignParentBottom="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="30dp"
android:layout_marginBottom="20dp"
android:background="@drawable/confide_card_consult_bg"
android:orientation="horizontal"
android:paddingLeft="@dimen/platform_dp_8"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingRight="@dimen/platform_dp_8"
android:visibility="gone"
tools:visibility="visible">
......@@ -75,27 +77,33 @@
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/confide_consult_btn_bg"
android:layout_marginRight="24dp"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_5"
android:paddingBottom="@dimen/platform_dp_5"
android:paddingLeft="@dimen/platform_dp_7"
android:paddingRight="@dimen/platform_dp_7"
android:text="我要倾诉"
android:layout_marginTop="@dimen/platform_dp_15"
android:layout_marginTop="@dimen/platform_dp_12"
android:textColor="@color/white"
android:textSize="13sp"
android:drawableRight="@drawable/confide_right_arrow"
/>
<ImageView
android:layout_width="@dimen/platform_dp_40"
android:layout_height="@dimen/confide_dp_25"
android:src="@drawable/confide__free"
android:layout_marginStart="@dimen/platform_dp_40"
android:id="@+id/confide_Free"
>
</ImageView>
<TextView
android:id="@+id/confide_Free"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_confide_free"
android:layout_gravity="right|top"
android:paddingLeft="5dp"
android:paddingTop="2dp"
android:paddingRight="5dp"
android:paddingBottom="2dp"
android:text="首单免费"
android:textColor="@color/white"
android:textSize="11sp" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -116,7 +116,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/platform_sp_12"
android:textColor="#BCBCBC"
android:text="向TA倾诉"
android:text="倾诉人次"
/>
</LinearLayout>
<LinearLayout
......@@ -156,16 +156,17 @@
android:layout_marginStart="14dp"
app:layout_constraintBottom_toBottomOf="@id/img_bg"
/>
<TextView
android:id="@+id/price_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="50元/25分钟"
android:id="@+id/price_content"
android:textSize="@dimen/platform_sp_12"
app:layout_constraintStart_toEndOf="@id/flowlayout_tag"
app:layout_constraintBottom_toBottomOf="@id/flowlayout_tag"
>
</TextView>
app:layout_constraintTop_toBottomOf="@+id/ll_confide_data"/>
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
......@@ -194,8 +195,8 @@
android:gravity="center"
tools:background="@drawable/confide_line_1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="42dp"
android:layout_height="21dp"
android:id="@+id/confide_free_logo"
android:layout_marginTop="@dimen/platform_dp_5"
android:layout_marginStart="@dimen/platform_dp_8"
......
<resources>
<string name="confide_title">即时倾诉</string>
<string name="confide_title">倾诉热线</string>
<string name="confide_video_wifi_tip">当前处于非wifi环境下,播放会消耗流量,确定继续播放?</string>
<string name="confide_tip">提示</string>
<string name="confide_tip_remain_time">(剩余%s)</string>
......
......@@ -27,6 +27,7 @@ import com.ydl.ydlcommon.bean.ShareData
import com.ydl.ydlcommon.data.PlatformRamImpl
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.modular.route
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.Utils
......@@ -296,7 +297,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
ActionCountUtils.count(HomeBIConstants.YDL_USER_CONSULT_CLICK)
}
override fun nowConfideClick() {
override fun nowConfideClick(listenFree: Boolean) {
if (Utils.isFastClick()) {
//防止连击
return
......@@ -304,7 +305,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
ActionCountUtils.count(HomeBIConstants.YDL_USER_TALK_IN_TIME_CLICK)
//倾诉首页 ydl-user://confide/home
YDLRouterManager.router(IYDLRouterConstant.ROUTER_CONFIDE_HOME)
route(mContext, ConfideRoute.R_CONFIDE_HOME, "listenFree" to listenFree)
}
override fun psychologyClassClick() {
......
package com.yidianling.home.event
import androidx.recyclerview.widget.RecyclerView
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.yidianling.home.model.bean.*
/**
......@@ -82,7 +82,7 @@ interface IHomeBaseEvent {
/**
* 即可倾诉点击事件
*/
fun nowConfideClick()
fun nowConfideClick(listenFree: Boolean)
/**
* 心理课堂点击事件
......
......@@ -41,7 +41,6 @@ import com.yidianling.home.ui.view.HomeSpaceItemDecoration
import com.yidianling.home.utils.HomeAnimUtils
import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.ydl.home_fragment.*
import kotlin.properties.Delegates
/**
......@@ -204,7 +203,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
homeEvent?.reservationExpertsClick()
}
tv_confide.setOnClickListener {
homeEvent?.nowConfideClick()
homeEvent?.nowConfideClick(adapter?.listenFree ?: false)
}
tv_course.setOnClickListener {
homeEvent?.psychologyClassClick()
......
......@@ -8,10 +8,9 @@ import android.widget.LinearLayout
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.common.tools.RxDeviceTool
import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
/**
......@@ -54,7 +53,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeEvent?.reservationExpertsClick()
}
homeModuleButtonBannerSecond.setOnClickListener {
homeEvent?.nowConfideClick()
homeEvent?.nowConfideClick(listenFree)
}
homeModuleButtonBannerThird.setOnClickListener {
homeEvent?.psychologyClassClick()
......
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