Commit 41deb6a5 by 胡悦

修改样式

1 parent 0f431a53
...@@ -61,3 +61,6 @@ ...@@ -61,3 +61,6 @@
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.align-center {
text-align: center;
}
\ No newline at end of file \ No newline at end of file
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
// table搜索 // table搜索
$('#tableSearch').on('click', function() { $('#tableSearch').on('click', function() {
var search = $('#tableSearchForm').val() search = $('#tableSearchForm').val()
console.log(search) console.log(search)
getSecondTable(subMerchantTable, { keyword: search }) getSecondTable(subMerchantTable, { keyword: search })
}) })
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<body> <body>
<div class="merchant" id="app"> <div class="merchant" id="app">
<main> <main class="bg-white">
<!-- <div id="tree"></div> --> <!-- <div id="tree"></div> -->
<div class="context-block"> <div class="context-block">
<div class="search-block"> <div class="search-block">
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</form> </form>
</div> </div>
<table class="layui-table" id="merchantTable" lay-filter="merchant-table-filter"></table> <table class="layui-table" id="merchantTable" lay-filter="merchant-table-filter"></table>
<div id="merchantPage"></div> <div id="merchantPage" class="align-center"></div>
</div> </div>
</main> </main>
</div> </div>
...@@ -154,20 +154,27 @@ ...@@ -154,20 +154,27 @@
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
} }
var lastPageLimit = ''
var pageOptions = { var pageOptions = {
elem: 'merchantPage', elem: 'merchantPage',
groups: 5, groups: 5,
layout: ['limit', 'count', 'page', 'skip'], layout: ['count', 'page', 'skip'],
jump: function (obj, first) { jump: function (obj, first) {
//obj包含了当前分页的所有参数,比如: //obj包含了当前分页的所有参数,比如:
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。 console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数 console.log(obj.limit); //得到每页显示的条数
page.pageNum = obj.curr page.pageNum = obj.curr
page.pageSize = obj.limit page.pageSize = obj.limit
lastPageSize = obj.limit
// getTabelList() // getTabelList()
//首次不执行 //首次不执行
if (!first) { if (!first) {
if (obj.limit == lastPageLimit) {
getTabelList()
} else {
getTabelList(true)
lastPageLimit = obj.limit
}
//do something //do something
getTabelList() getTabelList()
} }
...@@ -423,7 +430,7 @@ ...@@ -423,7 +430,7 @@
} }
}) })
var options = { var options = {
data: data.data data: data.data,
} }
pageOptions.count = data.count pageOptions.count = data.count
if (isResetPageNum) { if (isResetPageNum) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!