package cn.yyxx.eyuangame.core.network

import android.content.Context
import cn.yyxx.support.HostModelUtils

/**
 * @author #Suyghur.
 * Created on 2021/06/17
 */
object Host {

    private const val DEFAULT_ONLINE_HOST = ""
    private const val DEFAULT_TEST_HOST = "http://47.103.149.24:81"

    var HOST = ""

    /**
     * 默认线上环境
     */
    var IP_MODEL = 3

    var BASIC_ROUTE_INIT_SDK = "activate"
    var BASIC_ROUTE_LOGIN = "member_login"
    var BASIC_ROUTE_THIRD_PART_LOGIN = "third_plat_login"
    var BASIC_ROUTE_REGISTER = "member_register"
    var BASIC_ROUTE_FORGET_PWD = ""
    var BASIC_ROUTE_GET_ORDER_ID = ""
    var BASIC_ROUTE_NOTIFY_ORDER = ""
    var BASIC_ROUTE_NOTIFY_REWARD = ""
    var BASIC_ROUTE_SUBMIT_ROLE_INFO = ""


    fun initHostModel(context: Context) {
        IP_MODEL = HostModelUtils.getHostModel(context)
        setDefaultHost()
    }

    fun setDefaultHost() {
        when (IP_MODEL) {
            HostModelUtils.ENV_TEST -> HOST = DEFAULT_TEST_HOST
            HostModelUtils.ENV_ONLINE -> HOST = DEFAULT_ONLINE_HOST
        }
        //初始化接口路由
    }
}