Commit 96a5af79 by wong.peiyi

ios状态栏高度修改

parent 10012595
...@@ -4,7 +4,7 @@ import {isIphoneX} from '../../utils/Utils' ...@@ -4,7 +4,7 @@ import {isIphoneX} from '../../utils/Utils'
import {connect} from "react-redux"; import {connect} from "react-redux";
const iosStatusBarHeight = 20; const iosStatusBarHeight = 20;
const iosStatusBarXHeight = 44; const iosStatusBarXHeight = 48;
const PropTypes = require('prop-types'); const PropTypes = require('prop-types');
class StatusBarView extends Component { class StatusBarView extends Component {
...@@ -23,7 +23,6 @@ class StatusBarView extends Component { ...@@ -23,7 +23,6 @@ class StatusBarView extends Component {
render() { render() {
let height = 0 let height = 0
if (Platform.OS == 'ios') { if (Platform.OS == 'ios') {
if (this.props.isReactStackNavigator) { if (this.props.isReactStackNavigator) {
height = isIphoneX() ? iosStatusBarXHeight : iosStatusBarHeight height = isIphoneX() ? iosStatusBarXHeight : iosStatusBarHeight
...@@ -53,4 +52,4 @@ const mapDispatchToProps = (dispatch) => ({ ...@@ -53,4 +52,4 @@ const mapDispatchToProps = (dispatch) => ({
}) })
export default connect(mapStateToProps, mapDispatchToProps)(StatusBarView) export default connect(mapStateToProps, mapDispatchToProps)(StatusBarView)
\ No newline at end of file
...@@ -161,7 +161,7 @@ class LoginPage extends Component{ ...@@ -161,7 +161,7 @@ class LoginPage extends Component{
// this.enterHomePage() // this.enterHomePage()
let {username, password, isSubLoding} = this.state let {username, password, isSubLoding} = this.state
// let {global_domain_config} = this.props // let {global_domain_config} = this.props
// if(global_domain_config.includes("obs.uat.guke.tech")) { // if(global_domain_config.includes("obs.uat.guke.tech")) {
// show('请修改正确域名') // show('请修改正确域名')
...@@ -300,7 +300,7 @@ class LoginPage extends Component{ ...@@ -300,7 +300,7 @@ class LoginPage extends Component{
activeOpacity={ isSubLoding ? 1 : .8}> activeOpacity={ isSubLoding ? 1 : .8}>
<Text style={styles.btn_text}>{ subTit }</Text> <Text style={styles.btn_text}>{ subTit }</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.fo_domain_box} style={styles.fo_domain_box}
onPress={() => this.handleOpenDomain()} onPress={() => this.handleOpenDomain()}
...@@ -317,7 +317,7 @@ class LoginPage extends Component{ ...@@ -317,7 +317,7 @@ class LoginPage extends Component{
</View> </View>
<LodingModel title={subTit} show={isSubLoding} /> <LodingModel title={subTit} show={isSubLoding} />
<FillDomainModel <FillDomainModel
show={isShowDomain} show={isShowDomain}
closeModal={() => this.handleCloseDomain()} closeModal={() => this.handleCloseDomain()}
callback={(domainVal) => this.fillDomainCallBack(domainVal)} callback={(domainVal) => this.fillDomainCallBack(domainVal)}
domainValue={tempGlobalDomain} domainValue={tempGlobalDomain}
......
...@@ -50,8 +50,11 @@ export const isEmpty = (data) => { ...@@ -50,8 +50,11 @@ export const isEmpty = (data) => {
const X_WIDTH = 375; const X_WIDTH = 375;
const X_HEIGHT = 812; const X_HEIGHT = 812;
const XS_MAX_WIDTH = 414; const X_MAX_WIDTH = 414;
const XS_MAX_HEIGHT = 896; const X_MAX_HEIGHT = 896;
const XS_MAX_WIDTH = 428;
const XS_MAX_HEIGHT = 926;
const screenW = Dimensions.get('window').width; const screenW = Dimensions.get('window').width;
const screenH = Dimensions.get('window').height; const screenH = Dimensions.get('window').height;
...@@ -60,6 +63,7 @@ export const isIphoneX = () => { ...@@ -60,6 +63,7 @@ export const isIphoneX = () => {
return ( return (
Platform.OS === 'ios' && Platform.OS === 'ios' &&
((screenH === X_HEIGHT && screenW === X_WIDTH) || ((screenH === X_HEIGHT && screenW === X_WIDTH) ||
(screenH === X_MAX_HEIGHT && screenW === X_MAX_WIDTH) ||
(screenH === XS_MAX_HEIGHT && screenW === XS_MAX_WIDTH)) (screenH === XS_MAX_HEIGHT && screenW === XS_MAX_WIDTH))
) )
}; };
...@@ -182,7 +186,7 @@ export function ascArray(arr, typeName) { ...@@ -182,7 +186,7 @@ export function ascArray(arr, typeName) {
/** /**
* 引用数组降序排序 * 引用数组降序排序
* @param {Array} arr 原数组 * @param {Array} arr 原数组
* @param {String} typeName 排序字段名 * @param {String} typeName 排序字段名
*/ */
export function descArray(arr, typeName) { export function descArray(arr, typeName) {
if (!arr.length) { if (!arr.length) {
...@@ -222,7 +226,7 @@ export function referenceArrSort(arr, speciField, typeName, sortType) { ...@@ -222,7 +226,7 @@ export function referenceArrSort(arr, speciField, typeName, sortType) {
/** /**
* 调用安卓下载 * 调用安卓下载
* @param {String} path * @param {String} path
*/ */
export const openInstallActivity = (path) => { export const openInstallActivity = (path) => {
if (path == null || path.length == 0) return; if (path == null || path.length == 0) return;
...@@ -232,7 +236,7 @@ export const openInstallActivity = (path) => { ...@@ -232,7 +236,7 @@ export const openInstallActivity = (path) => {
/** /**
* 判断数据类型 * 判断数据类型
* @param {any} data * @param {any} data
*/ */
export const _typeof = function (data) { export const _typeof = function (data) {
try { try {
...@@ -247,8 +251,8 @@ export const _typeof = function (data) { ...@@ -247,8 +251,8 @@ export const _typeof = function (data) {
/** /**
* 接口常见错误提示 * 接口常见错误提示
* @param {function} dispatch * @param {function} dispatch
* @param {object} res * @param {object} res
* @param {function} exitCallback 退出回调 * @param {function} exitCallback 退出回调
* @param {function} errCallback 错误回调 * @param {function} errCallback 错误回调
*/ */
...@@ -295,8 +299,8 @@ export const showWarnErrorMessage = (dispatch, res, exitCallback, errCallback) = ...@@ -295,8 +299,8 @@ export const showWarnErrorMessage = (dispatch, res, exitCallback, errCallback) =
/** /**
* 接口异常提示 * 接口异常提示
* @param {function} dispatch * @param {function} dispatch
* @param {object} err * @param {object} err
* @param {function} errorCallback 错误回调 * @param {function} errorCallback 错误回调
* @param {string} logTit 错误打印标题 * @param {string} logTit 错误打印标题
*/ */
...@@ -314,4 +318,4 @@ export const showErrorMessage = (dispatch, err, errorCallback, logTit) => { ...@@ -314,4 +318,4 @@ export const showErrorMessage = (dispatch, err, errorCallback, logTit) => {
let error_msg = err.error || '请求接口错误,请联系管理员!' let error_msg = err.error || '请求接口错误,请联系管理员!'
show(error_msg); show(error_msg);
dispatch(errorCallback()); dispatch(errorCallback());
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment