1234567891011121314151617181920212223242526272829303132 |
- /**
- * 配置通用
- */
- const node_dev = process.env.H_NODE_ENV;
- let baseUrl = '/api/serviceapi',
- wxAppid = 'wx6490eaa0d20d2be2', //
- staticUrl = 'https://minio.wdzzgs.com/greattransition/staticfile',
- redirectUri = encodeURIComponent('https://greath5.dev.gztjy.top/greatgroup/pages/login/login'),
- authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppid}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`,
- upFileUrl = 'https://serviceapi.wdzzgs.com/thirdapi/upload/single/minio';
- if (node_dev) {
- if(process.env.H_NODE_ENV=='production'){
- redirectUri = encodeURIComponent('https://h5.wdzzgs.com/greatgroup/pages/login/login')
- };
- (baseUrl = process.env.H_BASE_URL), (upFileUrl = process.env.H_UP_FILE_URL), (authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxAppid}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`);
- }
- const commonConfig = {
- wxAppid: wxAppid, // 测试wxAppid
- baseUrl: baseUrl, // 服务器地址
- uploadFileUrl: upFileUrl, // 上传文件路径
- staticUrl:staticUrl,
- authUrl:authUrl,
- paginationConfig:{
- pageNum: 1,
- pageSize: 10
- },//分页参数
- successCode:200,//接口返回状态
- }
- export {
- commonConfig
- }
|