You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
787 B
1 lines
787 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkIPhoneX=exports.getSystemInfo=exports.safeAreaInset=void 0;var systemInfo=null,safeAreaInset={top:88,left:0,right:0,bottom:34};exports.safeAreaInset=safeAreaInset;var getSystemInfo=function(e){if(!systemInfo||e){try{systemInfo=wx.getSystemInfoSync()}catch(e){}try{safeAreaInset.top=systemInfo.statusBarHeight+systemInfo.safeArea.top,safeAreaInset.bottom=systemInfo.screenHeight-systemInfo.safeArea.bottom}catch(e){}}return systemInfo};exports.getSystemInfo=getSystemInfo;var isIPhoneX=function(e){var t=e.model,s=e.windowHeight,o=e.windowWidth;return/iphone (x|12|13)/.test(t.toLowerCase())||812<=s&&2<s/o},checkIPhoneX=function(e){return isIPhoneX(getSystemInfo(e))};(exports.checkIPhoneX=checkIPhoneX)();
|