Showing
1 changed file
with
4 additions
and
1 deletions
| @@ -140,13 +140,16 @@ Page({ | @@ -140,13 +140,16 @@ Page({ | ||
| 140 | this.hasOnLoad=false; | 140 | this.hasOnLoad=false; |
| 141 | //导航栏自适应 | 141 | //导航栏自适应 |
| 142 | let systemInfo = wx.getSystemInfoSync(); | 142 | let systemInfo = wx.getSystemInfoSync(); |
| 143 | + console.log('systemInfo:',systemInfo) | ||
| 143 | let reg = /ios/i; | 144 | let reg = /ios/i; |
| 144 | let pt = 20;//导航状态栏上内边距 | 145 | let pt = 20;//导航状态栏上内边距 |
| 145 | let h = 44;//导航状态栏高度 | 146 | let h = 44;//导航状态栏高度 |
| 146 | if(reg.test(systemInfo.system)){ | 147 | if(reg.test(systemInfo.system)){ |
| 147 | pt = systemInfo.statusBarHeight; | 148 | pt = systemInfo.statusBarHeight; |
| 148 | h = 44; | 149 | h = 44; |
| 149 | - //this.transverseViewHeight=transverseViewHeight+26; | 150 | + if(systemInfo.pixelRatio>2){ |
| 151 | + this.transverseViewHeight=transverseViewHeight+26; | ||
| 152 | + } | ||
| 150 | }else{ | 153 | }else{ |
| 151 | if(/xiaomi/i.test(systemInfo.brand)){ | 154 | if(/xiaomi/i.test(systemInfo.brand)){ |
| 152 | this.transverseViewHeight=transverseViewHeight+15; | 155 | this.transverseViewHeight=transverseViewHeight+15; |
-
Please register or login to post a comment