12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // 本地开发环境
- const local = {
- // web_pc: 'https://tyyx.bozedu.top/',
- // web_mobile: 'https://tyyxm.bozedu.top/',
- web_pc: 'https://yzy.dev.bozedu.net/',
- qqyxt: 'https://qqyxt.dev.bozedu.net/',
- yzy: 'https://yzy.dev.bozedu.net/',
- api: 'https://openapi.dev.bozedu.net/',
- uc: 'https://uc.dev.bozedu.net/',
- origin: window.location.origin,
- base: '',
- build: ''
- }
- // 测试服环境
- const development = {
- web_pc: 'https://yzy.dev.bozedu.net/',
- origin: window.location.origin,
- qqyxt: 'https://qqyxt.dev.bozedu.net/',
- yzy: 'https://yzy.dev.bozedu.net/',
- api: 'https://openapi.dev.bozedu.net/',
- uc: 'https://uc.dev.bozedu.net/',
- base: '/webapps/page',
- build: '/webapps/page/liankao'
- }
- // // 正式服环境
- const production = {
- web_pc: 'https://yzy.bozedu.net/',
- origin: window.location.origin,
- qqyxt: 'https://qqyxt.bozedu.net/',
- yzy: 'https://yzy.bozedu.net/',
- api: 'https://openapi.bozedu.net/',
- uc: 'https://uc.bozedu.net/',
- base: 'webapps/page',
- build: '/webapps/page/liankao'
- }
- 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()
|