| @@ -32,6 +32,8 @@ export default class MyPage extends Component { | |||||
| imgQrcodeWemp:'' | imgQrcodeWemp:'' | ||||
| }, | }, | ||||
| adData:[], | |||||
| text:'', | text:'', | ||||
| qrcode:[], | qrcode:[], | ||||
| restartAllowed: true , | 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') | HttpUtils.get('https://mall.youlane.cn/api/wxDeviceScreenAd/list?deviceId=11%3AAA%3A33%3ABB%3A44&pageNum=1&pageSize=5') | ||||
| .then(result => { | .then(result => { | ||||
| this.setState({ | this.setState({ | ||||
| qrcode: result.data.list[0].qrcode}); | |||||
| adData: result.data.list}); | |||||
| }) | }) | ||||
| .catch(error => console.error(error)) | .catch(error => console.error(error)) | ||||
| } | } | ||||
| @@ -158,12 +160,11 @@ render() { | |||||
| <View style={styles.titleImagePlace}> | <View style={styles.titleImagePlace}> | ||||
| <Image source={require('./image/title.png')} resizeMode='center' style={styles.titleImage} /> | <Image source={require('./image/title.png')} resizeMode='center' style={styles.titleImage} /> | ||||
| </View> | </View> | ||||
| <View style={styles.titleQrcodeBonderPlace}> | |||||
| <Image source={require('./image/title-qrcode.png')} resizeMode='center' style={styles.titleQrcodeBonder} /> | |||||
| <View style={styles.titleQrcodePlace}> | |||||
| <Image source={{uri: this.state.baseInfo.imgQrcodeWeapp}} resizeMode='center' style={styles.titleQrcode} /> | |||||
| </View> | |||||
| </View> | |||||
| <ImageBackground source={require('./image/title-qrcode.png')} resizeMode='center' style={styles.titleQrcodeBonder} > | |||||
| <Image source={{uri: this.state.baseInfo.imgQrcodeWeapp}} resizeMode='center' style={styles.titleQrcode} /> | |||||
| </ImageBackground> | |||||
| </View> | </View> | ||||
| @@ -242,37 +243,19 @@ render() { | |||||
| backgroundColor:'transparent' | backgroundColor:'transparent' | ||||
| }, | }, | ||||
| titleQrcodeBonderPlace: { | |||||
| width:'100%', | |||||
| height:'100%', | |||||
| alignItems: 'center', | |||||
| flex: 1, | |||||
| backgroundColor:'transparent' | |||||
| }, | |||||
| titleQrcodeBonder: { | titleQrcodeBonder: { | ||||
| width:'100%', | width:'100%', | ||||
| height:'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, | flex: 1, | ||||
| backgroundColor:'transparent' | backgroundColor:'transparent' | ||||
| }, | }, | ||||
| titleQrcode: { | titleQrcode: { | ||||
| width:'100%', | |||||
| height:'100%', | |||||
| margin: '20%', | |||||
| marginTop: '40%', | |||||
| marginBottom: '2%', | |||||
| width:'60%', | |||||
| height:'30%', | |||||
| backgroundColor:'transparent' | backgroundColor:'transparent' | ||||
| }, | }, | ||||