自己写一套权限控制,去掉spring security

This commit is contained in:
暮光:城中城
2019-05-29 23:03:30 +08:00
parent 25b4089a8f
commit c3b3b60d93
29 changed files with 1008 additions and 520 deletions

View File

@@ -30,8 +30,8 @@ var _evt = function () {
var _fn = {
href: href,
HOST: EVT + 'local.zyplayer.com:8083/zyplayer-doc-manage', //这里设置接口域名
HOST1: EVT + 'local.zyplayer.com:8083', //设置多个接口域名
HOST: EVT + 'local.zyplayer.com:8084', //这里设置接口域名
HOST1: EVT + 'local.zyplayer.com:8084', //设置多个接口域名
mixUrl: function (host, url) {
var p;
if (!host || !url || _fn.isEmptyObject(url)) {

View File

@@ -1,11 +1,11 @@
const user = {
isLogin: true,
};
const app = {};
const vue = {};
const fullscreen = false;
export default {
app,
vue,
user,
fullscreen,
}

View File

@@ -19,12 +19,12 @@ export default {
},
validateResult: function (res, callback) {
if (res.data.errCode == 400) {
global.app.$message('请先登录');
global.app.$router.push("/user/login");
global.vue.$message('请先登录');
global.vue.$router.push("/user/login");
} else if (res.data.errCode == 402) {
global.app.$router.push("/common/noAuth");
global.vue.$router.push("/common/noAuth");
} else if (res.data.errCode !== 200) {
global.app.$message(res.data.errMsg || "未知错误");
global.vue.$message(res.data.errMsg || "未知错误");
} else {
if (typeof callback == 'function') {
callback(res.data);
@@ -34,7 +34,7 @@ export default {
post: function (url, param, callback) {
param = param || {};
param.accessToken = this.getAccessToken();
global.app.axios({
global.vue.axios({
method: "post",
url: url,
headers: {'Content-type': 'application/x-www-form-urlencoded'},

View File

@@ -7,14 +7,14 @@ import global from '../../config/global'
*/
export default {
notOpen: function () {
global.app.$message({
global.vue.$message({
message: '该功能暂未开放,敬请期待!',
type: 'warning',
showClose: true
});
},
success: function (msg, time) {
global.app.$message({
global.vue.$message({
message: msg,
duration: time || 3000,
type: 'success',
@@ -22,7 +22,7 @@ export default {
});
},
warn: function (msg, time) {
global.app.$message({
global.vue.$message({
message: msg,
duration: time || 3000,
type: 'warning',
@@ -30,7 +30,7 @@ export default {
});
},
error: function (msg, time) {
global.app.$message({
global.vue.$message({
message: msg,
duration: time || 3000,
type: 'error',