Commit c86c939c by Denglingling

1、修改【筛选】布局,封装为单独的组件;2、修改【订单明细】布局,增加详情弹窗;3、完善登录页【域名弹窗】

parent 6f3aef4b
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -49,17 +49,12 @@ class LoginPage extends Component{ ...@@ -49,17 +49,12 @@ class LoginPage extends Component{
componentDidMount() { componentDidMount() {
// this.subAutoLogin() // this.subAutoLogin()
SplashScreen.hide() //关闭启动屏幕 SplashScreen.hide() //关闭启动屏幕
// this.isOpenDomainModel()
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
// console.warn('this---',this.props.loginState)
// console.warn('next-----',nextProps.loginState)
if(this.props.loginState != nextProps.loginState) { if(this.props.loginState != nextProps.loginState) {
// console.warn('next-----',nextProps.loginState)
// console.warn('this---',this.props.loginState)
switch(nextProps.loginState) { switch(nextProps.loginState) {
case LOGIN_DOING: case LOGIN_DOING:
this.changeSubTit(true); this.changeSubTit(true);
...@@ -68,7 +63,6 @@ class LoginPage extends Component{ ...@@ -68,7 +63,6 @@ class LoginPage extends Component{
this.changeSubTit(); this.changeSubTit();
break; break;
case LOGIN_NO: case LOGIN_NO:
// console.warn('LOGIN_NO---',LOGIN_NO,this.props)
this.changeSubTit(); this.changeSubTit();
this.setState({ this.setState({
password: '' password: ''
...@@ -85,10 +79,19 @@ class LoginPage extends Component{ ...@@ -85,10 +79,19 @@ class LoginPage extends Component{
} }
// 获取当前用户名 ???
getLocalUserName() {
let {username} = this.props
if(username) {
this.setState({
username
})
}
}
// 判断是否打开域名弹窗 // 判断是否打开域名弹窗
isOpenDomainModel() { isOpenDomainModel() {
let {global_domain_config} = this.props let {global_domain_config} = this.props
console.log('isOpenDomainModel-----', global_domain_config)
let tempInd = global_domain_config.indexOf('/') + 2 let tempInd = global_domain_config.indexOf('/') + 2
let tempGlobalDomain = global_domain_config.slice(tempInd) let tempGlobalDomain = global_domain_config.slice(tempInd)
if(tempGlobalDomain.includes("obs.uat.guke.tech")) { if(tempGlobalDomain.includes("obs.uat.guke.tech")) {
...@@ -125,11 +128,11 @@ class LoginPage extends Component{ ...@@ -125,11 +128,11 @@ 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('请修改正确域名')
return // return
} // }
if (!isSubLoding) { if (!isSubLoding) {
if (isEmpty(username)) { if (isEmpty(username)) {
show('请输入用户名') show('请输入用户名')
...@@ -209,7 +212,6 @@ class LoginPage extends Component{ ...@@ -209,7 +212,6 @@ class LoginPage extends Component{
// 域名弹窗 回调 // 域名弹窗 回调
fillDomainCallBack(domainVal) { fillDomainCallBack(domainVal) {
// 存储值到 store // 存储值到 store
console.log('login-----', domainVal)
let {props} = this let {props} = this
props.setDomainConfigurate(domainVal) props.setDomainConfigurate(domainVal)
} }
...@@ -217,7 +219,6 @@ class LoginPage extends Component{ ...@@ -217,7 +219,6 @@ class LoginPage extends Component{
render() { render() {
let {username, password, isSubLoding, subTit, isShowDomain} = this.state let {username, password, isSubLoding, subTit, isShowDomain} = this.state
let {global_domain_config} = this.props let {global_domain_config} = this.props
console.log('login-----', global_domain_config)
let tempInd = global_domain_config.indexOf('/') + 2 let tempInd = global_domain_config.indexOf('/') + 2
let tempGlobalDomain = global_domain_config.slice(tempInd) let tempGlobalDomain = global_domain_config.slice(tempInd)
return ( return (
...@@ -260,6 +261,7 @@ class LoginPage extends Component{ ...@@ -260,6 +261,7 @@ class LoginPage extends Component{
returnKeyType="done" returnKeyType="done"
style={styles.row_input} style={styles.row_input}
defaultValue={password} defaultValue={password}
clearButtonMode="while-editing"
onChangeText={(text) => this.handlePassword(text)} onChangeText={(text) => this.handlePassword(text)}
/> />
</View> </View>
......
...@@ -20,7 +20,8 @@ import { ...@@ -20,7 +20,8 @@ import {
first_text_color, first_text_color,
btn_sub_color, btn_sub_color,
second_text_size, second_text_size,
title_text_color title_text_color,
pxSize
} from '../../../base/BaseStyle'; } from '../../../base/BaseStyle';
import { show } from '../../../utils/Utils'; import { show } from '../../../utils/Utils';
...@@ -36,7 +37,6 @@ class FillDomainModel extends Component { ...@@ -36,7 +37,6 @@ class FillDomainModel extends Component {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
console.log('nextProps.show----', nextProps.show, nextProps.domainValue)
if (this.state.isVisible != nextProps.show) { if (this.state.isVisible != nextProps.show) {
this.setState({ this.setState({
isVisible: nextProps.show isVisible: nextProps.show
...@@ -46,7 +46,7 @@ class FillDomainModel extends Component { ...@@ -46,7 +46,7 @@ class FillDomainModel extends Component {
let tempDomain = nextProps.domainValue let tempDomain = nextProps.domainValue
let {isVisible} = this.state let {isVisible} = this.state
if(tempDomain.includes("obs.uat.guke.tech")) { if(tempDomain.includes("obs.uat.guke.tech")) {
tempDomain = '' // tempDomain = ''
isVisible = true isVisible = true
} }
this.setState({ this.setState({
...@@ -65,7 +65,6 @@ class FillDomainModel extends Component { ...@@ -65,7 +65,6 @@ class FillDomainModel extends Component {
// 域名 输入 // 域名 输入
handleDomainInput(text) { handleDomainInput(text) {
console.log('text----', text)
let isNull = false let isNull = false
if(!text) { if(!text) {
isNull = true isNull = true
...@@ -78,10 +77,8 @@ class FillDomainModel extends Component { ...@@ -78,10 +77,8 @@ class FillDomainModel extends Component {
// 确定 // 确定
handleSubClick() { handleSubClick() {
let {defaDomainHead, domainValue, isNull} = this.state let {defaDomainHead, domainValue} = this.state
console.log('确定-----', defaDomainHead, domainValue)
if(!domainValue) { if(!domainValue) {
console.log('请输入域名!', isNull, domainValue)
this.setState({ this.setState({
isNull: true isNull: true
}) })
...@@ -141,17 +138,9 @@ class FillDomainModel extends Component { ...@@ -141,17 +138,9 @@ class FillDomainModel extends Component {
transparent={true} transparent={true}
visible={this.state.isVisible} visible={this.state.isVisible}
animationType={'fade'} animationType={'fade'}
// onRequestClose={() => this.closeModal()}
> >
<SafeAreaView style={safe_view}> <SafeAreaView style={safe_view}>
{/* <TouchableOpacity style={styles.container} activeOpacity={1}
// onPress={() => this.closeModal()}
>
{this.renderDialog()}
</TouchableOpacity> */}
<View style={styles.container}> <View style={styles.container}>
{/* <Text>hhh</Text> */}
{this.renderDialog()} {this.renderDialog()}
</View> </View>
</SafeAreaView> </SafeAreaView>
...@@ -167,9 +156,7 @@ const styles = StyleSheet.create({ ...@@ -167,9 +156,7 @@ const styles = StyleSheet.create({
}, },
container: { container: {
flex: 1, flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.8)', backgroundColor: 'rgba(0, 0, 0, 0.5)'
// paddingTop: '55%',
// alignItems: 'center'
}, },
cont_mian: { cont_mian: {
flex: 1, flex: 1,
...@@ -184,7 +171,7 @@ const styles = StyleSheet.create({ ...@@ -184,7 +171,7 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'column', flexDirection: 'column',
backgroundColor: foundation_color, backgroundColor: foundation_color,
height: pxHeight(400), height: pxSize(360),
borderRadius: 10, borderRadius: 10,
marginHorizontal: 30, marginHorizontal: 30,
marginVertical: 20, marginVertical: 20,
...@@ -192,18 +179,15 @@ const styles = StyleSheet.create({ ...@@ -192,18 +179,15 @@ const styles = StyleSheet.create({
paddingBottom: 60, paddingBottom: 60,
paddingHorizontal: 20 paddingHorizontal: 20
}, },
cont_tit_box: { cont_tit_box: {},
height: 20
},
cont_tit: { cont_tit: {
color: promary_text_color, color: promary_text_color,
fontSize: 20, fontSize: 20,
lineHeight: 28,
fontFamily: font_family_semibold fontFamily: font_family_semibold
}, },
cont_cell: { cont_cell: {
height: 45, height: 45,
// borderWidth: 1,
// borderColor: '#FF0000',
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
borderRadius: 100, borderRadius: 100,
......
...@@ -16,7 +16,7 @@ const defaultState = { ...@@ -16,7 +16,7 @@ const defaultState = {
token:null, token:null,
username:'', username:'',
password:'', password:'',
global_domain_config: 'https://obs.uat.guke.tech', // 默认【深圳仓】;【十方】https://obs.uat.sfrx.guke.tech global_domain_config: 'https://obs.uat.sfrx.guke.tech', // 默认【深圳仓】https://obs.uat.guke.tech;【十方】https://obs.uat.sfrx.guke.tech
} }
export default login = (state = defaultState, action) => { export default login = (state = defaultState, action) => {
......
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