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> { ...@@ -24,6 +24,24 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
// dispatch({ // dispatch({
// type: 'user/deleteCurrent', // 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({ dispatch({
type: 'login/logout', type: 'login/logout',
}); });
......
...@@ -72,6 +72,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -72,6 +72,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
}, },
login, login,
} = props; } = props;
/** /**
* constructor * constructor
*/ */
......
...@@ -294,6 +294,7 @@ const Account = (props: any) => { ...@@ -294,6 +294,7 @@ const Account = (props: any) => {
onChange={sopens} onChange={sopens}
total={Data ? Data.page.totalRow : 0} total={Data ? Data.page.totalRow : 0}
pageSize={Data ? Data.page.curPageSize : 0} pageSize={Data ? Data.page.curPageSize : 0}
showSizeChanger={false}
/> />
</div> </div>
</div> </div>
......
...@@ -170,11 +170,14 @@ const ContractContent = (props: any) => { ...@@ -170,11 +170,14 @@ const ContractContent = (props: any) => {
fileList: fileList, fileList: fileList,
onChange: ({ file }: { file: any }) => { onChange: ({ file }: { file: any }) => {
console.log(file); console.log(file);
if (file.status === 'uploading') { if (file.status === 'uploading') {
setimgLoad(true); 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 !'); 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