123456789101112131415161718192021222324252627282930313233343536 |
- // 本地开发环境
- const local = {
- api: ' https://openapi.dev.bozedu.net/',
- oss: ' https://openapi.dev.bozedu.net/',
- uc: 'https://uc.dev.bozedu.net/',
- }
- // 测试服环境
- const development = {
- web_pc: 'https://dyawdev.bozedu.top/',
- api: ' https://openapi.dev.bozedu.net/',
- oss: ' https://openapi.dev.bozedu.net/',
- uc: 'https://uc.dev.bozedu.net/',
- }
- // // 正式服环境
- const production = {
- web_pc: 'https://dyaw.bozedu.net/',
- api: ' https://openapi.bozedu.net/',
- oss: ' https://openapi.bozedu.net/',
- 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 production
- }
- }
- window.GLOBAL_CONFIG = isWhich()
|