123456789101112131415161718192021222324252627282930313233343536373839404142 |
- // 本地开发环境
- 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/#',
- // api: 'https://aimoocapi.bozedu.top',
- // oss: 'https://aimoocapi.bozedu.top',
- // uc: 'https://uc.dev.bozedu.net/',
- origin: window.location.origin,
- }
- // // 正式服环境
- const production = {
- // web_pc: 'https://txwx.txhlwxx.com/',
- // api: 'https://txwxopenapi.txhlwxx.com/',
- // oss: 'https://txwxopenapi.txhlwxx.com/',
- // 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()
|