let ht = window.location.protocol;
let ho = window.location.host.split('.')[1];
const c = import.meta.env.VITE_APP_ENV
let Host00, Host85
switch (c) {
    // 测试环境
    case 'test':
        Host00 = ht + "//testsecure." + ho + ".com"
        Host85 = ht + "//testucard." + ho + ".com"
        break;
    // 生产环境
    case 'production':
        Host00 = ht + "//secure." + ho + ".com"
        Host85 = ht + "//ucard." + ho + ".com"
        break;
    default:
        // 开发环境
        Host00 = "https://testsecure.6cd7e0f0b52.com"
        // Host85= "https://testad.6cd7e0f0b52.com"
        Host85 = "https://testucard.6cd7e0f0b52.com"
        // Host85= "http://192.168.0.33:8700"
        break;
}
const config = {
    Host00,
    Host85,
    Host80: ht + "//secure." + ho + ".com",
    Code: {
        StatusOK: 200,
        StatusFail: 400,
        StatusSessionExpire: 600,
        StatusSNotFound: 404,
    },
    Pattern: {
        Email: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
        Phone: /^1[3-9]\d{9}$/,
        Password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,16}$/,
        Tel: /^[0][1-9]{2,3}-[0-9]{5,10}$/,
        Num: /\d/,
        NonNegInt: /^[0-9]+?$/, //非负整数
        PosInt: /^[1-9]\d*$/, //正整数
        nonnegative: /^[0-9]+([.]{1}[0-9]{1,2})?$/, //非负数(最多两位小数)
        englishName: /^[^\u4e00-\u9fa5]+$/,
    }
}

export default config
