Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend
This commit is contained in:
commit
bb07818698
|
@ -87,9 +87,39 @@ const req = (method, url, params, responseType) => {
|
|||
|
||||
let http = fetch(url, obj).then(res =>{
|
||||
window.timeshow=res.headers.get('Date-Time');
|
||||
return res.json()
|
||||
console.log(res);
|
||||
if(res.status==200){
|
||||
return res.json()
|
||||
}else{
|
||||
switch (res.status) {
|
||||
// 401: 未登录
|
||||
case 401:
|
||||
Notify.clear();
|
||||
Notify.error( "当前信息过期请重新登录");
|
||||
setTimeout(() => {
|
||||
window.location.href='./login';
|
||||
}, 3000)
|
||||
break;
|
||||
case 417:
|
||||
Notify.clear();
|
||||
Notify.error( res.statusText);
|
||||
break;
|
||||
|
||||
case 500:
|
||||
Notify.clear();
|
||||
Notify.error( res.statusText);
|
||||
break;
|
||||
default:
|
||||
Notify.clear();
|
||||
Notify.error( res.statusText);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(res);
|
||||
|
||||
} );
|
||||
return http.then(response => response).catch(error => console.error('Error:', error));
|
||||
return http.then(response =>response).catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
export const handelResponse = (res, cb, errCb) => {
|
||||
|
|
|
@ -550,6 +550,7 @@ componentDidUpdate(prevProps,prevState){
|
|||
return <p className="dflexa" ><span><font className="icon" style={{background:menu.orderStatusBg(parseInt(rowData.status))}}></font>{rowData.status_text}</span></p>
|
||||
}
|
||||
if(com == "opearo")
|
||||
|
||||
{
|
||||
return <div>
|
||||
{
|
||||
|
@ -562,7 +563,7 @@ componentDidUpdate(prevProps,prevState){
|
|||
// rowData.status==3? <span className="grid-link" onClick={(e)=>this.againinvestFn(e,rowData)}>再次充值</span>:null
|
||||
}
|
||||
{
|
||||
rowData.status==1? <span className="grid-link" onClick={(e)=>this.deleteFn(e,rowData)} >改为成功</span>:null
|
||||
rowData.status==1? <span className="grid-link" onClick={(e)=>this.changeSuccessFn(e,rowData)} >改为成功</span>:null
|
||||
}
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue