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