This commit is contained in:
zhuangqian 2016-12-24 11:37:07 +08:00
parent 1b942cd7c0
commit 74e6b3b6db
3 changed files with 12 additions and 6 deletions

View File

@ -31,6 +31,9 @@ import com.smallchill.core.toolbox.kit.CacheKit;
public class AceExt {
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() {
public Object load() {
Map<String, String> map = new HashMap<String, String>();

View File

@ -135,11 +135,7 @@ public class CacheController extends BaseController {
/**
* 根据字典编号获取下拉框
*
* @param code
* 编号
* @param num
* 分组
*
* @return String
*/
@SuppressWarnings("rawtypes")
@ -407,6 +403,9 @@ public class CacheController extends BaseController {
@ResponseBody
@RequestMapping("/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() {
public Object load() {
Map<String, String> map = new HashMap<String, String>();

View File

@ -104,7 +104,11 @@
btn: ['确定', '取消'] //按钮
}, function () {
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();
}, function () {});