From 6c156336c4dffb9e4f2566d04389e1e124ec7b06 Mon Sep 17 00:00:00 2001 From: shenzi Date: Wed, 3 Jan 2018 19:50:19 +0800 Subject: [PATCH] 提交 --- WebContent/WEB-INF/jsp/pc/activity/activityList.jsp | 76 +++++++++++++++++++++++++++++++++++++++------------------------------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp index 8429f9d..d77c642 100644 --- a/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp +++ b/WebContent/WEB-INF/jsp/pc/activity/activityList.jsp @@ -65,41 +65,43 @@ var data = data.data; console.log(data) $("#tablelist").html(""); - if(data.rows.length < 1) { - $(".nodata").show(); - } else { - $(".nodata").hide(); - var str = ""; - for(var i = 0; i < data.rows.length; i++) { - str += '' + - '' + ((data.page - 1) * data.pageSize + i + 1) + '' + - '' + - '' + data.rows[i].title + '' + - '' + toType(data.rows[i].type) + '' + - '' + toTime_G(data.rows[i].createdtime) + '' + - '' + - '修改' + - '删除' + - '' + - ''; - } - $("#tablelist").html(str); - form.render(); - toNull_G(); - } - laypage.render({ - elem: 'page', - count: data.total, - limit: queryObj.pagesize, - curr: queryObj.page, - layout: ['count', 'prev', 'page', 'next', 'skip'], - jump: function(obj, first) { - if(!first) { - queryObj.page = obj.curr - initData(queryObj); + if(data.code == 0) { + if(data.rows.length < 1) { + $(".nodata").show(); + } else { + $(".nodata").hide(); + var str = ""; + for(var i = 0; i < data.rows.length; i++) { + str += '' + + '' + ((data.page - 1) * data.pageSize + i + 1) + '' + + '' + + '' + data.rows[i].title + '' + + '' + toType(data.rows[i].type) + '' + + '' + toTime_G(data.rows[i].createdtime) + '' + + '' + + '修改' + + '删除' + + '' + + ''; } + $("#tablelist").html(str); + form.render(); + toNull_G(); } - }) + laypage.render({ + elem: 'page', + count: data.total, + limit: queryObj.pagesize, + curr: queryObj.page, + layout: ['count', 'prev', 'page', 'next', 'skip'], + jump: function(obj, first) { + if(!first) { + queryObj.page = obj.curr + initData(queryObj); + } + } + }) + } }) } @@ -172,12 +174,12 @@ layer.close(index); }); }); - + //专区类型转换 - function toType(t){ - if(t == 1){ + function toType(t) { + if(t == 1) { return t = "活动介绍" - }else{ + } else { return t = "福利专区" } } -- libgit2 0.24.0