build: compile 0.5.24

This commit is contained in:
rex-zsd 2019-12-04 18:04:03 +08:00
parent 0d75716a29
commit 9b7381291a
2 changed files with 8 additions and 8 deletions

View File

@ -6,11 +6,11 @@ function getSafeArea() {
} }
else { else {
wx.getSystemInfo({ wx.getSystemInfo({
success: ({ model, screenHeight, statusBarHeight }) => { success: ({ model, statusBarHeight }) => {
const iphoneX = /iphone x/i.test(model); const deviceType = model.replace(/\s/g, '-');
const iphoneNew = /iPhone11/i.test(model) && screenHeight === 812; const iphoneNew = /iphone-x|iPhone11|iPhone12/i.test(deviceType);
cache = { cache = {
isIPhoneX: iphoneX || iphoneNew, isIPhoneX: iphoneNew,
statusBarHeight statusBarHeight
}; };
resolve(cache); resolve(cache);

View File

@ -9,11 +9,11 @@ function getSafeArea() {
else { else {
wx.getSystemInfo({ wx.getSystemInfo({
success: function (_a) { success: function (_a) {
var model = _a.model, screenHeight = _a.screenHeight, statusBarHeight = _a.statusBarHeight; var model = _a.model, statusBarHeight = _a.statusBarHeight;
var iphoneX = /iphone x/i.test(model); var deviceType = model.replace(/\s/g, '-');
var iphoneNew = /iPhone11/i.test(model) && screenHeight === 812; var iphoneNew = /iphone-x|iPhone11|iPhone12/i.test(deviceType);
cache = { cache = {
isIPhoneX: iphoneX || iphoneNew, isIPhoneX: iphoneNew,
statusBarHeight: statusBarHeight statusBarHeight: statusBarHeight
}; };
resolve(cache); resolve(cache);