修改密码 登录只弹出一次

This commit is contained in:
孙景学
2025-08-04 16:55:26 +08:00
parent 434765def2
commit d73f2ee647

View File

@ -196,7 +196,15 @@ const HomeDashboard: React.FC = () => {
<ChangePasswordModal <ChangePasswordModal
visible={showChangePwd} visible={showChangePwd}
onOk={handleChangePwd} onOk={handleChangePwd}
onCancel={() => { }} onCancel={() => {
setShowChangePwd(false)
const userStr = sessionStorage.getItem('currentUser');
if (userStr) {
const userObj = JSON.parse(userStr);
if (userObj?.supplierUser) userObj.supplierUser.firstLogin = 1;
sessionStorage.setItem('currentUser', JSON.stringify(userObj));
}
}}
/> />
<Spin spinning={loading}> <Spin spinning={loading}>
<Row gutter={[24, 24]}> <Row gutter={[24, 24]}>