| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- // * 默认主题颜色
- export const PRIMARY_COLOR = '#409eff'
- /**
- * 开发环境配置
- * Host 服务器地址
- */
- // 8.210.194.53
- // 139.99.63.178
- // 145.239.1.65 cwgchinese
- //103.148.59.49:18500
- //193.134.208.230
- const ht = window.location.protocol
- const ho = window.location.host.split('.')[1]
- const c = import.meta.env.VITE_APP_ENV
- let Host00, Host85, Host05, Host80
- switch (c) {
- // 测试环境
- case 'test':
- Host00 = ht + '//secure.' + ho + '.com'
- Host85 = ht + '//ad.' + ho + '.com'
- Host05 = ht + '//file.' + ho + '.com'
- Host80 = ht + '//secure.' + ho + '.com'
- // Host05 = "http://103.171.34.61:8705"
- break
- // 生产环境
- case 'production':
- Host00 = ht + '//secure.' + ho + '.com'
- Host85 = ht + '//ad.' + ho + '.com'
- Host05 = ht + '//file.' + ho + '.com'
- Host80 = ht + '//secure.' + ho + '.com'
- break
- default:
- // 开发环境
- Host00 = 'http://103.214.175.29:8000'
- Host85 = 'https://ad.44a5c8109e4.com'
- // Host85="http://103.171.34.61:8500" // 测试
- Host05 = 'http://103.171.34.61:8705'
- Host80 = 'http://192.168.0.30:8000'
- // Host85 = 'http://192.168.0.18:8500' // 高超本地
- Host85 = 'http://192.168.0.38:8501' // 孔向阳本地
- // Host85="http://192.168.0.30:8500"
- break
- }
- const config = {
- Host00,
- Host85,
- Host05,
- Host80,
- Code: {
- StatusOK: 200,
- StatusFail: 400,
- StatusSessionExpire: 600,
- StatusSNotFound: 404,
- },
- Pattern: {
- Email: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/,
- Password:
- /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*([~!@&%$^\\(\\)#_]).*\\1.*\\1.*\\1)[A-Za-z0-9~!@&%$^\\(\\)#_]{8,16}$/,
- Password1: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,15}$/,
- Phone: /^1(3|4|5|6|7|8|9)\d{9}$/,
- 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]+$/,
- },
- }
- // const dev = {
- // Host: "http://47.75.159.72:8000"
- // }
- // const build = {
- // Host: "http://192.168.2.2"
- // }
- //
- // if (process.env.NODE_ENV == 'dev') {
- // config.Host = dev.Host
- // } else {
- // config.Host = build.Host
- // }
- export default config
|