18034727885
2026-08-11 74a412c8160dfeb8a3e9f6383d45b0495a928818
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.fangxinxing.xxfxx.ui.mine.money_bag
 
import com.fangxinxing.xxfxx.R
import com.fangxinxing.xxfxx.base.MyBaseActivity
import com.fangxinxing.xxfxx.bean.UserBean
import com.fangxinxing.xxfxx.netUtls.Api
import com.fangxinxing.xxfxx.netUtls.callNet
import com.fangxinxing.xxfxx.netUtls.getMapByAny
import com.fangxinxing.xxfxx.utils.Cache.CacheKey
import com.fangxinxing.xxfxx.utils.getFormatTwo
import kotlinx.android.synthetic.main.activity_income_detail.tv_left_title_income
import kotlinx.android.synthetic.main.activity_income_detail.tv_money
 
class IncomeDetailActivity : MyBaseActivity() {
    override fun setContentView() {
        setContentView(R.layout.activity_income_detail)
    }
 
    override fun initView() {
        showTitle(false)
        showHeader(false)
        addFragment(InconeDetailFragment(), R.id.fl_container)
    }
 
    override fun onResume() {
        super.onResume()
        callMine()
    }
 
    private fun callMine() {
        val map = getMapByAny()
        callNet(Api.queryInfo, map) {
            val user = gson.fromJson<UserBean>(it, UserBean::class.java)
            CacheKey.saveUserInfo(user.data)
            showUI()
        }
    }
 
    private fun showUI() {
        tv_money.text =
            "¥" + getFormatTwo(CacheKey.getUserInfo().activityMoney?.toDoubleOrNull() ?: 0.0)
    }
 
    override fun setOnclick() {
        tv_left_title_income.setOnClickListener {
            onBackPressed()
        }
    }
}