|
@@ -605,22 +605,26 @@
|
|
|
return Y + M + D;
|
|
|
}
|
|
|
|
|
|
- function showPageCount (data) {
|
|
|
- if (!window.pageCountFn) {
|
|
|
- window.pageCountFn = new Page({
|
|
|
- show: 5,
|
|
|
- total: data.count,
|
|
|
- size: data.pageSize,
|
|
|
- click: function (number, type) {
|
|
|
- var $Index = $(".order_tab span.tab_item.active").index();
|
|
|
- orderListForVue.changeAjaxParams({
|
|
|
- tabIndex: $Index,
|
|
|
- pageNum: number
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- pageCountFn.init()
|
|
|
+ function showPageCount (data, pageNum) {
|
|
|
+ if (!window.clonePageTemplate) {
|
|
|
+ window.clonePageTemplate = $('.pagination-box').clone().html()
|
|
|
}
|
|
|
+ $('.pagination-box').html(window.clonePageTemplate)
|
|
|
+
|
|
|
+ window.pageCountFn = new Page({
|
|
|
+ show: 5,
|
|
|
+ now: pageNum || 1,
|
|
|
+ total: data.count,
|
|
|
+ size: data.pageSize,
|
|
|
+ click: function (number, type) {
|
|
|
+ var $Index = $(".order_tab span.tab_item.active").index();
|
|
|
+ orderListForVue.changeAjaxParams({
|
|
|
+ tabIndex: $Index,
|
|
|
+ pageNum: number
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ pageCountFn.init()
|
|
|
}
|
|
|
|
|
|
var orderListForVue = new Vue({
|
|
@@ -1318,7 +1322,7 @@
|
|
|
})
|
|
|
_this.$set(_this.$data, 'list', data.res)
|
|
|
$(".pagination-box").show()
|
|
|
- showPageCount(data)
|
|
|
+ showPageCount(data, _this.pageNum)
|
|
|
if (data.count <= data.pageSize) {
|
|
|
$(".pagination-box").hide()
|
|
|
}
|