From e8d9b6312e4ba3e933f4db7d46b7d517ae579075 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 17 Aug 2022 17:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E5=93=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/copyCode/index.jsx | 47 ++++++++++++----------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/pages/exchangecode/copyCode/index.jsx b/src/pages/exchangecode/copyCode/index.jsx index bd6eccba..b4b0aa39 100644 --- a/src/pages/exchangecode/copyCode/index.jsx +++ b/src/pages/exchangecode/copyCode/index.jsx @@ -131,6 +131,18 @@ export default class acclist extends React.Component { this.setState({ direct_reseller_id: req.direct_reseller_id }) + + /* 请求商品数据 */ + getProductInfoSelect({ + reseller_id: req.direct_reseller_id + }).then((res) => { + if (res.code === 200) { + sessionStorage.setItem( + 'productsList', + JSON.stringify(res.data.data) + ) + } + }) }) }) @@ -332,29 +344,19 @@ export default class acclist extends React.Component { } else { this.setState({ product_title: '新增立减金', newGoldLoading: true }) } - let param = { - reseller_id: direct_reseller_ids - } + try { - getProductInfoSelect(param).then((res) => { - console.log('res ==>1', res) - console.log('this.state.tempdata ==>', this.state.tempdata) - if (res.code === 200) { - sessionStorage.setItem('productsList', JSON.stringify(res.data.data)) - console.log('res ==>2', res.data.data) - this.setState({ productData: null }) - this.setState({ drawerVisible2: true }) - } - if (type === 'addProduct') { - this.setState({ - newGoodsBtnLoading: false - }) - } else { - this.setState({ - newGoldLoading: false - }) - } - }) + this.setState({ productData: null }) + this.setState({ drawerVisible2: true }) + if (type === 'addProduct') { + this.setState({ + newGoodsBtnLoading: false + }) + } else { + this.setState({ + newGoldLoading: false + }) + } } catch (err) { if (type === 'addProduct') { this.setState({ @@ -832,7 +834,6 @@ export default class acclist extends React.Component { } keyProductClick(row, index) { - console.log('keyProductClick 13==>', row) if (this.state.direct_reseller_id > 0) { /* 区分立减金 */ if (row.type === 2) {