This commit is contained in:
red-deng-deng 2021-11-17 14:15:51 +08:00
parent a7b21d4d06
commit ea59a18c5d
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ const req = (method, url, params, responseType) => {
} }
} }
let http = fetch(url,obj).then(res => res.json()); let http = fetch(url,obj).then(res => res.json());
return http.then(response => response.data).catch(error => console.error('Error:', error)); return http.then(response => response).catch(error => console.error('Error:', error));
} }

View File

@ -199,9 +199,10 @@ export default class acclist extends React.Component{
} }
//获取兑换码列表 //获取兑换码列表
getCodeListFn(){ getCodeListFn(){
let data={key_batch_id:1} let data={key_batch_id:93}
getCodesList(data).then(res=>{ getCodesList(data).then(res=>{
console.log(res); // const
console.log('err',res);
}).catch(err=>{ }).catch(err=>{
console.log('err',err); console.log('err',err);
}); });