1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // 本地开发环境
- const local = {
- web_pc: 'http://127.0.0.1:7001',
- spjj: 'http://127.0.0.1:7001/index.html#',
- // web_mobile: 'https://tyyxm.bozedu.top/',
- api: 'https://aimoocapi.bozedu.top',
- oss: 'https://aimoocapi.bozedu.top',
- uc: 'https://uc.dev.bozedu.net/',
- origin: window.location.origin,
- }
- // 测试服环境
- const development = {
- web_pc: 'https://aimooc.bozedu.top',
- spjj: 'https://aimoocspjj.bozedu.top/#',
- origin: window.location.origin,
- api: 'https://aimoocapi.bozedu.top',
- oss: 'https://aimoocapi.bozedu.top',
- uc: 'https://uc.dev.bozedu.net/',
- }
- // // 正式服环境
- const production = {
- web_pc: 'https://txwx.txhlwxx.com/',
- origin: window.location.origin,
- api: 'https://txwxopenapi.txhlwxx.com/',
- oss: 'https://txwxopenapi.txhlwxx.com/',
- uc: 'https://uc.bozedu.net/',
- }
- function isWhich() {
- if (window.location.href.startsWith(development.web_pc)) {
- return development
- } else if (window.location.href.startsWith(production.web_pc)) {
- return production
- } else {
- return local
- }
- }
- window.GLOBAL_CONFIG = isWhich()
|