自己写一套权限控制,去掉spring security
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
const user = {
|
||||
isLogin: true,
|
||||
};
|
||||
const app = {};
|
||||
const vue = {};
|
||||
const fullscreen = false;
|
||||
|
||||
export default {
|
||||
app,
|
||||
vue,
|
||||
user,
|
||||
fullscreen,
|
||||
}
|
||||
|
||||
@@ -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'},
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user