| 1234567891011121314151617181920212223242526272829 | 
							- /*
 
- graceUI-JS - 获取系统信息并识别 iphoneX
 
- link : graceui.hcoder.net
 
- author : 5213606@qq.com 深海
 
- 版权声明 : 
 
- GraceUI 的版权约束是不能转售或者将 GraceUI 直接发布到公开渠道!
 
- 侵权必究,请遵守版权约定!
 
- */
 
- module.exports = {
 
- 	info : function () {
 
- 		try {
 
- 		    var res = uni.getSystemInfoSync();
 
- 			var iPhoneXBottom = 0;
 
- 			res.model = res.model.replace(' ', '');
 
- 			res.model = res.model.toLowerCase();
 
- 			if(res.model.indexOf('iphonex') != -1 || res.model.indexOf('iphone11') != -1){
 
- 				res.iPhoneXBottomHeightRpx = 50;
 
- 				res.iPhoneXBottomHeightPx = uni.upx2px(50);
 
- 			}else{
 
- 				res.iPhoneXBottomHeightRpx = 0;
 
- 				res.iPhoneXBottomHeightPx  = 0;
 
- 			}
 
- 			return res;
 
- 		} catch (e){
 
- 		    return null;
 
- 		}
 
- 	}
 
- }
 
 
  |