From 91da1d7d87077400f11fbb4f9ca23fbe5224078d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 12 九月 2022 16:58:26 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/cstmr/cstmr.js | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/main/webapp/static/js/cstmr/cstmr.js b/src/main/webapp/static/js/cstmr/cstmr.js
index 1a633c9..05c23b8 100644
--- a/src/main/webapp/static/js/cstmr/cstmr.js
+++ b/src/main/webapp/static/js/cstmr/cstmr.js
@@ -1,5 +1,5 @@
var pageCurr;
-var pageCount;
+var pageCount = 0;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
@@ -149,7 +149,7 @@
if (res.code === 200){
layer.close(dIndex);
layer.msg(res.msg, {icon: 1});
- tableReload();
+ tableReload()
} else if (res.code === 403){
top.location.href = baseUrl+"/";
}else {
@@ -230,12 +230,16 @@
});
function tableReload() {
- var searchData = {};
- $.each($('#search-box [name]').serializeArray(), function() {
- searchData[this.name] = this.value;
- });
- tableIns.reload({
- where: searchData,
- page: {curr: pageCurr}
- });
+ if (pageCount === 0) {
+ let searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ tableIns.reload({
+ where: searchData,
+ page: {curr: pageCurr}
+ });
+ } else {
+ $(".layui-laypage-btn")[0].click();
+ }
}
--
Gitblit v1.9.1