Commit 0cac0b81 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 5e296a17
...@@ -349,19 +349,15 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -349,19 +349,15 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
vipAdapter.setPosition(0) vipAdapter.setPosition(0)
vipAdapter.notifyDataSetChanged() vipAdapter.notifyDataSetChanged()
if (TextUtils.equals(payType, WEIXIN_PAY)) { // if (TextUtils.equals(payType, WEIXIN_PAY)) {
ll_vip_alipay.visibility = View.GONE // payType = WEIXIN_PAY
ll_vip_wx.visibility = View.VISIBLE // iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
payType = WEIXIN_PAY // iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue) // } else {
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none) // payType = ALIPAY
} else { // iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
ll_vip_alipay.visibility = View.VISIBLE // iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
ll_vip_wx.visibility = View.GONE // }
payType = ALIPAY
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
}
val vipBean = vipList!![0] val vipBean = vipList!![0]
backPayYesDialog(vipBean) backPayYesDialog(vipBean)
return true return true
...@@ -384,19 +380,15 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -384,19 +380,15 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
vipAdapter.setPosition(0) vipAdapter.setPosition(0)
vipAdapter.notifyDataSetChanged() vipAdapter.notifyDataSetChanged()
val vipBean = vipList!![0] val vipBean = vipList!![0]
if (TextUtils.equals(payType, WEIXIN_PAY)) { // if (TextUtils.equals(payType, WEIXIN_PAY)) {
ll_vip_alipay.visibility = View.GONE // payType = WEIXIN_PAY
ll_vip_wx.visibility = View.VISIBLE // iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
payType = WEIXIN_PAY // iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue) // } else {
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none) // payType = ALIPAY
} else { // iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
ll_vip_alipay.visibility = View.VISIBLE // iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
ll_vip_wx.visibility = View.GONE // }
payType = ALIPAY
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
}
backPayYesDialog(vipBean) backPayYesDialog(vipBean)
} else { } else {
finish() finish()
......
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