Commit 0cac0b81 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

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