解决分销商bug

This commit is contained in:
red-deng-deng 2021-11-30 01:34:40 +08:00
parent 479c9c1fb0
commit 82f5200bc3
3 changed files with 7 additions and 6 deletions

View File

@ -163,6 +163,8 @@ export const handelResponse = (res, cb, errCb) => {
cb(res.data, res.message) cb(res.data, res.message)
} else { } else {
if (res&&typeof errCb == 'function') { if (res&&typeof errCb == 'function') {
Notify.clear();
Notify.error(res.message);
errCb(res.message) errCb(res.message)
} }
} }

View File

@ -72,7 +72,8 @@ export default class acclist extends React.Component{
window.history.back() window.history.back()
},1000); },1000);
},(err)=>{ },(err)=>{
Notify.clear();
Notify.error(err);
}) })
}).catch(err=>{ }).catch(err=>{
}); });
@ -89,7 +90,7 @@ export default class acclist extends React.Component{
window.history.back() window.history.back()
},1000); },1000);
},(err)=>{ },(err)=>{
}) })
}).catch(err=>{ }).catch(err=>{
}); });

View File

@ -200,8 +200,7 @@ export default class adduserinfo extends React.Component{
NameblurFn(e){ NameblurFn(e){
getExistName(e).then(res=>{ getExistName(e).then(res=>{
handelResponse(res,(response,msg)=>{ handelResponse(res,(response,msg)=>{
Notify.clear();
Notify.success(msg);
},err=>{ },err=>{
Notify.clear(); Notify.clear();
Notify.error(res.data.message); Notify.error(res.data.message);
@ -215,8 +214,7 @@ export default class adduserinfo extends React.Component{
AccountblurFn(e){ AccountblurFn(e){
getExistAccount(e).then(res=>{ getExistAccount(e).then(res=>{
handelResponse(res,(response,msg)=>{ handelResponse(res,(response,msg)=>{
Notify.clear();
Notify.success(msg);
},err=>{ },err=>{
Notify.clear(); Notify.clear();
Notify.error(res.data.message); Notify.error(res.data.message);