1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- // 本地开发环境
- const local = {
- web_pc: 'http://127.0.0.1:7001',
- spjj: 'http://127.0.0.1:7001/index.html#',
- openapi: 'https://openapi.bozedu.top',
- api: 'https://aimoocapi.bozedu.top',
- oss: 'https://oss.bozedu.net',
- uc: 'https://uc.dev.bozedu.net/',
- origin: window.location.origin,
- }
- // 测试服环境
- const development = {
- web_pc: 'https://aimooc.bozedu.top',
- spjj: 'https://aimoocspjj.bozedu.top/#',
- openapi: 'https://openapi.dev.bozedu.top',
- api: 'https://aimoocapi.bozedu.top',
- oss: 'https://oss.bozedu.net',
- uc: 'https://uc.dev.bozedu.net/',
- origin: window.location.origin,
- }
- // // 正式服环境
- const production = {
- web_pc: 'https://aimooc.bozedu.net',
- spjj: 'https://aimoocspjj.bozedu.net/#',
- openapi: 'https://openapi.bozedu.net',
- api: 'https://aimoocapi.bozedu.net',
- oss: 'https://oss.bozedu.net',
- uc: 'https://uc.bozedu.net/',
- origin: window.location.origin,
- }
- 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()
|