js:
const res = wx.getSystemInfoSync();if (res.safeArea.top > 20 && res.model.includes("iPhone")) {//判断是否为iphonex xs xrthis.setData({iphoneS: true,});
html:
<view class="bottom-nav {
{iphoneS&&'d-iphone'}}">
</view>
wxss:
.d-iphone.bottom-nav{padding-bottom: 30rpx;height: 128rpx;}