Commit dbc886a6 authored by clone's avatar clone

bug

parent 5771696c
...@@ -48,6 +48,7 @@ class Basic extends Controller ...@@ -48,6 +48,7 @@ class Basic extends Controller
"api/bannerList", "api/bannerList",
"api/averagePriceAndTurnover", "api/averagePriceAndTurnover",
"api/getBroker", "api/getBroker",
"api/brokerDetail",
); );
/** /**
......
...@@ -70,7 +70,7 @@ class Transfer extends Basic ...@@ -70,7 +70,7 @@ class Transfer extends Basic
$fields = 'id,shop_name,manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time,status'; $fields = 'id,shop_name,manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time,status';
$data['list'] = $sublet->getSublet($pageNo, $pageSize, '', $fields, $where); $data['list'] = $sublet->getSublet($pageNo, $pageSize, 'id desc', $fields, $where);
$data['total'] = $sublet->getSubletTotal($where); $data['total'] = $sublet->getSubletTotal($where);
return $this->response($data['status'], $data['msg'], $data); return $this->response($data['status'], $data['msg'], $data);
} }
......
define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','paginationStart'], function (doT, template) { define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','paginationStart'], function (doT, template) {
user = { user = {
pageNo: 1, /*第几页*/ pageNo: 1, /*第几页*/
pageSize: 15, /*每页显示多少条*/ pageSize: 10, /*每页显示多少条*/
urls: '', urls: '',
init: function () { init: function () {
...@@ -102,7 +102,7 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','pa ...@@ -102,7 +102,7 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','pa
$ ("#sublet_list").html (doTtmpl (data.data.list)); $ ("#sublet_list").html (doTtmpl (data.data.list));
/*分页代码*/ /*分页代码*/
/* $ ("#pagediv").pagination ({ $ ("#pagediv").pagination ({
length: data.data.total, length: data.data.total,
current: pageNo, current: pageNo,
coping:true, coping:true,
...@@ -110,10 +110,10 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','pa ...@@ -110,10 +110,10 @@ define (['doT', 'text!temp/transfer_template_tpl.html', 'css!style/home.css','pa
onClick: function (el) { onClick: function (el) {
user.getList (el.num.current); user.getList (el.num.current);
} }
});*/ });
pagination_pages = Math.ceil(data.data.total/user.pageSize); /* pagination_pages = Math.ceil(data.data.total/user.pageSize);
pagination_totals = data.data.total; pagination_totals = data.data.total;
addpage(user.getList); addpage(user.getList);*/
} }
}); });
}, },
......
...@@ -8,7 +8,16 @@ var pagination_pagesize = 15; //每页显示多少条 ...@@ -8,7 +8,16 @@ var pagination_pagesize = 15; //每页显示多少条
function addpage(methodName) { function addpage(methodName) {
if (pagination_page_no > pagination_pages) pagination_page_no = pagination_pages; if (pagination_page_no > pagination_pages) pagination_page_no = pagination_pages;
$('.pageinfo').pagination({ $ (".pageinfo").pagination ({
length: data.data.total,
current: pageNo,
coping:true,
every: user.pageSize,
onClick: function (el) {
user.getList (el.num.current);
}
});
/* $('.pageinfo').pagination({
pages: pagination_pages, //总页数 pages: pagination_pages, //总页数
styleClass: ['pagination-large'], styleClass: ['pagination-large'],
showCtrl: true, showCtrl: true,
...@@ -20,7 +29,7 @@ function addpage(methodName) { ...@@ -20,7 +29,7 @@ function addpage(methodName) {
methodName(); methodName();
} }
} }
}); });*/
/* /*
$('.pageinfo').find('span:contains(共)').append("(" + pagination_totals + "条记录)"); $('.pageinfo').find('span:contains(共)').append("(" + pagination_totals + "条记录)");
......
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