Commit fba5d5de by YKai

feat: 咨询未支付订单弹窗以及消息数量bug修复

parent f2f0882b
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3' ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2' constrait_support_version = '1.0.2'
componentVersion = "0.3.0.12-SNAPSHOT" componentVersion = "0.3.0.13"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -218,23 +218,28 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View. ...@@ -218,23 +218,28 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
"$orderNum" "$orderNum"
} }
iv_order_tip.text = numberStr iv_order_tip.text = numberStr
getLocal().setConsult(orderNum) getLocal().setConsult(true)
getLocal().setConsultNum(orderNum)
} else { } else {
iv_order_tip.visibility = View.GONE iv_order_tip.visibility = View.GONE
getLocal().setConsult(0) getLocal().setConsult(false)
getLocal().setConsultNum(0)
} }
}else{ }else {
getLocal().setConfide(false) getLocal().setConfide(false)
getLocal().setConsult(0) getLocal().setConsult(false)
getLocal().setConsultNum(0)
} }
}else{ }else {
getLocal().setConfide(false) getLocal().setConfide(false)
getLocal().setConsult(0) getLocal().setConsult(false)
getLocal().setConsultNum(0)
} }
},{ },{
getLocal().setConfide(false) getLocal().setConfide(false)
getLocal().setConsult(0) getLocal().setConsult(false)
getLocal().setConsultNum(0)
}) })
} }
...@@ -246,7 +251,8 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View. ...@@ -246,7 +251,8 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
private fun refreshCouponData() { private fun refreshCouponData() {
getLocal().setCoupon(false) getLocal().setCoupon(false)
getLocal().setConfide(false) getLocal().setConfide(false)
getLocal().setConsult(0) getLocal().setConsult(false)
getLocal().setConsultNum(0)
val userInfo = getUserInfo() val userInfo = getUserInfo()
......
...@@ -18,15 +18,19 @@ interface AppLocal { ...@@ -18,15 +18,19 @@ interface AppLocal {
fun putUpdate(update: Boolean) fun putUpdate(update: Boolean)
fun getCoupon():Boolean fun getCoupon(): Boolean
fun setCoupon(have:Boolean) fun setCoupon(have: Boolean)
fun getConsult(): Int fun getConsult(): Boolean
fun setConsult(have: Int) fun setConsult(have: Boolean)
fun getConfide():Boolean fun getConsultNum(): Int
fun setConsultNum(num: Int)
fun getConfide(): Boolean
fun setConfide(have: Boolean) fun setConfide(have: Boolean)
......
...@@ -22,6 +22,7 @@ internal class AppLocalImpl private constructor(): AppLocal { ...@@ -22,6 +22,7 @@ internal class AppLocalImpl private constructor(): AppLocal {
private const val CONFIDE = "confide" private const val CONFIDE = "confide"
private const val CONSULT = "consult" private const val CONSULT = "consult"
private const val CONSULT_NUM = "consult_num"
private const val COUPON = "coupon" private const val COUPON = "coupon"
} }
...@@ -50,12 +51,20 @@ internal class AppLocalImpl private constructor(): AppLocal { ...@@ -50,12 +51,20 @@ internal class AppLocalImpl private constructor(): AppLocal {
getAppSP().edit().putBoolean(COUPON, have).apply() getAppSP().edit().putBoolean(COUPON, have).apply()
} }
override fun getConsult(): Int { override fun getConsult(): Boolean {
return getAppSP().getInt(CONSULT, 0) return getAppSP().getBoolean(CONSULT, false)
} }
override fun setConsult(have: Int) { override fun setConsult(have: Boolean) {
getAppSP().edit().putInt(CONSULT, have).apply() getAppSP().edit().putBoolean(CONSULT, have).apply()
}
override fun getConsultNum(): Int {
return getAppSP().getInt(CONSULT_NUM, 0)
}
override fun setConsultNum(num: Int) {
getAppSP().edit().putInt(CONSULT_NUM, num).apply()
} }
override fun getConfide(): Boolean { override fun getConfide(): Boolean {
......
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