<view class="codeImgbox">
<image class="codeImg" src="http://www.jinghongkeji.net/media/img/h5/img/index-codeImg.png" :style="{'margin-top': phoneModel.search('iPhone X')!=-1?'80upx':phoneModel.search('iPhone')!=-1?'-70upx':codeheight+'upx'}" ></image>
</view>
data() {return {title: 'Hello',phoneModel: "",codeheight:320}},
// 判断全面屏手机
uni.getSystemInfo({
success:(res)=>{
if(res.model.search('iPhone')){
this.phoneModel =res.model
}else if(Math.round(res.screenHeight)>700){
this.codeheight = Math.round(res.screenHeight)-350
}
if(Math.round(res.screenHeight)<650){
this.codeheight = (600-Math.round(res.screenHeight))+320
}
}
})