12345678910111213141516171819202122232425262728293031323334353637383940 |
- // 本地开发环境
- const local = {
- web_pc: 'http://tyyx.bozedu.top/',
- web_mobile: 'http://tyyxm.bozedu.top/',
- api: 'http://tyyx_openapi.bozedu.top/',
- oss: 'http://tyyx_openapi.bozedu.top/',
- origin: window.location.origin,
- }
- // 测试服环境
- const development = {
- web_pc: 'https://tyyx.bozedu.top/',
- web_mobile: 'https://tyyxm.bozedu.top/',
- origin: window.location.origin,
- api: 'https://tyyxopenapi.bozedu.top/',
- oss: 'https://tyyxopenapi.bozedu.top/'
- }
- // 正式服环境
- const production = {
- web_pc: 'https://tyyx.bozedu.top/',
- web_mobile: 'https://tyyxm.bozedu.top/',
- origin: window.location.origin,
- api: 'https://tyyxopenapi.bozedu.top/',
- oss: 'https://tyyxopenapi.bozedu.top/'
- }
- function isWhich() {
- if (window.location.host.includes('tyyx.bozedu.top')) {
- return development
- } else if (window.location.protocol === 'https:') {
- return production
- } else {
- return local
- }
- }
- window.GLOBAL_CONFIG = isWhich()
|