let cachedIphoneStyle = ''

;(function () {
  wx.getSystemInfo({
    success(res) {
      const system = res.system.indexOf('iOS')
      const isIphoneXOrAbove = res.statusBarHeight > 20
      if (isIphoneXOrAbove && system !== -1) {
        cachedIphoneStyle = 'bottom: 40rpx;'
      }
    },
  })
})()

export const iphoneBottom = () => cachedIphoneStyle
