Commit 53b5604c by Denglingling

对接自助下单已有接口数据,以及修改部分交互

(cherry picked from commit ce9edb33)
parent 797e0a2e
......@@ -99,15 +99,15 @@ const styles = StyleSheet.create({
marginBottom: 18
},
btn_cont: {
paddingHorizontal: 26
paddingHorizontal: 20
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 52,
height: 48,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
marginBottom: 14,
marginBottom: 26,
borderRadius: 10
},
sub_btn: {
......
......@@ -135,8 +135,8 @@ class DateModel extends Component {
onRequestClose={() => this.handleCloseModal()}>
<SafeAreaView style={safe_view}>
<TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.handleCloseModal()}
>
onPress={() => this.handleCloseModal()}
>
{this.renderDialog()}
</TouchableOpacity>
</SafeAreaView>
......
import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, View, Modal, ActivityIndicator, Text, SafeAreaView } from 'react-native';
import { font_family_medium, Height, icon_style, pxSize, second_text_size, Width } from '../../../base/BaseStyle';
import { font_family_medium, font_family_regular, Height, icon_style, pxSize, second_text_color, second_text_size, Width } from '../../../base/BaseStyle';
import { AsteriskTextStyle, CellTextStyle, ContInputTextStyle, ContTextStyle, ImageTextStyle, TitleTextStyle } from '../CellTextStyle';
import DialogModel from '../DialogModel';
const PropTypes = require('prop-types');
/**
......@@ -20,6 +19,12 @@ class PageListArrow extends Component {
listTitle: PropTypes.string,
listName: PropTypes.string,
listHasArrow: PropTypes.bool,
listOtherInput: PropTypes.string,
otherInput: PropTypes.string,
otherInputCallBack: PropTypes.func,
listInputPlace: PropTypes.string,
inputCallBack: PropTypes.func,
isTitInputStyle: PropTypes.bool
}
constructor(props) {
......@@ -35,43 +40,38 @@ class PageListArrow extends Component {
}
}
// 返回选择器弹窗
renderPickerModel() {
let { listCurrentOption, currentItem, currentTitle, showTypePop } = this.state
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
ref={'pickerModel'}
entityList={listCurrentOption}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
render() {
let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle, listHasArrow} = this.props
let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle,
listName, listHasArrow, listOtherInput, otherInput, otherInputCallBack, listInputPlace, inputCallBack, isTitInputStyle} = this.props
return (
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={listActOpa}
onPress={() => listCallBack()}
onPress={() => {return listCallBack ? listCallBack() : ''}}
>
<CellTextStyle>
{ listHasAster ? <AsteriskTextStyle>*</AsteriskTextStyle> : null }
<TitleTextStyle>{listItem[listTitle]}</TitleTextStyle>
{ listEditAble ? <ContInputTextStyle editable={listEditAble} defaultValue={listItem[listDefaValue]} />
: <ContTextStyle>{listItem[listName]}</ContTextStyle>
<TitleTextStyle style={isTitInputStyle ? styles.cell_title : ''}>{listItem[listTitle]}</TitleTextStyle>
{ (listEditAble || inputCallBack) ? <ContInputTextStyle
style={isTitInputStyle ? styles.cell_input : ''}
editable={!listEditAble}
defaultValue={listItem[listDefaValue]}
placeholder={listInputPlace}
onChangeText={(text) => {return inputCallBack ? inputCallBack(text) : ''}}
/> : <ContTextStyle>{listItem[listName]}</ContTextStyle>
}
{ listHasArrow ? <ImageTextStyle> <Image source={require('../../images/arr_rig.png')} style={icon_style}/>
</ImageTextStyle> : null}
{ listHasArrow ? <View style={styles.arr_icon_box}>
<Image source={require('../../../images/arr_rig.png')} style={icon_style}/>
</View> : null}
</CellTextStyle>
</TouchableOpacity>
{ this.renderPickerModel() }
{ (listOtherInput && listItem[otherInput]) ? <CellTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={listOtherInput}
onChangeText={(text) => otherInputCallBack(text)}
></ContInputTextStyle>
</CellTextStyle> : null}
</View>
);
}
......@@ -80,7 +80,29 @@ class PageListArrow extends Component {
const styles = StyleSheet.create({
item_container: {
flex: 1
}
},
cont_text: {
fontSize: second_text_size,
color: second_text_color,
flex: 1,
textAlign: 'right',
fontFamily: font_family_regular,
paddingLeft: 20
},
text_select: {
paddingLeft: 6
},
arr_icon_box: {
width: pxSize(16),
height: pxSize(16),
marginLeft: 6
},
cell_title: {
width: 120
},
cell_input: {
textAlign: 'left'
},
})
export default PageListArrow;
\ No newline at end of file
......@@ -376,8 +376,7 @@ const styles = StyleSheet.create({
},
sub_btn_pro: {
backgroundColor: promary_color,
height: 48,
// marginBottom: 18
marginBottom: 14
},
thr_head_tit_img: {
borderWidth: .5,
......
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