Commit 4838caf3 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入优惠券弹窗
parent 642edf32
...@@ -57,6 +57,13 @@ class HomeQyBannerAdapter : PagerAdapter { ...@@ -57,6 +57,13 @@ class HomeQyBannerAdapter : PagerAdapter {
} else { } else {
JumpUtils.webJump(data.brand, data.remark) JumpUtils.webJump(data.brand, data.remark)
} }
} else if (TextUtils.equals(data.rechargeType, "2")) {
if (!Constant.Switch.isOpenVip) {
JumpUtils.MemberOrderJump()
} else {
//话费充值
JumpUtils.RechargeJump()
}
} else { } else {
JumpUtils.RightsDetailJump(data.brand, data.icon) JumpUtils.RightsDetailJump(data.brand, data.icon)
} }
......
...@@ -30,11 +30,9 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> { ...@@ -30,11 +30,9 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
} }
id_img_kefu?.setOnClickListener { id_img_kefu?.setOnClickListener {
// JumpUtils.webJump("客服", NetConfig.H5.WEB_URL_CUSTOMER_SERVICE) // JumpUtils.webJump("客服", NetConfig.H5.WEB_URL_CUSTOMER_SERVICE)
DialogUtils.showFetchAllCard(activity!!,object :OnRecycleItemClickListener<Any>{ DialogUtils.showFetchAllCard(activity!!,object :DialogUtils.OnFetchCardListener{
override fun onItemClick(view: View?, position: Int, data: Any?) { override fun onSelectCoupons() {
} }
}) })
} }
......
...@@ -446,8 +446,12 @@ object DialogUtils { ...@@ -446,8 +446,12 @@ object DialogUtils {
mDialog.show() mDialog.show()
} }
interface OnFetchCardListener {
fun onSelectCoupons();
}
//话费优惠券列表 //话费优惠券列表
fun showFetchAllCard(context: Activity, listener: OnRecycleItemClickListener<Any>) { fun showFetchAllCard(context: Activity, listener: OnFetchCardListener) {
if (context.isDestroyed) return if (context.isDestroyed) return
val mDialog = Dialog(context, R.style.CenterCompatDialogTheme) val mDialog = Dialog(context, R.style.CenterCompatDialogTheme)
val mDialogView = val mDialogView =
...@@ -459,8 +463,12 @@ object DialogUtils { ...@@ -459,8 +463,12 @@ object DialogUtils {
Gravity.CENTER Gravity.CENTER
) )
val youhuiList = mDialogView.findViewById<RecyclerView>(R.id.id_rcl_huafei_list); val youhuiList = mDialogView.findViewById<RecyclerView>(R.id.id_rcl_huafei_list);
val huafeiCouponsAdapter =
HuafeiCouponsAdapter(context, object : OnRecycleItemClickListener<Any> {
override fun onItemClick(view: View?, position: Int, data: Any?) {
val huafeiCouponsAdapter = HuafeiCouponsAdapter(context, listener) }
})
youhuiList.layoutManager = GridLayoutManager(context, 2) youhuiList.layoutManager = GridLayoutManager(context, 2)
youhuiList.adapter = huafeiCouponsAdapter youhuiList.adapter = huafeiCouponsAdapter
......
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