增加权限和登录跳转
This commit is contained in:
@@ -2,6 +2,7 @@ package com.zyplayer.doc.dubbo.controller;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.dubbo.controller.param.DubboRequestParam;
|
||||
import com.zyplayer.doc.dubbo.controller.vo.DubboInfoVo;
|
||||
@@ -47,6 +48,7 @@ import java.util.stream.Collectors;
|
||||
* @author 暮光:城中城
|
||||
* @since 2019年2月10日
|
||||
*/
|
||||
@AuthMan
|
||||
@RestController
|
||||
@RequestMapping("/zyplayer-doc-dubbo/doc-dubbo")
|
||||
public class DubboController {
|
||||
|
||||
@@ -27,8 +27,11 @@ function deserialize(value) {
|
||||
}
|
||||
|
||||
function validateResult(result) {
|
||||
if(result.errCode == 200) {
|
||||
if (result.errCode == 200) {
|
||||
return true;
|
||||
} else if (result.errCode == 400) {
|
||||
var href = encodeURI(window.location.href);
|
||||
window.location = "static/manage/login.html?returnUrl=" + href;
|
||||
} else {
|
||||
Toast.error(result.errMsg);
|
||||
}
|
||||
@@ -193,8 +196,13 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
data : eval(paramsStr),
|
||||
contentType : "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
success : function(msg) {
|
||||
if(typeof successFunction == "function") {
|
||||
successFunction(msg,id);
|
||||
if (msg.errCode == 400) {
|
||||
var href = encodeURI(window.location.href);
|
||||
window.location = "static/manage/login.html?returnUrl=" + href;
|
||||
} else {
|
||||
if (typeof successFunction == "function") {
|
||||
successFunction(msg, id);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeSend : function() {
|
||||
|
||||
Reference in New Issue
Block a user