Commit a7b04135 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 805bac58
......@@ -79,7 +79,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private val vipPresenter by lazy { VipPresenter() }
private lateinit var vipAdapter: VipAdapter
private var vipList: MutableList<VipBean.ListBean>? = null
private var vipData: VipBean = null
private var vipData: VipBean ?= null
private var isCheckAgreeFlag: Boolean = true
private var isGuide: Boolean = false// 从启动页进入vip界面,返回时要回到首页
private var isMain: Boolean = false
......@@ -747,16 +747,16 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
var pid = vipBean.pid
var oldPrice = vipBean.oldPrice
if (alipayCount == 1) {
if (vipData != null && vipData.firstCancel != null) {
price = vipData.firstCancel.price
pid = vipData.firstCancel.pid
oldPrice = vipData.firstCancel.oldPrice
if (vipData != null && vipData!!.firstCancel != null) {
price = vipData!!.firstCancel.price
pid = vipData!!.firstCancel.pid
oldPrice = vipData!!.firstCancel.oldPrice
}
} else if (alipayCount >= 2) {
if (vipData != null && vipData.secondCancel != null) {
price = vipData.secondCancel.price
pid = vipData.secondCancel.pid
oldPrice = vipData.secondCancel.oldPrice
if (vipData != null && vipData!!.secondCancel != null) {
price = vipData!!.secondCancel.price
pid = vipData!!.secondCancel.pid
oldPrice = vipData!!.secondCancel.oldPrice
}
}
......
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