对环境的处理

This commit is contained in:
daihh
2023-04-06 15:24:54 +08:00
parent 005b3e6270
commit ad341dec86
2 changed files with 10 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ let scormPlayer='';
if(process.env.NODE_ENV === 'development'){
//本地开发环境
apiBaseUrl = '/systemapi';
manageApiBaseUrl ='/manageApi';
oldApiBaseUrl = '/uboeApi';
statApiBaseUrl='/statApi';
socialApiBaseUrl='/socialApi';
@@ -24,10 +25,11 @@ if(process.env.NODE_ENV === 'development'){
}else if(process.env.ENV_TYPE === 'preview'){
// 预发布环境,当前配置未使用上
context='/mobile-release';
apiBaseUrl = '/systemapi';
apiBaseUrl = '/systemapi-release';
manageApiBaseUrl ='/manageApi-release';
oldApiBaseUrl = '/uboeApi';
statApiBaseUrl='/statApi';
socialApiBaseUrl='/socialApi';
statApiBaseUrl='/statApi-release';
socialApiBaseUrl='/socialApi-release';
fileUrl = 'https://u.boe.com/upload';
loginPath='https://u.boe.com/m/loginuser';
scormPlayer='https://u.boe.com/newscorm/scorm-player';
@@ -43,6 +45,7 @@ if(process.env.NODE_ENV === 'development'){
}else{
// 生产环境
apiBaseUrl = '/systemapi';
manageApiBaseUrl ='/manageApi';
oldApiBaseUrl = '/uboeApi';
statApiBaseUrl='/statApi';
socialApiBaseUrl='/socialApi';

View File

@@ -253,6 +253,10 @@
},
onLoad() {
//this.$watermark.set('');
//用于测试打印当前环境是否正确
console.log(this.$config.apiBaseUrl);
console.log(this.$config.context);
console.log(this.$config.manageApiBaseUrl);
},
onShow() {
this.countNoReadMsg();