Commit 161e6c20 by lhc Committed by peii

fix: bug

(cherry picked from commit 5a971a0e)
parent 04fbb709
import {
Dimensions
} from 'react-native'
import { Dimensions } from 'react-native'
const { width, height } = Dimensions.get('window');
const { width, height } = Dimensions.get('window')
export const Height = () => {
return height
};
return height
}
export const Width = () => {
return width
};
return width
}
// UI 默认图是414*896
const uiWidthPx = 414;
const uiHeightPx = 896;
const uiWidthPx = 414
const uiHeightPx = 896
export function pxSize(uiElementPx) {
return uiElementPx * Width() / uiWidthPx;
return (uiElementPx * Width()) / uiWidthPx
}
export function pxHeight(uiElementPx) {
return uiElementPx * Height() / uiHeightPx;
return (uiElementPx * Height()) / uiHeightPx
}
// 背景色
export const promary_color = "#007EFF"; // 主色
export const foundation_color = "#ffffff"; // 底色
export const promary_shadow_color = "#3CA2FF"; // 按钮阴影色
export const home_background_color = "#F7F7F7"; // 背景色
export const btn_sub_color = "#0296F7"; // 按钮色
export const dis_sub_color = "#BBBBBB"; // 禁用按钮色
export const promary_color = '#007EFF' // 主色
export const foundation_color = '#ffffff' // 底色
export const promary_shadow_color = '#3CA2FF' // 按钮阴影色
export const home_background_color = '#F7F7F7' // 背景色
export const btn_sub_color = '#0296F7' // 按钮色
export const dis_sub_color = '#BBBBBB' // 禁用按钮色
// 字体色
export const promary_text_color = "#000000"; // 主字颜色
export const title_text_color = "#ffffff"; // 标题颜色
export const placehold_text_color = "#919191"; // input placeholder颜色
export const first_text_color = '#333333'; // 一级字体
export const second_text_color = "#666666"; // 次级字体
export const third_text_color = "#999999"; // 三级字体
export const point_color = "#ff0000"; // * 颜色
export const text_default_color = "#01B2B9"; // 默认颜色
export const text_audit_color = "#FF0000"; // 拒绝颜色
export const text_return_color = "#007EFF"; // 归还颜色
export const text_other_color = "#F4B61B"; // 其他颜色
export const list_tit_color = 'rgba(0, 0, 0, 0.87)'; // 列表标题颜色
export const list_str_color = "#0CB4E8"; // 列表加粗颜色
export const list_one_color = "#1B40B5"; // 列表一级颜色
export const list_thr_color = "#3B4C82"; // 列表其他颜色
export const list_one_light_color = "#3c64e2"; // 列表一级较浅颜色
export const promary_text_color = '#000000' // 主字颜色
export const title_text_color = '#ffffff' // 标题颜色
export const placehold_text_color = '#919191' // input placeholder颜色
export const first_text_color = '#333333' // 一级字体
export const second_text_color = '#666666' // 次级字体
export const third_text_color = '#999999' // 三级字体
export const point_color = '#ff0000' // * 颜色
export const text_default_color = '#01B2B9' // 默认颜色
export const text_audit_color = '#FF0000' // 拒绝颜色
export const text_return_color = '#007EFF' // 归还颜色
export const text_other_color = '#F4B61B' // 其他颜色
export const list_tit_color = 'rgba(0, 0, 0, 0.87)' // 列表标题颜色
export const list_str_color = '#0CB4E8' // 列表加粗颜色
export const list_one_color = '#1B40B5' // 列表一级颜色
export const list_thr_color = '#3B4C82' // 列表其他颜色
export const list_one_light_color = '#3c64e2' // 列表一级较浅颜色
// 字号
export const first_text_size = 20; // 一级字号
export const second_text_size = 16; // 二级字号
export const third_text_size = 12; // 三级字号
export const first_text_size = 20 // 一级字号
export const second_text_size = 16 // 二级字号
export const third_text_size = 12 // 三级字号
// 字体样式
export const font_family_semibold = "PingFangSC-Semibold";
export const font_family_medium = "PingFangSC-Medium";
export const font_family_regular = "PingFangSC-Regular";
export const font_family_light = "PingFangSC-Light";
export const font_family_semibold = 'PingFangSC-Semibold'
export const font_family_medium = 'PingFangSC-Medium'
export const font_family_regular = 'PingFangSC-Regular'
export const font_family_light = 'PingFangSC-Light'
export const header_height = 58
export const icon_style = {
resizeMode: 'cover',
width: '100%',
height: '100%'
resizeMode: 'cover',
width: '100%',
height: '100%',
}
export const safe_view = {
flex: 1
flex: 1,
}
export const list_common_item = {
// 备注
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 58,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
// 录音
reco_item: {
height: 160,
// height: 340,
// marginBottom: 42
},
reco_play_height: {
height: 90
},
reco_btn_cont: {
flex: 1,
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: pxSize(54),
width: pxSize(162)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {
fontSize: second_text_size,
fontFamily: font_family_regular,
color: second_text_color
},
// 耗材明细
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_title_box: {
flexDirection: 'row',
justifyContent: 'space-between',
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
// maxHeight: pxSize(160),
// flex: 1
height: 'auto'
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: first_text_color,
fontSize: 14
},
de_tip: {
color: second_text_color,
fontSize: 12,
lineHeight: 18
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
// 添加图片
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1,
flexWrap: 'wrap'
},
addpic_img_btn: {
width: pxSize(64),
height: pxSize(64),
marginTop: -3,
marginLeft: -4,
marginRight: 16
},
addnew_pic_btn: {
width: pxSize(64),
height: pxSize(64),
marginRight: 16,
marginBottom: 16
},
show_pic_btn: {
width: pxSize(57),
height: pxSize(57),
borderWidth: 1,
borderColor: '#DDDDDD',
borderRadius: 6,
padding: 1
},
del_img_box: {
position: 'absolute',
right: -4,
top: -10,
width: pxSize(20),
height: pxSize(20)
},
// 二级页面-两个提交按钮
sub_box: {
width: Width(),
backgroundColor: foundation_color,
flexDirection: 'row',
shadowColor: '#E5E5E5',
shadowOffset: {
width: 1,
height: 2
},
shadowOpacity: 1,
// elevation: 10,
height: 80,
},
sub_two_btn: {
width: Width(),
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 30,
paddingVertical: 14
},
lef_btn: {
backgroundColor: '#4F4F4F',
width: '65%',
borderTopLeftRadius: 10,
borderBottomLeftRadius: 10,
height: 50
},
lef_tip: {
color: title_text_color,
lineHeight: 48,
paddingLeft: 20,
fontSize: 16,
fontFamily: font_family_regular
},
lef_tip_num:{
fontSize: 20
},
rig_btn: {
backgroundColor: promary_color,
width: '35%',
borderTopRightRadius: 10,
borderBottomRightRadius: 10,
height: 50
},
rig_tip: {
color: title_text_color,
lineHeight: 48,
textAlign: 'center',
fontSize: 16,
fontFamily: font_family_medium
},
def_btn: {
backgroundColor: promary_color,
width: '100%',
borderRadius: 10,
height: 50
},
def_tip: {
color: title_text_color,
lineHeight: 48,
textAlign: 'center',
fontSize: 16,
fontFamily: font_family_medium
},
// 二级页面顶部搜索
ser_cont: {
width: Width(),
backgroundColor: promary_color,
position: 'relative',
height: 60,
justifyContent: 'center',
paddingHorizontal: 16
},
ser_img_box: {
position: 'absolute',
left: 24,
top: 20,
width: pxSize(22),
height: pxSize(22)
},
ser_text_input: {
backgroundColor: '#F5F5F5',
height: 38,
lineHeight: 20,
paddingLeft: 34,
borderRadius: 10,
fontSize: 14,
fontFamily: font_family_regular
},
// 备注
remark_item: {
minHeight: 80,
height: 'auto',
},
rema_box: {
paddingVertical: 16,
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular,
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0,
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 58,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign: 'left',
textAlignVertical: 'top',
alignSelf: 'flex-start',
justifyContent: 'flex-start',
alignItems: 'flex-start',
fontFamily: font_family_regular,
},
// 录音
reco_item: {
height: 160,
// height: 340,
// marginBottom: 42
},
reco_play_height: {
height: 90,
},
reco_btn_cont: {
flex: 1,
paddingVertical: 20,
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular,
},
reco_btn_inner: {
flex: 1,
alignItems: 'center',
paddingTop: 30,
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: pxSize(54),
width: pxSize(162),
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22),
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular,
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60,
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular,
},
play_btn: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100),
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60),
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color,
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular,
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size,
},
reco_play_tit: {
fontSize: second_text_size,
fontFamily: font_family_regular,
color: second_text_color,
},
// 耗材明细
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start',
},
detail_inner: {
flex: 1,
},
detail_title_box: {
flexDirection: 'row',
justifyContent: 'space-between',
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular,
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
},
detail_footer: {
paddingHorizontal: 16,
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular,
},
detail_icon: {
width: pxSize(20),
height: pxSize(20),
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18),
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
// maxHeight: pxSize(160),
// flex: 1
height: 'auto',
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10,
},
de_sub_tit: {
color: first_text_color,
fontSize: 14,
},
de_tip: {
color: second_text_color,
fontSize: 12,
lineHeight: 18,
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10,
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40,
},
// 添加图片
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34,
},
addpic_inner: {
flex: 1,
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular,
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1,
flexWrap: 'wrap',
},
addpic_img_btn: {
width: pxSize(64),
height: pxSize(64),
marginTop: -3,
marginLeft: -4,
marginRight: 16,
},
addnew_pic_btn: {
width: pxSize(64),
height: pxSize(64),
marginRight: 16,
marginBottom: 16,
},
show_pic_btn: {
width: pxSize(57),
height: pxSize(57),
borderWidth: 1,
borderColor: '#DDDDDD',
borderRadius: 6,
padding: 1,
},
del_img_box: {
position: 'absolute',
right: -4,
top: -10,
width: pxSize(20),
height: pxSize(20),
},
// 二级页面-两个提交按钮
sub_box: {
width: Width(),
backgroundColor: foundation_color,
flexDirection: 'row',
shadowColor: '#E5E5E5',
shadowOffset: {
width: 1,
height: 2,
},
shadowOpacity: 1,
// elevation: 10,
height: 80,
},
sub_two_btn: {
width: Width(),
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 30,
paddingVertical: 14,
},
lef_btn: {
backgroundColor: '#4F4F4F',
width: '65%',
borderTopLeftRadius: 10,
borderBottomLeftRadius: 10,
height: 50,
},
lef_tip: {
color: title_text_color,
lineHeight: 48,
paddingLeft: 20,
fontSize: 16,
fontFamily: font_family_regular,
},
lef_tip_num: {
fontSize: 20,
},
rig_btn: {
backgroundColor: promary_color,
width: '35%',
borderTopRightRadius: 10,
borderBottomRightRadius: 10,
height: 50,
},
rig_tip: {
color: title_text_color,
lineHeight: 48,
textAlign: 'center',
fontSize: 16,
fontFamily: font_family_medium,
},
def_btn: {
backgroundColor: promary_color,
width: '100%',
borderRadius: 10,
height: 50,
},
def_tip: {
color: title_text_color,
lineHeight: 48,
textAlign: 'center',
fontSize: 16,
fontFamily: font_family_medium,
},
// 二级页面顶部搜索
ser_cont: {
width: Width(),
backgroundColor: promary_color,
position: 'relative',
height: 60,
justifyContent: 'center',
paddingHorizontal: 16,
},
ser_img_box: {
position: 'absolute',
left: 24,
top: 20,
width: pxSize(22),
height: pxSize(22),
},
ser_text_input: {
backgroundColor: '#F5F5F5',
height: 38,
lineHeight: 20,
paddingLeft: 34,
borderRadius: 10,
fontSize: 14,
fontFamily: font_family_regular,
},
ser_btn: {
position: 'absolute',
right: 20,
top: 15,
backgroundColor: promary_color,
color: '#fff',
width: 60,
height: 30,
},
ser_text_btn: {
color: '#fff',
lineHeight: 30,
textAlign: 'center',
},
}
import React, { Component } from 'react'
import { icon_style, list_common_item, safe_view, foundation_color } from '../../../base/BaseStyle'
import { View, StyleSheet, Image, TextInput, SafeAreaView, ScrollView, FlatList, Button } from 'react-native'
import {
View,
StyleSheet,
Image,
TextInput,
SafeAreaView,
ScrollView,
FlatList,
Text,
TouchableOpacity,
} from 'react-native'
import HeadBackItem from '../../common/HeadBackItem'
import { PicListNoData } from '../../common/CellTextStyle'
import PicTitDetaiCalcu from '../../common/listDataComponent/PicTitDetaiCalcu'
......@@ -316,9 +326,7 @@ class SearchPage extends Component {
)
}
inputSearchValue(text) {
this.setState({ searchValue: text }, () => {
this.getSearchData()
})
this.setState({ searchValue: text })
}
render() {
const { navigation } = this.props
......@@ -332,16 +340,20 @@ class SearchPage extends Component {
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={list_common_item.ser_cont}>
<View style={{ display: 'flex' }}>
<TextInput
placeholder={'请输入搜索关键词'}
style={list_common_item.ser_text_input}
// defaultValue={this.state.searchValue}
onChangeText={text => this.inputSearchValue(text)}
/>
{/* <Button title="搜索" onPress={() => this.getSearchData()} /> */}
<TextInput
placeholder={'请输入搜索关键词'}
style={list_common_item.ser_text_input}
onChangeText={text => this.inputSearchValue(text)}
/>
<View style={list_common_item.ser_btn}>
<TouchableOpacity
onPress={() => {
this.getSearchData()
}}
>
<Text style={list_common_item.ser_text_btn}>搜索</Text>
</TouchableOpacity>
</View>
<View style={list_common_item.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={icon_style} />
</View>
......
{
"name": "BoneHouse_Business_APP",
"version": "1.2.7",
"version": "1.2.8",
"private": true,
"scripts": {
"postinstall": "npx jetify",
......
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