|
@@ -73,10 +73,58 @@
|
|
|
<ul class="item clearfix">
|
|
|
</ul>
|
|
|
</div>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .pagination a {
|
|
|
+ float: left;
|
|
|
+ padding: 10px 9px;
|
|
|
+ border: 1px solid #EBEBEB;
|
|
|
+ margin-left: 0;
|
|
|
+ text-decoration: none;
|
|
|
+ /* border-bottom-left-radius: 4px; */
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ .pagination span {
|
|
|
+ float: left;
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
+ text-align: center;
|
|
|
+ color: #ffffff;
|
|
|
+ background-color: #2cb7ca;
|
|
|
+ margin: 0 10px;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ .disabled {
|
|
|
+ cursor: not-allowed;
|
|
|
+ color: #aea79f !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<!--分页-->
|
|
|
+ <div class="pagination clearfix w">
|
|
|
+ <div class="pagination-inner fr">
|
|
|
+ <a class="nbprev disabled" id="previousPage"><i><</i>上一页</a>
|
|
|
+ <span class="page">1</span>
|
|
|
+ <a class="nbnext" id="nextPage">下一页<i>></i></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</section>
|
|
|
{{include "/common/pcbottom.html"}}
|
|
|
{{include "/common/baiducc.html"}}
|
|
|
<script>
|
|
|
+ var totalPage;
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: "/front/dataExport/queryOrder",
|
|
|
+ dataType:'json',
|
|
|
+ success:function(data){
|
|
|
+ if (data && data.length>0){
|
|
|
+ totalPage = data[0].totalPage;
|
|
|
+ console.log(totalPage)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
$(function () {
|
|
|
selcetIndexNav(4);
|
|
|
haslogin({{.T.logid}});
|
|
@@ -94,9 +142,9 @@
|
|
|
i.style.height = ($h/$l)+'px';
|
|
|
i.style.lineHeight = ($h/$l)+'px';
|
|
|
});
|
|
|
-
|
|
|
+ var pageNum =1;
|
|
|
//获取全部订单
|
|
|
- queryOrder(0,$(".list .item").eq(0));
|
|
|
+ queryOrder(0,$(".list .item").eq(0),pageNum);
|
|
|
|
|
|
$(".tab-bar .tab li").on("click",function () {
|
|
|
var $Index = $(this).index();
|
|
@@ -106,6 +154,45 @@
|
|
|
|
|
|
queryOrder($Index,$list);
|
|
|
});
|
|
|
+
|
|
|
+ $(".tab-bar .tab li").on("click",function () {
|
|
|
+ var $Index = $(this).index();
|
|
|
+ $(this).addClass("active").siblings().removeClass("active");
|
|
|
+ var $list = $(".list .item");
|
|
|
+ $list.eq($Index).show().siblings().hide();
|
|
|
+
|
|
|
+ queryOrder($Index,$list);
|
|
|
+ });
|
|
|
+ //点击上下页
|
|
|
+ $("#previousPage").on("click",function () {
|
|
|
+ var $Index = $(".tab-bar .tab li").index();
|
|
|
+ var $list = $(".list .item");
|
|
|
+ pageNum--;
|
|
|
+ if (pageNum<=0){
|
|
|
+ pageNum=1;
|
|
|
+ }
|
|
|
+ if(pageNum==1){
|
|
|
+ $("#previousPage").addClass("disabled");
|
|
|
+ }
|
|
|
+ $("#nextPage").removeClass("disabled");
|
|
|
+ $(".page").html(pageNum)
|
|
|
+ queryOrder($Index,$list,pageNum);
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#nextPage").on("click",function () {
|
|
|
+ var $Index = $(".tab-bar .tab li").index();
|
|
|
+ var $list = $(".list .item");
|
|
|
+ pageNum++;
|
|
|
+ if(pageNum>=totalPage){
|
|
|
+ pageNum=totalPage;
|
|
|
+ $("#nextPage").addClass("disabled");
|
|
|
+ }
|
|
|
+ $("#previousPage").removeClass("disabled");
|
|
|
+
|
|
|
+ $(".page").html(pageNum)
|
|
|
+ queryOrder($Index,$list,pageNum);
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
})
|
|
|
|
|
@@ -118,11 +205,13 @@
|
|
|
"</div>";
|
|
|
|
|
|
//ind 0-全部 1-待支付 2-已支付
|
|
|
- function queryOrder(ind,objD) {
|
|
|
+ function queryOrder(ind,objD,pageNum) {
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: "/front/dataExport/queryOrder",
|
|
|
- data: {"type":ind},
|
|
|
+ data: {"type":ind,
|
|
|
+ "pageNum":pageNum
|
|
|
+ },
|
|
|
dataType: 'json',
|
|
|
success: function(data){
|
|
|
var temp = "";
|
|
@@ -311,7 +400,9 @@
|
|
|
}
|
|
|
return n+n2;
|
|
|
}
|
|
|
-
|
|
|
+ function nextPage(){
|
|
|
+ queryOrder()
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|