123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- // 本地开发环境
- const local = {
- web_pc: 'https://tyyx.bozedu.top/',
- web_mobile: 'https://tyyxm.bozedu.top/',
- api: 'https://tyyxopenapi.bozedu.top/',
- oss: 'https://tyyxopenapi.bozedu.top/',
- txwxapi:'https://txwxopenapi.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/',
- txwxapi:'https://txwxopenapi.bozedu.top/',
- }
- // 演示服环境
- const demo = {
- web_pc: 'https://tyyx.bozedu.net/',
- web_mobile: 'https://tyyxm.bozedu.net/',
- origin: window.location.origin,
- api: 'https://tyyxopenapi.bozedu.net/',
- oss: 'https://tyyxopenapi.bozedu.net/'
- }
- // 正式服环境
- const production = {
- web_pc: 'https://tyyx.txhlwxx.com/',
- web_mobile: 'https://tyyxm.txhlwxx.com/',
- origin: window.location.origin,
- api: 'https://tyyxopenapi.txhlwxx.com/',
- oss: 'https://tyyxopenapi.txhlwxx.com/',
- txwxapi:'https://txwxopenapi.txhlwxx.com',
- }
- function isWhich() {
- if (window.location.host.includes('tyyx.bozedu.top')) {
- return development
- } else if(window.location.host.includes('tyyx.bozedu.net')) {
- return demo
- } else if(window.location.host.includes('tyyx.txhlwxx.com')) {
- return production
- } else {
- return local
- }
- }
- window.GLOBAL_CONFIG = isWhich()
|