Commit f31d85f8 authored by cellee's avatar cellee

解决上传错误提示,解决登录模块账号不变问题

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 5c9b2f94
......@@ -24,6 +24,24 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
// dispatch({
// type: 'user/deleteCurrent',
// });
// 清掉所有localStorage缓存
localStorage.clear();
// 清掉本域名所有cookie
// let keys = document.cookie.match(/[^ =;]+(?==)/g);
// if (keys) {
// for (var i = keys.length; i--; ) {
// document.cookie = keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString(); // 清除当前域名下的,例如:m.ratingdog.cn
// document.cookie =
// keys[i] +
// '=0;path=/;domain=' +
// document.domain +
// ';expires=' +
// new Date(0).toUTCString(); // 清除当前域名下的,例如 .m.ratingdog.cn
// document.cookie =
// keys[i] + '=0;path=/;domain=ratingdog.cn;expires=' + new Date(0).toUTCString(); // 清除一级域名下的或指定的,例如 .ratingdog.cn
// }
// }
dispatch({
type: 'login/logout',
});
......
......@@ -72,6 +72,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
},
login,
} = props;
/**
* constructor
*/
......
......@@ -294,6 +294,7 @@ const Account = (props: any) => {
onChange={sopens}
total={Data ? Data.page.totalRow : 0}
pageSize={Data ? Data.page.curPageSize : 0}
showSizeChanger={false}
/>
</div>
</div>
......
......@@ -170,11 +170,14 @@ const ContractContent = (props: any) => {
fileList: fileList,
onChange: ({ file }: { file: any }) => {
console.log(file);
if (file.status === 'uploading') {
setimgLoad(true);
}
if (file.status == 'done') {
if (file.status === 'error') {
message.error(file.name + ' Upload failed !');
setimgLoad(false);
}
if (file.status === 'done') {
message.success(file.name + ' Upload Successful !');
// 实现在线预览
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment