123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * 环境变量
- * 以下划线 '_' 开头的字段表示只在build命令打包时有效,勿在项目中使用
- */
- // DOMAIN: 'https://scrm.gooki.com',
- // DOMAIN: 'https://gooki.ascrm.cn',
- // DOMAIN: 'https://www.ascrm.cn', // 接口域名(站点域名请使用:window.location.origin)
- // BASE_API: 'https://scrm.gooki.com/linkwechat-api', // 接口基础路径
- // BASE_API: 'https://gooki.ascrm.cn/linkwechat-api',
- // BASE_API: 'https://www.ascrm.cn/linkwechat-api', // 接口基础路径
- const URL = 'https://xy.gooki.com'
- const API = 'https://xy.gooki.com/linkwechat-api'
- // const URL = 'https://eg.gooki.com'
- // const API = 'https://eg.gooki.com/linkwechat-api'
- // const URL = 'https://www.ascrm.cn' //冠客精灵
- // const API = 'https://www.ascrm.cn/linkwechat-api' //冠客精灵
- // const URL = 'https://gooki.ascrm.cn'
- // const API = 'https://gooki.ascrm.cn/linkwechat-api'
- // const URL = 'https://scrm.gooki.com' //冠客
- // const API = 'https://scrm.gooki.com/linkwechat-api' //冠客
- export const envs = {
- development: {
- DOMAIN: URL,
- DOMAIN_MOBILE: 'https://xy.gooki.com/mobile', // linkwe-mobile (vue2) 移动端地址
- BASE_URL: '/', // 页面路由基础路径 /*/*/,eg:/lw/,不支持 ’./‘形式的路径
- BASE_API: API,
- _ISGZIP: true, // 是否开启gzip压缩
- _ISCDN: true, // 是否开启cdn加速
- // PRIVIEW_URL: 'https://dev.linkwechat.net/fileView/onlinePreview?url=', // kkfileview,素材预览服务地址
- // _ISCDN: false, // 是否开启cdn加速
- },
- test: {
- DOMAIN: URL,
- DOMAIN_MOBILE: 'https://xy.gooki.com/mobile',
- BASE_URL: '/', // 路由基础路径
- BASE_API: API,
- _ISGZIP: true,
- _ISCDN: true,
- },
- production: {
- DOMAIN: URL,
- DOMAIN_MOBILE: 'https://xy.gooki.com/mobile',
- BASE_URL: '/', // 路由基础路径
- BASE_API: API,
- _ISGZIP: true,
- _ISCDN: true,
- },
- }
- // export const env = envs[process.env.VUE_APP_ENV]
- let _env = {}
- if (process.env.NODE_ENV == 'development' || !globalThis.document) {
- // 本地开发和构建(vite)时使用
- _env = envs[process.env.VUE_APP_ENV]
- _env.ENV = process.env.VUE_APP_ENV
- } else {
- // 打包后,根据访问域名动态判断环境
- let mode = Object.keys(envs).find((e) => envs[e].DOMAIN === window?.location.origin)
- _env = envs[mode]
- _env.ENV = mode // 前端系统环境模式 development,test,production
- }
- export const env = _env
- // console.log(1, env)
- // module.exports = env
|