package com.yidianling.user.modular_service

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydlcommon.modular.IPlatformUserModuleService
import com.ydl.ydlcommon.router.YdlUserInfo
import com.yidianling.user.UserHelper

/**
 * Created by haorui on 2019-10-10.
 * Des:
 */
@Route(path = "/user/platformUser")
class PlatformUserModuleService : IPlatformUserModuleService {
    override fun getUser(): YdlUserInfo? {
        val userInfo = UserHelper.getUserInfo();
        return YdlUserInfo(userInfo?.uid ?: "", userInfo?.accessToken ?: "", userInfo?.hxpwd
            ?: "", userInfo?.userInfo!!.nick_name ?: "", userInfo?.userInfo!!.head ?: "")
    }

    override fun init(context: Context) {

    }
}
