From ea59a18c5da6885096600522b6a71386710a80f1 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Wed, 17 Nov 2021 14:15:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 2 +- src/pages/exchangecode/list/list.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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); });