package com.xty.common.arouter

import android.app.Activity
import android.content.Context
import android.os.Bundle
import com.alibaba.android.arouter.launcher.ARouter

class RouteManager {
    companion object{
        fun goAct(url:String,bundle:Bundle?=null){
            if(bundle==null){
                ARouter.getInstance().build(url).navigation()
            }else{
                ARouter.getInstance().build(url).with(bundle).navigation()
            }
        }


        fun goActRequest(url:String,context: Activity,requestCode:Int,bundle: Bundle?=null,){
            if(bundle!=null){

                ARouter.getInstance().build(url).with(bundle).navigation(context,requestCode)
            }else{

                ARouter.getInstance().build(url).navigation(context,requestCode)
            }
        }
        fun getAny(url:String):Any{
            return  ARouter.getInstance().build(url).navigation()
        }
    }




}