|
|
@@ -2,10 +2,6 @@ package com.yingyang.personalcenter.activity
|
|
|
|
|
|
import com.yingyang.personalcenter.net.PERSONALCENTER_API
|
|
|
import com.yingyangfly.baselib.mvvm.BaseViewModel
|
|
|
-import com.yingyangfly.baselib.net.CommonInterfaceRequestBean
|
|
|
-import com.yingyangfly.baselib.net.XUtils
|
|
|
-import com.yingyangfly.baselib.utils.GsonUtil
|
|
|
-import com.yingyangfly.baselib.utils.Preferences
|
|
|
|
|
|
/**
|
|
|
* 个人中心
|
|
|
@@ -16,11 +12,7 @@ class PersonalCenterViewModel : BaseViewModel() {
|
|
|
fail: ((msg: String) -> Unit)? = null,
|
|
|
success: ((success: Unit) -> Unit)? = null,
|
|
|
) = launchFlow(false) {
|
|
|
- val requestBean = CommonInterfaceRequestBean().apply {
|
|
|
- userToken = Preferences.getString("token")
|
|
|
- }
|
|
|
- val body = XUtils.createJson(GsonUtil.GsonString(requestBean))
|
|
|
- PERSONALCENTER_API.getUserInfo(body)
|
|
|
+ PERSONALCENTER_API.getUserInfo()
|
|
|
}.runUI(
|
|
|
success,
|
|
|
fail
|