mirror of https://gitee.com/stylefeng/guns
# Conflicts: # src/main/webapp/assets/common/js/common.jspull/65/head
commit
bc2500c518
@ -0,0 +1,30 @@
|
||||
package cn.stylefeng.guns.modular.error;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
/**
|
||||
* 错误页面的跳转
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/1 21:20
|
||||
*/
|
||||
@Controller
|
||||
@ApiResource(name = "错误页面的跳转")
|
||||
public class ErrorViewController {
|
||||
|
||||
/**
|
||||
* 跳转到session超时页面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/1 21:21
|
||||
*/
|
||||
@GetResource(name = "跳转到session超时页面", path = "/global/sessionError", requiredPermission = false, requiredLogin = false)
|
||||
public String errorPageInfo(Model model) {
|
||||
model.addAttribute("tips", "登陆超时,请您重新登陆!");
|
||||
return "/login.html";
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
layui.define(['jquery'], function (exports) {
|
||||
var $ = layui.$;
|
||||
|
||||
var $ax = function (url, success, error) {
|
||||
this.url = url;
|
||||
this.type = "post";
|
||||
this.data = {};
|
||||
this.contentType = "application/json";
|
||||
this.dataType = "json";
|
||||
this.async = false;
|
||||
this.success = success;
|
||||
this.error = error;
|
||||
};
|
||||
|
||||
$ax.prototype = {
|
||||
start: function () {
|
||||
var me = this;
|
||||
var result = "";
|
||||
|
||||
if (this.url.indexOf("?") === -1) {
|
||||
this.url = this.url + "?jstime=" + new Date().getTime();
|
||||
} else {
|
||||
this.url = this.url + "&jstime=" + new Date().getTime();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: me.type,
|
||||
url: me.url,
|
||||
contentType: me.contentType,
|
||||
dataType: me.dataType,
|
||||
async: me.async,
|
||||
data: JSON.stringify(me.data),
|
||||
beforeSend: function (data) {
|
||||
|
||||
},
|
||||
success: function (data) {
|
||||
result = data;
|
||||
if (me.success !== undefined) {
|
||||
me.success(data);
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
if (me.error !== undefined) {
|
||||
me.error(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
set: function (key, value) {
|
||||
if (typeof key === "object") {
|
||||
for (var i in key) {
|
||||
if (typeof i === "function")
|
||||
continue;
|
||||
this.data[i] = key[i];
|
||||
}
|
||||
} else {
|
||||
this.data[key] = (typeof value === "undefined") ? $("#" + key).val() : value;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
setData: function (data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
},
|
||||
|
||||
clear: function () {
|
||||
this.data = {};
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
exports('ax', $ax);
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
@/* 页脚 */
|
||||
<div class="layui-footer">
|
||||
Copyright © 2019 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved.
|
||||
<span class="pull-right">Version 企业版 v3.4</span>
|
||||
Copyright © 2021 <a href="https://www.stylefeng.cn" target="_blank">stylefeng</a> All rights reserved.
|
||||
<span class="pull-right">Version v7</span>
|
||||
</div>
|
||||
|
||||
@/* 手机屏幕遮罩层 */
|
||||
|
Loading…
Reference in new issue