登录修改密码
This commit is contained in:
@ -54,7 +54,7 @@ const QualificationFormModal: React.FC<QualificationFormModalProps> = ({
|
||||
termOfValidity: data.termOfValidity ? moment(data.termOfValidity) : undefined,
|
||||
|
||||
attachment: data.accessory
|
||||
? [{ uid: '-1', name: data.accessory, url: data.accessory, status: 'done', response: { url: data.accessory } }]
|
||||
? [{ uid: '-1', name: '附件', url: data.accessory, status: 'done', response: { url: data.accessory } }]
|
||||
: [],
|
||||
};
|
||||
console.log(fields, 'fields');
|
||||
@ -166,7 +166,7 @@ const QualificationFormModal: React.FC<QualificationFormModalProps> = ({
|
||||
<Descriptions.Item label="附件">
|
||||
{viewData.attachment?.[0]?.url ? (
|
||||
<a href={viewData.attachment[0].url} target="_blank" rel="noopener noreferrer">
|
||||
{viewData.attachment[0].name || '查看附件'}
|
||||
查看附件
|
||||
</a>
|
||||
) : '无'}
|
||||
</Descriptions.Item>
|
||||
|
@ -100,34 +100,29 @@ const LoginPage: React.FC = () => {
|
||||
//存入供应商用户id
|
||||
if (activeKey === 'supplierLogin') {
|
||||
sessionStorage.setItem('userId', loginRes.data.supplierUser.userId);
|
||||
if (loginRes.data?.supplierUser?.firstLogin === 1) {
|
||||
setUserId(loginRes.data.supplierUser.userId)
|
||||
setShowChangePwd(true);
|
||||
return
|
||||
}
|
||||
} else if (activeKey === 'expertLogin') {
|
||||
//存入专家用户id
|
||||
// sessionStorage.setItem('userId', loginRes.data.expertUser.userId);
|
||||
} else if (activeKey === 'accountLogin') {
|
||||
//存入招标代理用户id
|
||||
sessionStorage.setItem('userId', loginRes.data.user.userId);
|
||||
//部门
|
||||
// queryUserOrgAll().then((res) => {
|
||||
// const { code, data } = res;
|
||||
// if (code == 200) {
|
||||
// sessionStorage.setItem('userOrgAll', JSON.stringify(data) );
|
||||
// }
|
||||
// })
|
||||
}
|
||||
sessionStorage.setItem('currentUser', JSON.stringify(loginRes.data));
|
||||
|
||||
await getUserinfo().then(async (res) => {
|
||||
const roleIdList = res.authorityList.map((item: any) => item.roleId);
|
||||
console.log(res);
|
||||
|
||||
setUserId(res.userId)
|
||||
sessionStorage.setItem('Userinfo', JSON.stringify(res));
|
||||
const menuList: any = await findMenuList({ roleIdList });
|
||||
sessionStorage.setItem('menuList', JSON.stringify(menuList.data));
|
||||
//新用户需要修改一次密码
|
||||
if (loginRes.data?.supplierUser?.firstLogin === 1) {
|
||||
setShowChangePwd(true);
|
||||
} else {
|
||||
message.success('登录成功');
|
||||
if (activeKey === 'supplierLogin') {
|
||||
history.push('/backend/workbenches');
|
||||
} else {
|
||||
history.push('/index');
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user