Commit c79f0ccd authored by liboyang's avatar liboyang

解决页面访问不到css和js的bug

parent 8e356ca0
...@@ -153,7 +153,6 @@ public class UserInfoApi { ...@@ -153,7 +153,6 @@ public class UserInfoApi {
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
boolean flag = false; boolean flag = false;
flag = sysRoleService.addRole(sysRole); flag = sysRoleService.addRole(sysRole);
System.out.println(sysRole.getId());
if (flag){ if (flag){
map.put("resultMsg","添加成功"); map.put("resultMsg","添加成功");
......
...@@ -27,7 +27,12 @@ public class ShiroConfig { ...@@ -27,7 +27,12 @@ public class ShiroConfig {
//拦截器. //拦截器.
Map<String,String> filterChainDefinitionMap = new LinkedHashMap<String,String>(); Map<String,String> filterChainDefinitionMap = new LinkedHashMap<String,String>();
// 配置不会被拦截的链接 顺序判断 // 配置不会被拦截的链接 顺序判断
filterChainDefinitionMap.put("/favicon.ico", "anon");
filterChainDefinitionMap.put("/static/**", "anon"); filterChainDefinitionMap.put("/static/**", "anon");
filterChainDefinitionMap.put("/css/**", "anon");
filterChainDefinitionMap.put("/js/**", "anon");
filterChainDefinitionMap.put("/fonts/**", "anon");
filterChainDefinitionMap.put("/images/**", "anon");
//配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了 //配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了
filterChainDefinitionMap.put("/logout", "logout"); filterChainDefinitionMap.put("/logout", "logout");
//<!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边 -->:这是一个坑呢,一不小心代码就不好使了; //<!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边 -->:这是一个坑呢,一不小心代码就不好使了;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
a{
text-decoration:none;
}
\ No newline at end of file
function Cp(){
this.xxk = function(){
$(".xxk").css('display','none');
$(".xxk:eq(0)").css('display','block');
$('.xxknav').on('click',function(){
var index = $('.xxknav').index($(this));
$(".xxk").css('display','none');
$(".xxk:eq("+index+")").css('display','block');
$('.xxknav').removeClass('active');
$(this).addClass('active');
})
}
this.AddYs = function(){
var This = this;
$('#addysbtn').on('click',function(){
var viewstr = '<div class="yswrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">颜色图片</label>'+
'<div class="col-xs-4">'+
'<input type="file" class="form-control" name="ystp">'+
'</div>'+
'<label class="col-xs-2 control-label">颜色主图</label>'+
'<div class="col-xs-4">'+
'<input type="file" class="form-control" name="yszt">'+
'</div>'+
' </div>'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">颜色名称</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="ysmc">'+
' </div>'+
'<div class="col-xs-4 col-xs-offset-2">'+
'<a class="btn btn-danger ysdel">删除</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#yscontainer').append(newob);
This.ysDel();
})
}
this.ysDel = function(){
$(".ysdel").on('click',function(){
var wrapper = $(this).parent().parent().parent();
wrapper.remove();
})
}
this.AddCC = function(){
var This = this;
$('#addccbtn').on('click',function(){
var viewstr = '<div class="ccwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">尺寸</label>'+
'<div class="col-xs-6">'+
'<input type="text" class="form-control" name="ccmc">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="btn btn-danger ccdel">删除</a>'+
'</div>'+
' </div>'+
'</div>';
var newob = $(viewstr);
$('#cccontainer').append(newob);
This.delCC();
})
}
this.delCC = function(){
$('.ccdel').on('click',function(){
$(this).parent().parent().parent().remove();
})
}
this.AddXt = function(){
var This = this;
$('#addxtbtn').on('click',function(){
var viewstr = '<div class="xtwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">产品详图</label>'+
'<div class="col-xs-6">'+
'<input type="file" class="form-control" name="cpxt">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="btn btn-danger xtdel">删除</a>'+
'</div>'+
' </div>'+
'</div>';
var newob = $(viewstr);
$('#xtcontainer').append(newob);
This.delXT();
})
}
this.delXT = function(){
$('.xtdel').on('click',function(){
$(this).parent().parent().parent().remove();
})
}
this.AddQm = function(){
var This = this;
$('#addqmbtn').on('click',function(){
var viewstr = '<div class="qmwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">签名价格</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="qmjg">'+
'</div>'+
'<label class="col-xs-2 control-label">签名周期</label>'+
'<div class="col-xs-4">'+
'<input type="number" class="form-control" name="qmzq" value="1">'+
'</div>'+
' </div>'+
'<div class="form-group">'+
'<label class="col-xs-2 control-label">签名描述</label>'+
'<div class="col-xs-4">'+
'<input type="text" class="form-control" name="qmms">'+
' </div>'+
'<div class="col-xs-4 col-xs-offset-2">'+
'<a class="btn btn-danger qmdel">删除</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#qmcontainer').append(newob);
This.qmDel();
})
}
this.qmDel = function(){
$(".qmdel").on('click',function(){
var wrapper = $(this).parent().parent().parent();
wrapper.remove();
})
}
this.addCllb = function(){
var This = this;
$('#addcllbbtn').on('click',function(){
var viewstr = '<div id="clwrapper" style="padding-top:30px;margin-top:30px; border:2px solid #cccccc">'+
'<div class="form-group">'+
'<label class="col-xs-3 control-label">材料类别名称</label>'+
'<div class="col-xs-5">'+
'<input type="text" class="form-control" name="cllbmc">'+
'</div>'+
'<div class="col-xs-4">'+
'<a class="cllbdel btn btn-danger" style="width:40%;margin-right:10px">删除</a>'+
'<a class="addclxqbtn btn btn-danger" style="width:40%">添加材料详情</a>'+
'</div>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$('#clcontainer').append(newob);
This.addClxq();
This.delCllb();
})
}
this.addClxq = function(){
var This = this;
$(".addclxqbtn").on('click',function(){
var viewstr ='<div class="form-group">'+
'<label class="col-xs-1 control-label">图片</label>'+
'<div class="col-xs-3">'+
'<input type="file" class="form-control" name="cltp">'+
'</div>'+
'<label class="col-xs-1 control-label">名称</label>'+
'<div class="col-xs-2">'+
'<input type="text" class="form-control" name="clmc">'+
'</div>'+
'<label class="col-xs-1 control-label">描述</label>'+
'<div class="col-xs-2">'+
'<input type="text" class="form-control" name="clms">'+
'</div>'+
'<div class="col-xs-2">'+
'<a class="btn btn-danger delclxqbtn">删除</a>'+
'</div>'+
'</div>';
var newob = $(viewstr);
$(this).parent().parent().parent().append(newob);
This.delClXq();
})
}
this.delClXq = function(){
$('.delclxqbtn').on('click',function(){
$(this).parent().parent().remove();
})
}
this.delCllb = function(){
$(".cllbdel").on('click',function(){
$(this).parent().parent().parent().remove();
})
}
}
\ No newline at end of file
function Lx(){
this.CheckForm = function(){
var This = this;
$('#sbutton').on('click',function(){
var promise = This.getPromise();
promise.done(function(res){
if(res){
$('#f').submit();
}
else{
$('#viewmessage').html("父类选择错误,不应选择其子孙类");
}
})
})
}
this.getPromise = function(){
var promise = $.ajax({
url:'CheckUpdateLx',
Type:'POST',
dataType:'json',
data:{
sid:$('#iv').val(),
pid:$('#ip').val()
}
});
return promise;
}
}
\ No newline at end of file
function Sj(){
this.getPromise = function(url,params){
var promise = $.ajax({
url:url,
dataType:'json',
type:'POST',
data:params
})
return promise;
}
this.ComPageView = function(url,params,id,id2){
var This = this;
var promise = this.getPromise(url,params);
promise.done(function(res){
var pagecount = res.pagecounts;
var currpage = res.currpage;
This.comPageNav(pagecount,id,currpage);
This.comSjTable(res.sjs,id2);
This.ListenerNb();
This.ListenerNlAndNr(currpage,pagecount);
});
}
this.comPageNav = function(pagecount,id,currpage){
var str = "";
str+='<li>'+
'<a href="#" aria-label="Previous" id="nl">'+
'<span aria-hidden="true">&laquo;</span>'+
'</a>'+
'</li>';
for(var i=1;i<=pagecount;i++){
if(i==currpage){
str+='<li class="active nb"><a href="#">'+i+'</a></li>';
}
else{
str+='<li class="nb"><a href="#">'+i+'</a></li>';
}
}
str+='<li>'+
'<a href="#" aria-label="Next" id="nr">'+
'<span aria-hidden="true">&raquo;</span>'+
'</a>'+
'</li>';
$(id).html(str);
}
this.comSjTable = function(arr,id){
var str = "";
str+='<tr>'+
'<th>图片</th>'+
'<th>名称</th>'+
'<th>操作</th>'+
'</tr>';
for(var i=0;i<arr.length;i++){
var ob = arr[i];
var sjmc = ob.sjmc;
var sjtp = ob.sjtp;
str+='<tr>'+
'<td><img src="'+sjtp+'"/></td>'+
'<td>'+sjmc+'</td>'+
'<td><a href="ForwardUpdateSj?sjid='+ob.id+'" class="btn btn-warning" >操作</a></td>'+
'</tr>';
}
console.log(str);
$(id).html(str);
}
this.ListenerNb = function(){
var This = this;
$('.nb').on('click',function(){
var c = $('.nb').index($(this))+1;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
})
}
this.ListenerNlAndNr = function(currpage,pagecounts){
var This = this;
$("#nl").on('click',function(){
if(currpage>1){
var c = --currpage;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
}
})
$("#nr").on('click',function(){
if(currpage<pagecounts){
var c = ++currpage;
This.ComPageView("SjQueryPage",{page:c},'#nav','#sjdata');
}
})
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
}) })
</script> </script>
</head> </head>
<body background="@{/images/body_bg5.jpg}"> <body background="images\body_bg5.jpg">
错误信息:<h4 th:text="${msg}"></h4>
<div class="container"> <div class="container">
<div id="login" class="row"> <div id="login" class="row">
<div class="col-xs-6 col-xs-offset-3"> <div class="col-xs-6 col-xs-offset-3">
...@@ -27,7 +26,9 @@ ...@@ -27,7 +26,9 @@
</div> </div>
<div class="panel-body" style="background: rgba(0, 0, 0, 0.1); box-shadow: 10px 10px 5px #888888"> <div class="panel-body" style="background: rgba(0, 0, 0, 0.1); box-shadow: 10px 10px 5px #888888">
<form class="form-horizontal" action="userLogin" method="POST"> <form class="form-horizontal" action="userLogin" method="POST">
<div class="form-group"></div> <div class="form-group">
<h4 th:text="${msg}"></h4>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-xs-3 control-label">用户名</label> <label class="col-xs-3 control-label">用户名</label>
<div class="col-xs-9"> <div class="col-xs-9">
......
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
<form action="" th:action="@{/roleInfoAdd}" method="post"> <form action="" th:action="@{/roleInfoAdd}" method="post">
<p>角色名称:<input type="text" name="role" value="vip"/></p> <p>角色名称:<input type="text" name="role" value="vip"/></p>
<p>角色描述:<input type="text" name="description" value="会员"/></p> <p>角色描述:<input type="text" name="description" value="会员"/></p>
<p><input type="hidden" name="permissions"/></p>
<p>分配权限:<span th:each="roleList:${userInfo.roleList}"> <p>分配权限:<span th:each="roleList:${userInfo.roleList}">
<span th:each="permList:${roleList.permissions}"> <span th:each="permList:${roleList.permissions}">
<input type="checkbox" name="permissions" value="${permList.id}"><span th:text="${permList.name}"></span> <input type="checkbox" name="${permList.name}" value="${permList.id}"><span th:text="${permList.name}"></span>
</span> </span>
</span> </span>
</p> </p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment