From a86dd0688587d19c85c9e4fb3d8e3fb60d96f28b Mon Sep 17 00:00:00 2001 From: zhangds Date: Mon, 15 Aug 2022 11:56:34 +0800 Subject: [PATCH] =?UTF-8?q?1)=20=E4=BF=AE=E6=94=B9page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/keyList/index.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/pages/plan/keyList/index.jsx b/src/pages/plan/keyList/index.jsx index f474eb73..861d8afe 100644 --- a/src/pages/plan/keyList/index.jsx +++ b/src/pages/plan/keyList/index.jsx @@ -200,6 +200,23 @@ const UseKeyList = (props, ref) => { const key_query_el = useRef(null); const plan_list_el = useRef(null); + const resParam = () => { + return new Promise((res, rej) => { + const { queryParams, limit, page } = state; + return { + ...queryParams, + limit, + page, + }; + }); + }; + + const tetxajax = () => { + resParam().then((res) => { + console.log("请求方法....", res); + }); + }; + /** * 获取table 数据 * data 兼容 react state 无同步问题!!!!!!!!!!! @@ -275,6 +292,7 @@ const UseKeyList = (props, ref) => { limit: 10, hash: null, }; + dispatch({ type: "setPages", payload: { page: 1, limit: 10 } }); getTable(data); }; @@ -535,6 +553,8 @@ const UseKeyList = (props, ref) => { const onPageChange = (e) => { dispatch({ type: "setPages", payload: { page: e } }); getTable({ page: e, hash: state.hash }); + + tetxajax(); }; const onCountChange = (e) => {