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

[提交人]:王雪伟

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