Commit 5a971a0e by lhc

fix: bug

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