Commit 904e75bb by 刘鹏

feat: 判断条件减少层级

parent fc24642f
......@@ -287,28 +287,24 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe ({ response ->
if ("200" == response.code){
val data = response.data
if (data.isNotEmpty()) {
val effectivityBean = data[0]
if (effectivityBean.status == 1) {
//上架
me_card_vip.visibility = View.VISIBLE
if (effectivityBean.isEffect == 1){
me_vip_des.text = "${effectivityBean.packageName } 有效期至${effectivityBean.overdue}"
tv_open_vip.text ="查看详情"
}else{
me_vip_des.text = "您当前不是会员,开通立享会员特权"
tv_open_vip.text ="开通会员"
}
if ("200" == response.code && response.data.isNotEmpty()) {
val effectivityBean = response.data[0]
if (effectivityBean.status == 1) {
//上架
me_card_vip.visibility = View.VISIBLE
if (effectivityBean.isEffect == 1) {
me_vip_des.text =
"${effectivityBean.packageName} 有效期至${effectivityBean.overdue}"
tv_open_vip.text = "查看详情"
} else {
//下架
me_card_vip.visibility = View.GONE
me_vip_des.text = "您当前不是会员,开通立享会员特权"
tv_open_vip.text = "开通会员"
}
} else {
//下架
me_card_vip.visibility = View.GONE
}
}else{
} else {
me_card_vip.visibility = View.GONE
}
}, {
......
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