Commit 840353e1 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 495a9adb
......@@ -114,46 +114,6 @@ class MyPresenter : BasePresenter<MyView>() {
})
}
// fun getUserHallBaseMsg() {
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.userHallBaseMsg, object : BaseSubscriber<BaseResponse<MyInfo>>() {
//
// override fun onCompleted() {
// if (isLinkView)
// return
//
// view.hideLoading()
// }
//
// override fun onNext(baseResponse: BaseResponse<MyInfo>) {
// if (isLinkView) return
//
// val code: Int = baseResponse.status
// val message: String = baseResponse.message
// when (code) {
// 200 -> {
// view.getUserTaskMsgSuc(baseResponse.data)
// }
// 401 -> view.getUserTaskMsgFail()
// else -> {
// view.getUserTaskMsgFail()
// view.showToast(message)
// }
// }
//
// }
//
// override fun onError(e: Throwable?) {
// if (isLinkView) return
//
// view.hideLoading()
// view.showToast(e!!.message)
// view.getUserTaskMsgFail()
// }
//
// })
// }
/**
* 热门活动接口
*/
......
......@@ -348,10 +348,6 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
private fun setUserLoginStatus() {
if (userConfig != null) {
item_title_invitecode.text = "邀请码:" + userConfig!!.userMsg.idcode
}
if (userManager.userIsLogin()) {
// 已登录
if (userManager.wxOpenid.isNotEmpty()) {
......@@ -388,19 +384,17 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
item_title_invitecode.text = "-" + item_title_invitecode.text
}
val userGold = if (userConfig == null) {
"0.00"
} else {
CommonUtils.formatString(userConfig!!.userMsg.coin.toString())
}
var userGold = "0.00"
if (userConfig != null) {
item_title_invitecode.text = "邀请码:" + userConfig!!.userMsg.idcode
val allcoinBig = BigDecimal(userConfig!!.userMsg.coin.toString())
val rateBig = BigDecimal("10000")
val cashStr: String = allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
item_title_gold_about.text = "约" + cashStr + "元"
// 金币
userGold = CommonUtils.formatString(userConfig!!.userMsg.coin.toString())
}
item_title_gold_count.text = userGold
val allcoinBig = BigDecimal(userConfig!!.userMsg.coin.toString())
val rateBig = BigDecimal("10000")
val cashStr: String = allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
item_title_gold_about.text = "约" + cashStr + "元"
}
/**
......@@ -549,7 +543,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
jumpQQ()
}
// R.id.item_bottom_text -> {
// 跳转加入QQ群
// 跳转加入QQ群
// CustomerServiceManager.joinQQ(activity!!)
// }
R.id.item_title_id -> {
......
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