UNPKG

react-app-shell

Version:

react打包脚本和example, 这里的版本请忽略

146 lines (144 loc) 6.89 kB
const config = { // 开发集成环境 dev: { env: 'dev', // 存储用户状态的cookie cookie: { userIdKey: 'userId', userTokenKey: 'passToken', wechatTokenKey: 'wxToken', mainOpenIdKey: 'mainOpenId', // 主公众号 activityOpenIdKey: 'activityOpenId', // 活动公众号 bonnyOpenIdKey: 'bonnyOpenIdKey', // BONNY 魔小兔公众号 nicknameKey: 'nickname', // 微信昵称 domain: '.dev.mmears.com', expiresDays: 3650 // 过期时间默认10年 }, // 域名配置 domain: { baseDomain: 'https://apistaging.mmears.com', // 新接口域名 mobileDomain: 'https://staging.mmears.com' // 移动端域名 }, // 资源配置 resources: { ossDomain: 'http://activity-staging.mmears.cn', // oss 域名地址 monitorUrl: 'https://shence.mmears.com/sa?project=default', // 前端监控, 神策埋点配置 protocolUrl: 'http://dev.mmears.com/static/about_us/protocol_wap.html', // 用户协议 mainUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 测试环境使用魔力好家长公众号 用户主动授权链接 activityUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 测试环境使用魔力好家长公众号 用户主动授权链接 bonnyUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx485de8098758f745', // 测试环境使用魔力兔陪练公众号 用户主动授权链接 bookingUrl: 'http://dev.mmears.com/user/booking', // 约课地址 loginUrl: 'https://dev.mmears.com/user/login' // 跳转登陆页 } }, // 测试环境 staging: { env: 'staging', // 存储用户状态的cookie cookie: { userIdKey: 'userId', userTokenKey: 'passToken', wechatTokenKey: 'wxToken', mainOpenIdKey: 'mainOpenId', // 主公众号 activityOpenIdKey: 'activityOpenId', // 活动公众号 bonnyOpenIdKey: 'bonnyOpenIdKey', // BONNY 魔小兔公众号 nicknameKey: 'nickname', // 微信昵称 domain: '.staging.mmears.com', expiresDays: 3650 // 过期时间默认10年 }, // 域名配置 domain: { baseDomain: 'https://apistaging.mmears.com', // 新接口域名 mobileDomain: 'https://staging.mmears.com' // 移动端域名 }, // 资源配置 resources: { ossDomain: 'http://activity-staging.mmears.cn', // oss 域名地址 monitorUrl: 'https://shence.mmears.com/sa?project=default', // 前端监控, 神策埋点配置 protocolUrl: 'http://staging.mmears.com/static/about_us/protocol_wap.html', // 用户协议 mainUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 主公众号, 测试环境使用魔力好家长公众号 用户主动授权链接 activityUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 测试环境使用魔力好家长公众号 用户主动授权链接 bonnyUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx485de8098758f745', // 测试环境使用魔力兔陪练公众号 用户主动授权链接 bookingUrl: 'https://staging.mmears.com/user/booking', // 约课地址 loginUrl: 'https://staging.mmears.com/user/login' // 跳转登陆页 } }, // 生产环境 production: { env: 'production', // 存储用户状态的cookie cookie: { userIdKey: 'userId', userTokenKey: 'passToken', wechatTokenKey: 'wxToken', mainOpenIdKey: 'mainOpenId', // 主公众号 activityOpenIdKey: 'activityOpenId', // 活动公众号 bonnyOpenIdKey: 'bonnyOpenIdKey', // BONNY 魔小兔公众号 nicknameKey: 'nickname', // 微信昵称 domain: '.mobile.mmears.com', expiresDays: 3650 // 过期时间默认10年 }, // 域名配置 domain: { baseDomain: 'https://api.mmears.com', // 新接口域名 mobileDomain: 'https://mobile.mmears.com' // 移动端域名 }, // 资源配置 resources: { ossDomain: 'http://activity.mmears.cn', // oss 域名地址 monitorUrl: 'https://shence.mmears.com/sa?project=production', // 前端监控, 神策埋点配置 protocolUrl: 'https://mobile.mmears.com/static/about_us/protocol_wap.html', // 用户协议 mainUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa86689ab270599d4', // 主公众号, 魔力耳朵公众号 用户主动授权链接 activityUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdef794f7bef4dd92', // 活动公众号, 生产环境使用 '21天训练营'公众号 bonnyUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx002bb11899c2b995', // Bonny 训练营 生产环境使用 '魔小兔'公众号 bookingUrl: 'https://mobile.mmears.com/user/booking', // 约课地址 loginUrl: 'https://mobile.mmears.com/user/login' // 跳转登陆页 } } }; const envConfig = config[process.env.NODE_ENV || 'development']; const appConfig = { env: 'development', basename: process.env.PUBLIC_URL || '', // 前端项目的二级目录 // 存储用户状态的cookie cookie: { userIdKey: 'userId', userTokenKey: 'passToken', wechatTokenKey: 'wxToken', mainOpenIdKey: 'mainOpenId', // 主公众号 activityOpenIdKey: 'activityOpenId', // 活动公众号 bonnyOpenIdKey: 'bonnyOpenIdKey', // BONNY nicknameKey: 'nickname', // 微信昵称 domain: '', expiresDays: 3650 // 过期时间默认10年 }, // 域名配置 domain: { baseDomain: 'https://apistaging.mmears.com', // 新接口域名 mobileDomain: 'https://staging.mmears.com' // 移动端域名 }, // 资源配置 resources: { ossDomain: 'http://activity-staging.mmears.cn', // oss 域名地址 monitorUrl: 'https://shence.mmears.com/sa?project=default', // 前端监控, 神策埋点配置 protocolUrl: 'http://dev.mmears.com/static/about_us/protocol_wap.html', // 用户协议 mainUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 测试环境使用魔力好家长公众号 用户主动授权链接 activityUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd7ec12bd329457fb', // 测试环境使用魔力好家长公众号 用户主动授权链接 bonnyUserAuthUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx485de8098758f745', // 测试环境使用魔力兔陪练公众号 用户主动授权链接 bookingUrl: 'http://dev.mmears.com/user/booking', // 约课地址 loginUrl: 'https://dev.mmears.com/user/login' }, ...envConfig }; export default appConfig;