12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // 本地开发环境
- const local = {
- web_pc: 'https://tyyx.bozedu.top/',
- web_mobile: 'https://tyyxm.bozedu.top/',
- api: 'https://tyyxopenapi.bozedu.top/',
- oss: 'https://tyyxopenapi.bozedu.top/',
- origin: window.location.origin,
- // 浙里办中转
- pend: 'https://tyyxopenapi.txhlwxx.com/',
- }
- // 测试服环境
- 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/',
- pend: 'https://tyyxopenapi.txhlwxx.com/',
- }
- // 演示服环境
- 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/',
- pend: 'https://tyyxopenapi.txhlwxx.com/',
- }
- // 正式服环境
- 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/',
- pend: 'https://tyyxopenapi.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()
|