|
...
|
...
|
@@ -57,6 +57,23 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
//导航栏自适应
|
|
|
|
let systemInfo = wx.getSystemInfoSync();
|
|
|
|
let reg = /ios/i;
|
|
|
|
let pt = 20;//导航状态栏上内边距
|
|
|
|
let h = 44;//导航状态栏高度
|
|
|
|
if (reg.test(systemInfo.system)) {
|
|
|
|
pt = systemInfo.statusBarHeight;
|
|
|
|
h = 44;
|
|
|
|
} else {
|
|
|
|
pt = systemInfo.statusBarHeight;
|
|
|
|
h = 48;
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
statusBarHeight: pt,
|
|
|
|
titleBarHeight: h,
|
|
|
|
height: systemInfo.windowHeight
|
|
|
|
})
|
|
|
|
this.getDetail();
|
|
|
|
},
|
|
|
|
|
...
|
...
|
|