From a4ae42a9a78ed09c1ec76a9a5c7cc12362fdf6fb Mon Sep 17 00:00:00 2001 From: hupeng Date: Sat, 2 Mar 2019 14:19:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=A0=B7=E5=BC=8F][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 72 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/App.js b/App.js index 1b22586..f5e3294 100644 --- a/App.js +++ b/App.js @@ -25,6 +25,13 @@ export default class MyPage extends Component { constructor(props) { super(props); this.state = { + + baseInfo: { + imgUrl:'', + imgQrcodeWeapp:'', + imgQrcodeWemp:'' + }, + text:'', qrcode:[], restartAllowed: true , @@ -109,12 +116,20 @@ codePushStatusDidChange(syncStatus) { } -getBaseInfo() { +getTestData() { HttpUtils.get('https://mall.youlane.cn/api/wxDeviceScreenAd/list?deviceId=11%3AAA%3A33%3ABB%3A44&pageNum=1&pageSize=5') .then(result => { this.setState({ - text: JSON.stringify, - qrcode: result.data.list[0].qrcode}); + qrcode: result.data.list[0].qrcode}); + }) + .catch(error => console.error(error)) +} + +getBaseInfo() { + HttpUtils.get('https://mall.youlane.cn/api/wxDeviceScreenAd/info?deviceId=11%3AAA%3A33%3ABB%3A44') + .then(result => { + this.setState({ + baseInfo:result.data}); }) .catch(error => console.error(error)) } @@ -143,33 +158,38 @@ render() { - + + + + + + - + - + - + - - - - + + + + {this.state.text} @@ -221,13 +241,41 @@ render() { flex: 1, backgroundColor:'transparent' }, - titleQrcode: { + + 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%', + backgroundColor:'transparent' + }, + //layer bottom bottomLogo: { flex: 50,