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 () => {