Parcourir la source

[样式][修改]:调整二维码显示样式

tags/jenkins-front-end-screenad-53
hupeng il y a 6 ans
Parent
révision
910ca40239
1 fichiers modifiés avec 13 ajouts et 30 suppressions
  1. +13
    -30
      App.js

+ 13
- 30
App.js Voir le fichier

@@ -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() {
<View style={styles.titleImagePlace}>
<Image source={require('./image/title.png')} resizeMode='center' style={styles.titleImage} />
</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>


@@ -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'
},



Chargement…
Annuler
Enregistrer