diff --git a/src/assets/api.js b/src/assets/api.js index bb29d466..75b5703d 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -25,7 +25,7 @@ const req = (method, url, params, responseType) => { } } 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)); } diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js index 682887cd..53f10002 100644 --- a/src/pages/exchangecode/list/list.js +++ b/src/pages/exchangecode/list/list.js @@ -199,9 +199,10 @@ export default class acclist extends React.Component{ } //获取兑换码列表 getCodeListFn(){ - let data={key_batch_id:1} + let data={key_batch_id:93} getCodesList(data).then(res=>{ - console.log(res); + // const + console.log('err',res); }).catch(err=>{ console.log('err',err); });