From 6907043564096bc796eac235b5370f3a242e226e Mon Sep 17 00:00:00 2001 From: yangwenhua <1289978696@qq.com> Date: Wed, 31 Aug 2022 11:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=81=E4=B8=9ALOGO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sys/sysSettings/components/EnterpriseLog.jsx | 2 +- src/pages/sys/sysSettings/index.jsx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/sys/sysSettings/components/EnterpriseLog.jsx b/src/pages/sys/sysSettings/components/EnterpriseLog.jsx index 418d615..cbfbe5d 100644 --- a/src/pages/sys/sysSettings/components/EnterpriseLog.jsx +++ b/src/pages/sys/sysSettings/components/EnterpriseLog.jsx @@ -70,7 +70,7 @@ const EnterpriseLog = (props) => { fileData = e.target.result; // 使用 axios 进行文件上传的请求 axios.put(action, fileData, { - withCredentials, + withCredentials, headers, onUploadProgress: ({ total, loaded }) => { // 进行上传进度输出,更加直观 diff --git a/src/pages/sys/sysSettings/index.jsx b/src/pages/sys/sysSettings/index.jsx index 9f24259..1a24ba5 100644 --- a/src/pages/sys/sysSettings/index.jsx +++ b/src/pages/sys/sysSettings/index.jsx @@ -72,10 +72,9 @@ const Settings = () => { } }; - const onUpdateCompanyInfo = (companyInfo) => { - updateCompany(companyInfo).then(() => { - onFetchCompanyInfo(); - }); + const onUpdateCompanyInfo = async (companyInfo) => { + await updateCompany(companyInfo); + await onFetchCompanyInfo(); } const onFetchCompanyInfo = async () => {