瀏覽代碼

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

tags/jenkins-front-end-screenad-53
hupeng 6 年之前
父節點
當前提交
a4ae42a9a7
共有 1 個檔案被更改,包括 60 行新增12 行删除
  1. +60
    -12
      App.js

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


<View style={styles.content}>
<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />
<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />





<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />
<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />





<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />
<Image source={require('./image/item-background.png')} resizeMode='center' style={styles.contentItem} />
</View>



<View style={styles.bottom}>
<Image source={require('./image/logo.png')} resizeMode='center' style={styles.bottomLogo} />
<Image source={require('./image/test-l.png')} resizeMode='center' style={styles.bottomQrcode1} />
<Image source={require('./image/test-l.png')} resizeMode='center' style={styles.bottomQrcode2} />
<Text style={styles.bottomPlacehold}></Text>
<Image source={{ uri: this.state.baseInfo.imgUrl, cache: 'force-cache'}} resizeMode='center' style={styles.bottomLogo} />
<Image source={{ uri: 'http://hangge.com/img.png',cache: 'force-cache'}} resizeMode='center' style={styles.bottomQrcode1} />
<Image source={{ uri: 'http://hangge.com/img.png',cache: 'force-cache'}} resizeMode='center' style={styles.bottomQrcode2} />
<Text style={styles.bottomPlacehold}>{this.state.text}</Text>
</View>

</ImageBackground>
@@ -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,


Loading…
取消
儲存