diff --git a/App.js b/App.js index f5e3294..90e095d 100644 --- a/App.js +++ b/App.js @@ -32,6 +32,8 @@ export default class MyPage extends Component { imgQrcodeWemp:'' }, + adData:[], + text:'', qrcode:[], restartAllowed: true , @@ -120,7 +122,7 @@ getTestData() { HttpUtils.get('https://mall.youlane.cn/api/wxDeviceScreenAd/list?deviceId=11%3AAA%3A33%3ABB%3A44&pageNum=1&pageSize=5') .then(result => { this.setState({ - qrcode: result.data.list[0].qrcode}); + adData: result.data.list}); }) .catch(error => console.error(error)) } @@ -158,12 +160,11 @@ render() { - - - - - - + + + + + @@ -242,37 +243,19 @@ render() { backgroundColor:'transparent' }, - titleQrcodeBonderPlace: { - width:'100%', - height:'100%', - alignItems: 'center', - flex: 1, - backgroundColor:'transparent' - }, - titleQrcodeBonder: { width:'100%', height:'100%', - position: 'absolute', - flex: 1, - backgroundColor:'transparent' - }, - - titleQrcodePlace: { - width:'100%', - height:'100%', - flexDirection: 'column', - position: 'absolute', - alignItems: 'center', - padding: '25%', - paddingBottom: '8%', flex: 1, backgroundColor:'transparent' }, titleQrcode: { - width:'100%', - height:'100%', + margin: '20%', + marginTop: '40%', + marginBottom: '2%', + width:'60%', + height:'30%', backgroundColor:'transparent' },