1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- // 本地开发环境
- 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,
- }
- // 测试服环境
- 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 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/'
- }
- 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()
|