mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
多环境测试
This commit is contained in:
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/systemapi'
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/preview'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
|
||||
|
||||
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/systemapi'
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com'
|
||||
VUE_APP_BOE_WEB_URL = 'https://u.boe.com/production'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com'
|
||||
|
||||
26
.env.testing
Normal file
26
.env.testing
Normal file
@@ -0,0 +1,26 @@
|
||||
# 生产环境配置
|
||||
ENV = 'testing'
|
||||
|
||||
# 管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/systemapi'
|
||||
|
||||
# BOE管理系统/开发环境
|
||||
VUE_APP_BOE_BASE_API = '/uboeApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com/testing'
|
||||
|
||||
# BOE 移动端url
|
||||
VUE_APP_BOE_MOBILE_URL = 'http://u-pre.boe.com'
|
||||
|
||||
# File路径的基础url
|
||||
VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload'
|
||||
|
||||
# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置
|
||||
VUE_APP_FILE_RELATIVE_PATH = '/upload'
|
||||
|
||||
# 虚拟目录的变量,结尾的/在vue.config.js中添加
|
||||
VUE_APP_PUBLIC_PATH='/pc'
|
||||
|
||||
# 登录地址
|
||||
VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:testing": "vue-cli-service serve --mode testing",
|
||||
"serve:preview": "vue-cli-service serve --mode preview",
|
||||
"build": "vue-cli-service build",
|
||||
"build:development": "vue-cli-service build --mode development",
|
||||
"build:preview": "vue-cli-service build --mode preview",
|
||||
|
||||
@@ -5,20 +5,6 @@ export const deepCopy = (obj) => {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
};
|
||||
|
||||
/**文件的基础路径*/
|
||||
export function getFileBaseUrl() {
|
||||
let protocol=window.location.protocol;
|
||||
let configPath=process.env.VUE_APP_FILE_BASE_URL;
|
||||
let baseUrl='';
|
||||
if(configPath.startsWith('http')){
|
||||
baseUrl = configPath;
|
||||
}else{
|
||||
let domain = window.location.host;
|
||||
baseUrl = protocol+'//'+domain+configPath;
|
||||
}
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取url协议
|
||||
* @param {Object} type
|
||||
|
||||
@@ -293,7 +293,7 @@ import ad from '@/components/Portal/adFloat.vue';
|
||||
import interactRowBar from '@/components/Portal/interactRowBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import { toScore,getFileBaseUrl} from '@/utils/tools.js';
|
||||
import { toScore} from '@/utils/tools.js';
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
|
||||
@@ -331,8 +331,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//console.log(getFileBaseUrl(),'getFileBaseUrl')
|
||||
console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
||||
//console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址');
|
||||
this.getCourseData(1);
|
||||
this.getCaseData();
|
||||
this.getArticleData();
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import loginApi from "@/api/login";
|
||||
import constants from '@/utils/constants'
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['portalLoginRememberMe'])
|
||||
@@ -68,7 +67,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(constants,'this.$constants.fileBaseUrl');
|
||||
//console.log(process.env,'process.env');
|
||||
this.refreshCode();
|
||||
if(this.portalLoginRememberMe && this.portalLoginRememberMe.rememberMe){
|
||||
this.rememberMe = true;
|
||||
|
||||
Reference in New Issue
Block a user