Commit 99da212d by wong.peiyi

过滤弹窗兼容安卓

parent 48af5802
...@@ -130,6 +130,14 @@ android { ...@@ -130,6 +130,14 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
} }
} }
signingConfigs {
release {
storeFile file('../keystores/key.jks')
storePassword 'gkzhc2020'
keyAlias 'key'
keyPassword 'gkzhc2020'
}
}
buildTypes { buildTypes {
debug { debug {
resValue "string", "CodePushDeploymentKey", '"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"' resValue "string", "CodePushDeploymentKey", '"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"'
...@@ -140,6 +148,7 @@ android { ...@@ -140,6 +148,7 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
resValue "string", "CodePushDeploymentKey", '"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"' resValue "string", "CodePushDeploymentKey", '"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"'
resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
signingConfig signingConfigs.release
} }
releaseStaging.initWith(release) releaseStaging.initWith(release)
releaseStaging { releaseStaging {
......
...@@ -363,8 +363,8 @@ export const list_common_item = { ...@@ -363,8 +363,8 @@ export const list_common_item = {
height: 2 height: 2
}, },
shadowOpacity: 1, shadowOpacity: 1,
elevation: 10, // elevation: 10,
height: 80 height: 80,
}, },
sub_two_btn: { sub_two_btn: {
width: Width(), width: Width(),
......
...@@ -19,6 +19,8 @@ import { ...@@ -19,6 +19,8 @@ import {
TextInput, TextInput,
SafeAreaView, SafeAreaView,
ScrollView, ScrollView,
TouchableWithoutFeedback,
Modal,
} from 'react-native' } from 'react-native'
import * as R from 'ramda' import * as R from 'ramda'
import { import {
...@@ -40,6 +42,7 @@ import { ...@@ -40,6 +42,7 @@ import {
second_text_color, second_text_color,
first_text_color, first_text_color,
} from '../../../base/BaseStyle' } from '../../../base/BaseStyle'
import { isIphoneX } from "../../../utils/Utils";
const PropTypes = require('prop-types') const PropTypes = require('prop-types')
export default class ChoolseFilter extends Component { export default class ChoolseFilter extends Component {
...@@ -86,19 +89,16 @@ export default class ChoolseFilter extends Component { ...@@ -86,19 +89,16 @@ export default class ChoolseFilter extends Component {
</View> </View>
{visible && ( {visible && (
<View <Modal style={styles.searchModal} visible={visible} transparent={true}>
style={styles.searchModal}
visible={visible}
animationType="slide"
transparent={true}
>
<TouchableOpacity <TouchableOpacity
style={styles.mask} style={styles.mask_touch}
onPress={() => { onPress={e => {
this.setState({ visible: !visible }) this.setState({ visible: !visible })
}} }}
activeOpacity={1}
></TouchableOpacity> ></TouchableOpacity>
<View style={styles.searchContent}> <View style={styles.mask}></View>
<View style={isIphoneX() ? [styles.searchContent, {top: 48 + 58 + pxSize(36)}] : styles.searchContent}>
<ScrollView style={styles.scrollView}> <ScrollView style={styles.scrollView}>
{filterData && {filterData &&
filterData.map(item => { filterData.map(item => {
...@@ -124,6 +124,7 @@ export default class ChoolseFilter extends Component { ...@@ -124,6 +124,7 @@ export default class ChoolseFilter extends Component {
} else { } else {
onCallback && onCallback(item.field, option.value) onCallback && onCallback(item.field, option.value)
} }
this.setState({ visible: !visible})
}} }}
> >
<Text <Text
...@@ -161,6 +162,7 @@ export default class ChoolseFilter extends Component { ...@@ -161,6 +162,7 @@ export default class ChoolseFilter extends Component {
R.map(filter => { R.map(filter => {
onCallback && onCallback(filter.field, '') onCallback && onCallback(filter.field, '')
})(filterData) })(filterData)
this.setState({ visible: !visible })
}} }}
> >
<Text style={styles.resetBtnText}>重置</Text> <Text style={styles.resetBtnText}>重置</Text>
...@@ -176,7 +178,7 @@ export default class ChoolseFilter extends Component { ...@@ -176,7 +178,7 @@ export default class ChoolseFilter extends Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
</View> </Modal>
)} )}
</View> </View>
) )
...@@ -188,7 +190,6 @@ const styles = StyleSheet.create({ ...@@ -188,7 +190,6 @@ const styles = StyleSheet.create({
width: Width(), width: Width(),
height: pxSize(36), height: pxSize(36),
paddingLeft: pxSize(20), paddingLeft: pxSize(20),
zIndex: 999,
}, },
filterBarTitle: { filterBarTitle: {
flexDirection: 'row', flexDirection: 'row',
...@@ -215,23 +216,36 @@ const styles = StyleSheet.create({ ...@@ -215,23 +216,36 @@ const styles = StyleSheet.create({
height: pxSize(10), height: pxSize(10),
}, },
searchModal: { searchModal: {
// position: 'absolute',
// top: pxSize(36),
// width: Width(),
// height: Height(),
// backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 999,
},
mask_touch: {
position: 'absolute', position: 'absolute',
top: pxSize(36),
width: Width(), width: Width(),
height: Height(), height: Height(),
backgroundColor: 'rgba(0, 0, 0, 0.5)', zIndex: 99,
top: 0
}, },
mask: { mask: {
position: 'absolute', position: 'absolute',
width: '100%', width: Width(),
height: '100%', height: Height(),
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 99,
top: 200,
}, },
searchContent: { searchContent: {
width: Width(), width: Width(),
height: pxSize(300), height: pxSize(300),
backgroundColor: home_background_color, backgroundColor: home_background_color,
top: 58 + pxSize(36),
borderColor: '#ddd', borderColor: '#ddd',
borderTopWidth: 1, borderTopWidth: 1,
zIndex: 999,
}, },
scrollView: { scrollView: {
height: pxSize(260), height: pxSize(260),
......
...@@ -806,7 +806,7 @@ class ChooseProductPage extends Component { ...@@ -806,7 +806,7 @@ class ChooseProductPage extends Component {
// 返回底部按钮 // 返回底部按钮
renderFooterBtnItem() { renderFooterBtnItem() {
let { selectShowPopup, topProcOptionList, topActiveIndex, local_sel_options, local_cur_options, cur_hc_opts} = this.state let { selectShowPopup, topProcOptionList, topActiveIndex, leftActiveIndex, filterData, local_sel_options, local_cur_options, cur_hc_opts} = this.state
let allCountQuantity = this.getAllCountQuantity() let allCountQuantity = this.getAllCountQuantity()
let cur_sel_options = [] let cur_sel_options = []
let sel_tip = this.getAllCountQuantity(true) let sel_tip = this.getAllCountQuantity(true)
...@@ -923,6 +923,7 @@ class ChooseProductPage extends Component { ...@@ -923,6 +923,7 @@ class ChooseProductPage extends Component {
changeCallBack={(options, clearFlag) => this.handleChangeCallBack(options, clearFlag)} changeCallBack={(options, clearFlag) => this.handleChangeCallBack(options, clearFlag)}
/> />
{ this.renderLodingItem()} { this.renderLodingItem()}
</View> </View>
) )
} }
...@@ -937,7 +938,7 @@ class ChooseProductPage extends Component { ...@@ -937,7 +938,7 @@ class ChooseProductPage extends Component {
render() { render() {
let { navigation } = this.props let { navigation } = this.props
let { title } = navigation.state.params let { title } = navigation.state.params
let { topProcOptionList } = this.state let { topProcOptionList, leftActiveIndex, filterData } = this.state
return ( return (
<View style={styles.choo_container}> <View style={styles.choo_container}>
<StatusBarView <StatusBarView
...@@ -945,15 +946,17 @@ class ChooseProductPage extends Component { ...@@ -945,15 +946,17 @@ class ChooseProductPage extends Component {
backgroundColor={promary_color} backgroundColor={promary_color}
barStyle='light-content' barStyle='light-content'
/> />
<SafeAreaView style={safe_view}> <View style={safe_view} >
<HeadBackItem title={title} navigation={navigation} callback={() => this.handleGoBack()} /> <HeadBackItem title={title} navigation={navigation} callback={() => this.handleGoBack()} />
<View style={styles.choo_main}> <View style={!leftActiveIndex ?[styles.choo_main, styles.choo_main_pd]: styles.choo_main} pointerEvents="auto">
{this.renderSearchItem()} {this.renderSearchItem()}
{topProcOptionList && topProcOptionList.length > 0 ? this.renderTopProItem() : null} {topProcOptionList && topProcOptionList.length > 0 ? this.renderTopProItem() : null}
{topProcOptionList && topProcOptionList.length > 0 ? this.renderContItem() : null} {topProcOptionList && topProcOptionList.length > 0 ? this.renderContItem() : null}
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</SafeAreaView> {/* {!leftActiveIndex && <ChooseFilter filterData={filterData} onCallback={this.fillterCallback.bind(this)}/>} */}
</View>
</View> </View>
); );
} }
...@@ -968,6 +971,9 @@ const styles = StyleSheet.create({ ...@@ -968,6 +971,9 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
zIndex: 99, zIndex: 99,
}, },
choo_main_pd: {
// paddingTop: pxSize(36)
},
top_box: { top_box: {
width: Width(), width: Width(),
height: 58, height: 58,
......
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