From 572551dd76181cc4341d26eb0d053d5885ac3837 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 28 Nov 2023 21:27:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BB=B6=E8=BF=9F=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/neUser/auth/index.vue | 18 +++++++++++------- src/views/neUser/sub/index.vue | 20 ++++++++++++-------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue index d113e68b..70f5ee34 100644 --- a/src/views/neUser/auth/index.vue +++ b/src/views/neUser/auth/index.vue @@ -549,17 +549,21 @@ function fnLoadData() { tableState.loading = true; // 表格loading loadAuth(neID).then(res => { if (res.code === RESULT_CODE_SUCCESS) { + const num = res.data; notification.success({ message: t('views.neUser.auth.loadData'), - description: t('views.neUser.auth.loadDataTip', { num: res.data }), - duration: 10, + description: t('views.neUser.auth.loadDataTip', { num }), + duration: num < 10_0000 ? 10 : 30, }); // 延迟10s后关闭loading刷新列表 - setTimeout(() => { - modalState.loadDataLoading = false; - tableState.loading = false; // 表格loading - fnQueryReset(); - }, 10_000); + setTimeout( + () => { + modalState.loadDataLoading = false; + tableState.loading = false; // 表格loading + fnQueryReset(); + }, + num < 10_0000 ? 10_000 : 30_000 + ); } else { message.error({ content: t('common.getInfoFail'), diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue index f698feee..760a5631 100644 --- a/src/views/neUser/sub/index.vue +++ b/src/views/neUser/sub/index.vue @@ -777,17 +777,21 @@ function fnLoadData() { tableState.loading = true; // 表格loading loadSub(neID).then(res => { if (res.code === RESULT_CODE_SUCCESS) { + const num = res.data; notification.success({ message: t('views.neUser.sub.loadData'), - description: t('views.neUser.sub.loadDataTip', { num: res.data }), - duration: 10, + description: t('views.neUser.sub.loadDataTip', { num }), + duration: num < 10_0000 ? 10 : 30, }); - // 延迟10s后关闭loading刷新列表 - setTimeout(() => { - modalState.loadDataLoading = false; - tableState.loading = false; // 表格loading - fnQueryReset(); - }, 10_000); + // 延迟20s后关闭loading刷新列表 + setTimeout( + () => { + modalState.loadDataLoading = false; + tableState.loading = false; // 表格loading + fnQueryReset(); + }, + num < 10_0000 ? 10_000 : 30_000 + ); } else { message.error({ content: t('common.getInfoFail'),