|
|
@@ -14,7 +14,7 @@
|
|
|
<link rel="stylesheet" href="static/css/bootstrap.min.css">
|
|
|
<link rel="stylesheet" href="static/css/base.css">
|
|
|
<link rel="stylesheet" type="text/css" href="static/css/kkpager_orange.css" />
|
|
|
-
|
|
|
+ <link rel="stylesheet" type="text/css" href="static/lib/font-awesome/css/font-awesome.min.css"/>
|
|
|
<link href="https://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
|
|
|
<link href="static/css/swiper-3.4.2.min.css" rel="stylesheet">
|
|
|
|
|
|
@@ -82,6 +82,15 @@
|
|
|
#nav .fr a:last-child {
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
+ #logout{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ #uuName{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ #icon{
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
.main{
|
|
|
width: 100%;
|
|
|
margin: 24px 0 150px 0;
|
|
|
@@ -307,6 +316,9 @@
|
|
|
right: 10px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+ #projectList{
|
|
|
+ border:none
|
|
|
+ }
|
|
|
.section2 .list-item {
|
|
|
margin-top: 25px;
|
|
|
padding-bottom: 25px;
|
|
|
@@ -323,7 +335,7 @@
|
|
|
width: 360px;
|
|
|
height: 200px;
|
|
|
border: 1px solid #e1e1e1;
|
|
|
- background: url("static/images/link.png") no-repeat;
|
|
|
+ background: url("static/images/loading1.png") no-repeat;
|
|
|
}
|
|
|
.section2 .list-item .project-detail{
|
|
|
margin: 10px 30px 0 0;
|
|
|
@@ -695,10 +707,12 @@
|
|
|
<body ng-app="index">
|
|
|
<div id="nav">
|
|
|
<div class="container clearfix">
|
|
|
- <div class="fl"><a href=""><img src="static/images/uas.png" alt=""/></a><span style="font-size: 18px;font-weight: bold;">一元捐</span></div>
|
|
|
+ <div class="fl"><a href=""><img src="static/images/uas.png" href="http://www.ubtob.com/index"/></a><span style="font-size: 18px;font-weight: bold;">一元捐</span></div>
|
|
|
<div class="fr">
|
|
|
- <a href="https://account.ubtob.com/sso/login">登录</a>
|
|
|
- <a href="javascript:void(0)">注册</a>
|
|
|
+ <a href="javascript:void(0);" id="login">登录</a>
|
|
|
+ <a href="javascript:void(0);" id="uuName"><i class="fa fa-user fa-lg" id="icon"></i></a>
|
|
|
+ <a href="javascript:void(0)" id="register">注册</a>
|
|
|
+ <a href="javascript:void(0)" id="logout">退出</a>
|
|
|
<a href="http://www.ubtob.com/" target="_blank">进入优软云</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -787,7 +801,7 @@
|
|
|
<img src="static/images/index/search.png" alt="" id="searchButton"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div id="projectList">
|
|
|
<#if page?exists>
|
|
|
<#list page.content as project>
|
|
|
<div class="list-item clearfix">
|
|
|
@@ -854,6 +868,7 @@
|
|
|
</#list>
|
|
|
</#if>
|
|
|
<#--搜索无结果页面-->
|
|
|
+ <#if page?exists>
|
|
|
<#if page.totalElements==0>
|
|
|
<div class="section noSearch">
|
|
|
<div class="img">
|
|
|
@@ -865,6 +880,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</#if>
|
|
|
+ </#if>
|
|
|
<#-- 分页按钮-->
|
|
|
<#if (page.totalElements>0)>
|
|
|
<div id="kkpager"></div>
|
|
|
@@ -885,6 +901,77 @@
|
|
|
</div>
|
|
|
</body>
|
|
|
<script>
|
|
|
+ var returnUrl=window.location.href;
|
|
|
+ $.ajax({
|
|
|
+ url:"http://shicr.ubtob.com:8084/sso/account",
|
|
|
+ type:"GET",
|
|
|
+ success:function(data){
|
|
|
+ console.log(data);
|
|
|
+ if(data.content!=null){
|
|
|
+ $("#uuName").css("display","inline-block");
|
|
|
+ $("#icon").before(data.content.name);
|
|
|
+ $("#logout").css("display","inline-block");
|
|
|
+ $("#login").css("display","none");
|
|
|
+ $("#register").css("display","none");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error:function(){
|
|
|
+ alert('error');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //登录
|
|
|
+ $("#login").click(function(){
|
|
|
+ $.ajax({
|
|
|
+ url:"http://shicr.ubtob.com:8084/sso/login",
|
|
|
+ data:{returnUrl:returnUrl},
|
|
|
+ type:"GET",
|
|
|
+ success:function(data){
|
|
|
+ window.location.href=data.content;
|
|
|
+ $("#uuName").css("display","inline-block");
|
|
|
+ $("#icon").before(data.content.name);
|
|
|
+ $("#login").css("display","none");
|
|
|
+ $("#register").css("display","none");
|
|
|
+ $("#logout").css("display","inline-block");
|
|
|
+ $("#uuName").css("display","inline-block");
|
|
|
+ },
|
|
|
+ error:function(data){
|
|
|
+ alert('登录失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ //注册按钮点击
|
|
|
+ $("#register").click(function(){
|
|
|
+ $.ajax({
|
|
|
+ url:"http://shicr.ubtob.com:8084/sso/register",
|
|
|
+ type:"GET",
|
|
|
+ data:{returnUrl:returnUrl},
|
|
|
+ success:function(data){
|
|
|
+ window.location.href=data.content;
|
|
|
+ },
|
|
|
+ error:function(data){
|
|
|
+ alert('登录失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ //退出
|
|
|
+ $("#logout").click(function(){
|
|
|
+ $.ajax({
|
|
|
+ url:"http://shicr.ubtob.com:8084/sso/logout",
|
|
|
+ type:"GET",
|
|
|
+ data:{returnUrl:returnUrl},
|
|
|
+ success:function(data){
|
|
|
+ window.location.href=data.content;
|
|
|
+ $("#login").css("display","inline-block");
|
|
|
+ $("#register").css("display","inline-block");
|
|
|
+ $("#logout").css("display","none");
|
|
|
+ $("#uuName").css("display","none");
|
|
|
+ },
|
|
|
+ error:function(){
|
|
|
+ alert('退出失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
/*设置只能输入数字和一位小数点和一位小数点后面的两位数字*/
|
|
|
function clearNoNum(obj){
|
|
|
obj.value = obj.value.replace(/[^\d.]/g,""); //清除“数字”和“.”以外的字符
|
|
|
@@ -1011,9 +1098,13 @@
|
|
|
//返回参数值
|
|
|
return result ? decodeURIComponent(result[2]) : null;
|
|
|
}
|
|
|
+ //获取地址栏领域值
|
|
|
var area=getUrlParam('area');
|
|
|
+ //获取地址栏状态值
|
|
|
var status=getUrlParam('status');
|
|
|
+ //获取地址栏页码值
|
|
|
var pno=getUrlParam('page');
|
|
|
+ //获取地址栏搜索框值
|
|
|
var search=getUrlParam('search');
|
|
|
|
|
|
|
|
|
@@ -1059,23 +1150,26 @@
|
|
|
}
|
|
|
|
|
|
});
|
|
|
+ var address='http://lj.ubtob.com/index';
|
|
|
/*页面跳转*/
|
|
|
function searchpage(pno) {
|
|
|
if(search!=null){
|
|
|
- window.location.href="http://lj.ubtob.com/index?search="+search+"&&page="+(pno-1);
|
|
|
+ window.location.href=address+"?search="+search+"&&page="+(pno-1);
|
|
|
}else{
|
|
|
//得到被选中的领域下拉框的文本值
|
|
|
var area=$("#chooseArea").find("option:selected").text();
|
|
|
//得到被选中的状态下拉框文本值
|
|
|
var status=$("#chooseStatus").find("option:selected").text();
|
|
|
- window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status+"&&page="+(pno-1);
|
|
|
+ window.location.href=address+"?area="+area+"&&status="+status+"&&page="+(pno-1);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ //给领域下拉框赋值
|
|
|
$('#chooseArea').val(area);
|
|
|
|
|
|
+ //给状态下拉框
|
|
|
$('#chooseStatus').val(status);
|
|
|
|
|
|
+ //给搜索框赋值
|
|
|
$('#search').val(search);
|
|
|
|
|
|
//项目领域下拉框查询项目
|
|
|
@@ -1084,7 +1178,7 @@
|
|
|
var area=$("#chooseArea").find("option:selected").text();
|
|
|
//得到被选中的状态下拉框文本值
|
|
|
var status=$("#chooseStatus").find("option:selected").text();
|
|
|
- window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status;
|
|
|
+ window.location.href=address+"?area="+area+"&&status="+status;
|
|
|
})
|
|
|
|
|
|
//项目状态下拉框查询项目
|
|
|
@@ -1093,7 +1187,7 @@
|
|
|
var area=$("#chooseArea").find("option:selected").text();
|
|
|
//得到被选中的状态下拉框文本值
|
|
|
var status=$("#chooseStatus").find("option:selected").text();
|
|
|
- window.location.href="http://lj.ubtob.com/index?area="+area+"&&status="+status;
|
|
|
+ window.location.href=address+"?area="+area+"&&status="+status;
|
|
|
})
|
|
|
|
|
|
//搜索框enter键搜索框查询项目
|
|
|
@@ -1101,9 +1195,9 @@
|
|
|
if(event.keyCode==13){
|
|
|
var search=$("#search").val();
|
|
|
if(search!=""){
|
|
|
- window.location.href="http://lj.ubtob.com/index?search="+search;
|
|
|
+ window.location.href=address+"?search="+search;
|
|
|
}else{
|
|
|
- window.location.href="http://lj.ubtob.com/index";
|
|
|
+ window.location.href=address;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -1112,9 +1206,9 @@
|
|
|
$("#searchButton").click(function(){
|
|
|
var search=$("#search").val();
|
|
|
if(search!=""){
|
|
|
- window.location.href="http://lj.ubtob.com/index?search="+search;
|
|
|
+ window.location.href=address+"?search="+search;
|
|
|
}else{
|
|
|
- window.location.href="http://lj.ubtob.com/index";
|
|
|
+ window.location.href=uaddressrl;
|
|
|
}
|
|
|
|
|
|
})
|