update
This commit is contained in:
parent
1b942cd7c0
commit
74e6b3b6db
|
|
@ -31,6 +31,9 @@ import com.smallchill.core.toolbox.kit.CacheKit;
|
||||||
public class AceExt {
|
public class AceExt {
|
||||||
|
|
||||||
public String theme() {
|
public String theme() {
|
||||||
|
if (null == ShiroKit.getUser()) {
|
||||||
|
return "ace-dark.css";
|
||||||
|
}
|
||||||
Map<String, String> theme = CacheKit.get(ConstCache.FILE_CACHE, ConstCacheKey.ACE_THEME + ShiroKit.getUser().getId(), new ILoader() {
|
Map<String, String> theme = CacheKit.get(ConstCache.FILE_CACHE, ConstCacheKey.ACE_THEME + ShiroKit.getUser().getId(), new ILoader() {
|
||||||
public Object load() {
|
public Object load() {
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
|
|
||||||
|
|
@ -136,10 +136,6 @@ public class CacheController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 根据字典编号获取下拉框
|
* 根据字典编号获取下拉框
|
||||||
*
|
*
|
||||||
* @param code
|
|
||||||
* 编号
|
|
||||||
* @param num
|
|
||||||
* 分组
|
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
|
@ -407,6 +403,9 @@ public class CacheController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/theme")
|
@RequestMapping("/theme")
|
||||||
public AjaxResult theme() {
|
public AjaxResult theme() {
|
||||||
|
if (null == ShiroKit.getUser()) {
|
||||||
|
return error("error");
|
||||||
|
}
|
||||||
Map<String, String> theme = CacheKit.get(ConstCache.FILE_CACHE, ConstCacheKey.ACE_THEME + ShiroKit.getUser().getId() , new ILoader() {
|
Map<String, String> theme = CacheKit.get(ConstCache.FILE_CACHE, ConstCacheKey.ACE_THEME + ShiroKit.getUser().getId() , new ILoader() {
|
||||||
public Object load() {
|
public Object load() {
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,11 @@
|
||||||
btn: ['确定', '取消'] //按钮
|
btn: ['确定', '取消'] //按钮
|
||||||
}, function () {
|
}, function () {
|
||||||
var ajax = new $ax("${ctxPath}/cache/theme", function(data){
|
var ajax = new $ax("${ctxPath}/cache/theme", function(data){
|
||||||
window.location.href="${ctxPath}/";
|
if (data.code === 0) {
|
||||||
|
window.location.href="${ctxPath}/";
|
||||||
|
} else {
|
||||||
|
window.location.href="${ctxPath}/login";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
ajax.start();
|
ajax.start();
|
||||||
}, function () {});
|
}, function () {});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user