修复set'Url路由

This commit is contained in:
smallwei 2018-04-20 21:54:54 +08:00
parent f06de654e0
commit 21674c7e1f
3 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,6 @@
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
var baseUrl = 'http://127.0.0.1:9999';
var baseUrl = 'https://preview.pig4cloud.com';
module.exports = {
build: {
env: require('./prod.env'),

View File

@ -1,5 +1,6 @@
export default {
'478': '验证码错误,请重新输入',
'401': '没有权限',
'400': '用户名不存在或者密码错误',
'default': '系统未知错误,请反馈给管理员'
}

View File

@ -25,7 +25,7 @@ export const encryption = (params) => {
* 设置浏览器头部标题
*/
export const setTitle = function (title) {
title = title ? `${title}——Avue 通用管理 系统快速开发框架` : 'Avue 通用管理 系统快速开发框架';
title = title ? `${title}——Pig 微服务快速开发框架` : 'Pig 微服务快速开发框架';
window.document.title = title;
};
/**
@ -136,13 +136,6 @@ export const setUrlPath = ($route) => {
let value = "";
if ($route.query.src) {
value = $route.query.src;
if (value.indexOf(baseUrl) != -1) {
const port = value
.substr(value.lastIndexOf(":"))
.replace(value.substr(value.lastIndexOf("/")), "");
const path = value.replace(baseUrl + port, "");
value = "#" + path + port;
}
} else {
value = $route.path;
}