首页 > 技术文章 > js将接口返回的数据序列化

yangyang03 2017-03-28 14:27 原文

<div style={{marginLeft: '80px'}}>
                    <pre>
                        {this.state.showType == '1' && JSON.stringify(getLoginByIdCardList.response, undefined, 2)}
                        {this.state.showType == '2' && JSON.stringify(getBespeakOrderList.response, undefined, 2)}
                        {this.state.showType == '3' && JSON.stringify(getReservationList.response, undefined, 2)}
                        {this.state.showType == '4' && JSON.stringify(getUserReportList.response, undefined, 2)}
                        {this.state.showType == '5' && JSON.stringify(getabnormalList.response, undefined, 2)}
                        {this.state.showType == '6' && JSON.stringify(getRemoteReportList.response, undefined, 2)}
                    </pre>
                </div>

推荐阅读