提交 2845dcce 编写于 作者: tony001's avatar tony001

前后端分离部署调整

上级 c4cd4e0c
......@@ -72,7 +72,7 @@ export default class AppRichTextEditor extends Vue {
* @type {string}
* @memberof AppRichTextEditor
*/
public uploadUrl = Environment.BaseUrl + Environment.UploadFile;
public uploadUrl = Environment.UploadFile;
/**
* 下载路径
......
......@@ -92,7 +92,7 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public logout() {
const get: Promise<any> = this.$http.get('v7/logout');
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
......
......@@ -175,7 +175,7 @@ export default class Login extends Vue {
const loginname: any = this.form.loginname;
const password: any = this.form.password;
const post: Promise<any> = this.$http.post('v7/login', this.form, true);
const post: Promise<any> = this.$http.post('/v7/login', this.form, true);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
......
......@@ -963,7 +963,7 @@ export default class EntityService {
* @param isloading
*/
public async getAllApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`uaa/access-center/app-switcher/default`,data,isloading);
return Http.getInstance().get(`/uaa/access-center/app-switcher/default`,data,isloading);
}
/**
......@@ -974,7 +974,7 @@ export default class EntityService {
* @param isloading
*/
public async updateChooseApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading);
return Http.getInstance().put(`/uaa/access-center/app-switcher/default`,data,isloading);
}
/**
......@@ -985,7 +985,7 @@ export default class EntityService {
* @param isloading
*/
public async changPassword(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`v7/changepwd`,data,isloading);
return Http.getInstance().post(`/v7/changepwd`,data,isloading);
}
}
\ No newline at end of file
......@@ -2,8 +2,7 @@ import { Store } from 'vuex';
import axios from 'axios';
import Router from 'vue-router';
import i18n from '@/locale';
import { Environment } from '@/environments/environment';
/**
* 拦截器
*
......@@ -96,9 +95,9 @@ export class Interceptors {
config.headers['Authorization'] = `Bearer ${token}`;
}
config.headers['Accept-Language'] = i18n.locale;
// if (!config.url.startsWith('https://') && !config.url.startsWith('http://')) {
// config.url = Environment.BaseUrl + config.url;
// }
if (!Object.is(Environment.BaseUrl,"") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets')) {
config.url = Environment.BaseUrl + config.url;
}
return config;
}, (error: any) => {
return Promise.reject(error);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册