CourseIn.kt 768 Bytes
Newer Older
严久程 committed
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
package com.yidianling.course.router

import android.app.Activity
import android.content.Intent
import com.yidianling.router.RouterManager
import com.yidianling.router.user.UserResponse

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/04/25
 */
object CourseIn {

    fun isLogin(): Boolean {
        return RouterManager.getUserRouter()?.isLogin()?:false
    }

    fun getUserInfo(): UserResponse.UserInfo? {
        return RouterManager.getUserRouter()?.getUserInfo()
    }

    fun loginWayIntent(activity: Activity): Intent? {
        return RouterManager.getUserRouter()?.loginWayIntent(activity)
    }

    fun mainIntent(activity: Activity): Intent? {
        return RouterManager.getAppRouter()?.mainIntent(activity)
    }

}