Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
714aea8d
authored
May 29, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加tab标签,修改 debug下可以运行,正常点击不可运行的问题,重新修改加载【历史订单】页面的方法
parent
6cf3dd25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
41 deletions
app/containers/historicalOrder/HistoricalOrderPage.js
app/containers/home/HomePage.js
app/containers/login/LoginPage.js
app/containers/historicalOrder/HistoricalOrderPage.js
View file @
714aea8d
...
@@ -385,13 +385,14 @@ class HistoricalOrderPage extends Component {
...
@@ -385,13 +385,14 @@ class HistoricalOrderPage extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getSellerName
()
this
.
getSellerName
()
this
.
handleSubmitCheck
(
true
)
this
.
handleSubmitCheck
(
'mount'
)
}
}
// 赋值销售员 初始化数据
// 赋值销售员 初始化数据
getSellerName
()
{
getSellerName
()
{
let
{
state
,
props
}
=
this
let
{
state
,
props
}
=
this
let
{
borrowListOptionData
,
consumeListOptionData
,
transferListOptionData
}
=
this
.
state
let
{
borrowListOptionData
,
consumeListOptionData
,
transferListOptionData
}
=
this
.
state
let
that
=
this
this
.
setState
({
this
.
setState
({
subBorrowInitListOption
:
cloneObject
(
borrowListOptionData
),
// 存储初始化数据,重置时付此值
subBorrowInitListOption
:
cloneObject
(
borrowListOptionData
),
// 存储初始化数据,重置时付此值
subConsumeInitListOption
:
cloneObject
(
consumeListOptionData
),
subConsumeInitListOption
:
cloneObject
(
consumeListOptionData
),
...
@@ -1259,9 +1260,6 @@ class HistoricalOrderPage extends Component {
...
@@ -1259,9 +1260,6 @@ class HistoricalOrderPage extends Component {
handleSubmitCheck
(
noCloseSel
)
{
handleSubmitCheck
(
noCloseSel
)
{
// console.log('筛选 - 确定---')
// console.log('筛选 - 确定---')
// this.changeSeaColorAct()
// 有问题 ===============!!!====================
let
{
let
{
topActiveIndex
,
topActiveIndex
,
borrowListOptionData
,
borrowListOptionData
,
...
@@ -1273,9 +1271,16 @@ class HistoricalOrderPage extends Component {
...
@@ -1273,9 +1271,16 @@ class HistoricalOrderPage extends Component {
contOptionData
contOptionData
}
=
this
.
state
}
=
this
.
state
let
{
props
}
=
this
let
{
props
}
=
this
if
(
!
noCloseSel
)
{
this
.
handleSelectClick
()
// 关闭筛选
if
(
noCloseSel
==
'close'
)
{
}
this
.
setState
({
isShowSelect
:
false
// 关闭筛选
})
}
else
if
(
noCloseSel
!=
'close'
&&
noCloseSel
!=
'mount'
)
{
this
.
handleSelectClick
()
// 切换筛选
// this.changeSeaColorAct() // 改变筛选颜色
}
this
.
setState
({
this
.
setState
({
contOptionData
:
[]
// 清空数据
contOptionData
:
[]
// 清空数据
})
})
...
@@ -1355,18 +1360,21 @@ class HistoricalOrderPage extends Component {
...
@@ -1355,18 +1360,21 @@ class HistoricalOrderPage extends Component {
switch
(
topActiveIndex
)
{
switch
(
topActiveIndex
)
{
case
0
:
case
0
:
searchColorIsAct
=
this
.
bothArrayIsCom
(
borrowListOptionData
,
subBorrowInitListOption
);
searchColorIsAct
=
this
.
bothArrayIsCom
(
borrowListOptionData
,
subBorrowInitListOption
);
this
.
setState
({
searchColorIsAct
})
break
;
break
;
case
1
:
case
1
:
searchColorIsAct
=
this
.
bothArrayIsCom
(
consumeListOptionData
,
subConsumeInitListOption
);
searchColorIsAct
=
this
.
bothArrayIsCom
(
consumeListOptionData
,
subConsumeInitListOption
);
this
.
setState
({
searchColorIsAct
})
break
;
break
;
case
2
:
case
2
:
break
;
break
;
default
:
default
:
break
;
break
;
}
}
this
.
setState
({
searchColorIsAct
})
}
}
// 判断两个引用数组是否相同
// 判断两个引用数组是否相同
...
@@ -1406,7 +1414,7 @@ class HistoricalOrderPage extends Component {
...
@@ -1406,7 +1414,7 @@ class HistoricalOrderPage extends Component {
topActiveIndex
:
index
topActiveIndex
:
index
},
()
=>
{
},
()
=>
{
// 获取数据
// 获取数据
this
.
handleSubmitCheck
(
true
)
this
.
handleSubmitCheck
(
'close'
)
})
})
}
}
...
@@ -2208,17 +2216,17 @@ class HistoricalOrderPage extends Component {
...
@@ -2208,17 +2216,17 @@ class HistoricalOrderPage extends Component {
}
}
render
()
{
render
()
{
let
{
navigation
}
=
this
.
props
//
let {navigation} = this.props
let
{
title
}
=
navigation
.
state
.
params
//
let {title} = navigation.state.params
return
(
return
(
<
View
style
=
{
styles
.
hist_container
}
>
//
<View style={styles.hist_container}>
<
StatusBarView
//
<StatusBarView
isReactStackNavigator
=
{
true
}
//
isReactStackNavigator={true}
backgroundColor
=
{
promary_color
}
//
backgroundColor={promary_color}
barStyle
=
'light-content'
//
barStyle = 'light-content'
/>
//
/>
<
SafeAreaView
style
=
{
safe_view
}
>
//
<SafeAreaView style={safe_view}>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
/
>
//
<HeadBackItem title={title} navigation={navigation} />
<
View
style
=
{
styles
.
hist_main
}
>
<
View
style
=
{
styles
.
hist_main
}
>
{
/* { this.renderSearchItem() } */
}
{
/* { this.renderSearchItem() } */
}
...
@@ -2227,8 +2235,8 @@ class HistoricalOrderPage extends Component {
...
@@ -2227,8 +2235,8 @@ class HistoricalOrderPage extends Component {
{
this
.
renderLodingItem
()}
{
this
.
renderLodingItem
()}
<
/View
>
<
/View
>
<
/SafeAreaView
>
//
</SafeAreaView>
<
/View
>
//
</View>
);
);
}
}
}
}
...
@@ -2246,7 +2254,8 @@ const styles = StyleSheet.create({
...
@@ -2246,7 +2254,8 @@ const styles = StyleSheet.create({
loding_back
:
{
loding_back
:
{
backgroundColor
:
'rgba(0, 0, 0, 0)'
backgroundColor
:
'rgba(0, 0, 0, 0)'
},
},
cont_item_box
:
{},
cont_item_box
:
{
},
top_box
:
{},
top_box
:
{},
top_tab_cont
:
{
top_tab_cont
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
...
@@ -2309,7 +2318,7 @@ const styles = StyleSheet.create({
...
@@ -2309,7 +2318,7 @@ const styles = StyleSheet.create({
marginLeft
:
4
marginLeft
:
4
},
},
sea_main
:
{
sea_main
:
{
height
:
75
0
,
height
:
80
0
,
backgroundColor
:
'rgba(0, 0, 0, .5)'
,
backgroundColor
:
'rgba(0, 0, 0, .5)'
,
position
:
'absolute'
,
position
:
'absolute'
,
top
:
44
,
top
:
44
,
...
@@ -2322,7 +2331,7 @@ const styles = StyleSheet.create({
...
@@ -2322,7 +2331,7 @@ const styles = StyleSheet.create({
sea_container
:
{
sea_container
:
{
// backgroundColor: '#000',
// backgroundColor: '#000',
// minHeight: Height() - 218,
// minHeight: Height() - 218,
height
:
Height
()
-
218
,
height
:
Height
()
-
300
,
// height: Height() - 170
// height: Height() - 170
},
},
sea_scroll
:
{
sea_scroll
:
{
...
@@ -2519,7 +2528,7 @@ const styles = StyleSheet.create({
...
@@ -2519,7 +2528,7 @@ const styles = StyleSheet.create({
cont_main
:
{
cont_main
:
{
backgroundColor
:
foundation_color
,
backgroundColor
:
foundation_color
,
maxHeight
:
Height
()
-
176
,
maxHeight
:
Height
()
-
176
,
minHeight
:
pxHeight
(
5
2
0
)
minHeight
:
pxHeight
(
5
3
0
)
},
},
cont_scroll
:
{},
cont_scroll
:
{},
cont_box
:
{},
cont_box
:
{},
...
...
app/containers/home/HomePage.js
View file @
714aea8d
...
@@ -21,8 +21,9 @@ import {
...
@@ -21,8 +21,9 @@ import {
import
{
exitLoginStatus
}
from
'../../action/LoginAction'
;
import
{
exitLoginStatus
}
from
'../../action/LoginAction'
;
import
HeadBackItem
from
'../common/HeadBackItem'
;
import
HeadBackItem
from
'../common/HeadBackItem'
;
import
StatusBarView
from
'../common/StatusBarView'
;
import
StatusBarView
from
'../common/StatusBarView'
;
import
ScrollableTabView
from
'react-native-scrollable-tab-view'
;
import
ScrollableTabView
,
{
DefaultTabBar
}
from
'react-native-scrollable-tab-view'
;
import
TabBottomItem
from
'./module/TabBottomItem'
;
import
TabBottomItem
from
'./module/TabBottomItem'
;
import
HistoricalOrderPage
from
'../historicalOrder/HistoricalOrderPage'
;
class
HomePage
extends
Component
{
class
HomePage
extends
Component
{
...
@@ -62,8 +63,8 @@ class HomePage extends Component {
...
@@ -62,8 +63,8 @@ class HomePage extends Component {
}
}
],
],
tabNames
:
[
'业务模块'
,
'历史订单'
],
tabNames
:
[
'业务模块'
,
'历史订单'
],
tabIconNames
:
[
require
(
'../../images/tab_
init.png'
),
require
(
'../../images/tab_init
.png'
)],
tabIconNames
:
[
require
(
'../../images/tab_
mod_def.png'
),
require
(
'../../images/tab_his_def
.png'
)],
tabSelIconNames
:[
require
(
'../../images/tab_
act.png'
),
require
(
'../../images/tab_act
.png'
)],
tabSelIconNames
:[
require
(
'../../images/tab_
mod_sel.png'
),
require
(
'../../images/tab_his_sel
.png'
)],
initialPage
:
0
initialPage
:
0
}
}
}
}
...
@@ -84,14 +85,14 @@ class HomePage extends Component {
...
@@ -84,14 +85,14 @@ class HomePage extends Component {
// 切换 Tab 标签
// 切换 Tab 标签
switchTabView
(
obj
)
{
switchTabView
(
obj
)
{
console
.
log
(
'切换==='
,
obj
)
console
.
log
(
'切换==='
,
obj
)
if
(
obj
.
i
==
1
)
{
//
if(obj.i == 1) {
// 跳转到历史订单页面
//
// 跳转到历史订单页面
this
.
props
.
navigation
.
navigate
(
'HistoricalOrderPage'
,
{
title
:
'历史订单'
})
//
this.props.navigation.navigate('HistoricalOrderPage', {title: '历史订单'})
this
.
setState
({
//
this.setState({
initialPage
:
0
//
initialPage: 0
})
//
})
}
//
}
}
}
// 跳转页面
// 跳转页面
...
@@ -127,13 +128,14 @@ class HomePage extends Component {
...
@@ -127,13 +128,14 @@ class HomePage extends Component {
tabBarPosition
=
'bottom'
tabBarPosition
=
'bottom'
locked
=
{
true
}
locked
=
{
true
}
renderTabBar
=
{()
=>
renderTabBar
=
{()
=>
// <DefaultTabBar />
<
TabBottomItem
<
TabBottomItem
tabNames
=
{
tabNames
}
tabNames
=
{
tabNames
}
tabIconNames
=
{
tabIconNames
}
tabIconNames
=
{
tabIconNames
}
tabSelIconNames
=
{
tabSelIconNames
}
tabSelIconNames
=
{
tabSelIconNames
}
/
>
/
>
}
}
onChangeTab
=
{(
obj
)
=>
this
.
switchTabView
(
obj
)}
//
onChangeTab={(obj) => this.switchTabView(obj)}
>
>
<
View
style
=
{
styles
.
home_cont
}
tabLabel
=
{
tabNames
[
0
]}
>
<
View
style
=
{
styles
.
home_cont
}
tabLabel
=
{
tabNames
[
0
]}
>
{
{
...
@@ -154,7 +156,10 @@ class HomePage extends Component {
...
@@ -154,7 +156,10 @@ class HomePage extends Component {
)
)
}
}
<
/View
>
<
/View
>
<
Text
tabLabel
=
{
tabNames
[
1
]}
>------
Tab2
------<
/Text
>
{
/* <Text tabLabel={tabNames[0]}>------Tab1-----</Text> */
}
<
View
style
=
{{
flex
:
1
}}
tabLabel
=
{
tabNames
[
1
]}
>
<
HistoricalOrderPage
navigation
=
{
navigation
}
/
>
<
/View
>
<
/ScrollableTabView
>
<
/ScrollableTabView
>
...
@@ -177,6 +182,8 @@ class HomePage extends Component {
...
@@ -177,6 +182,8 @@ class HomePage extends Component {
)
)
}
}
</View> */
}
</View> */
}
<
/SafeAreaView
>
<
/SafeAreaView
>
<
/View
>
<
/View
>
);
);
...
...
app/containers/login/LoginPage.js
View file @
714aea8d
...
@@ -50,6 +50,7 @@ class LoginPage extends Component{
...
@@ -50,6 +50,7 @@ class LoginPage extends Component{
componentDidMount
()
{
componentDidMount
()
{
// this.subAutoLogin()
// this.subAutoLogin()
SplashScreen
.
hide
()
//关闭启动屏幕
SplashScreen
.
hide
()
//关闭启动屏幕
// this.isOpenDomainModel()
}
}
componentWillReceiveProps
(
nextProps
)
{
componentWillReceiveProps
(
nextProps
)
{
...
@@ -84,6 +85,24 @@ class LoginPage extends Component{
...
@@ -84,6 +85,24 @@ class LoginPage extends Component{
}
}
// 判断是否打开域名弹窗
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"
))
{
this
.
setState
({
isShowDomain
:
true
})
}
else
{
this
.
setState
({
isShowDomain
:
false
})
}
}
// 登录中 || 登录成功/失败
// 登录中 || 登录成功/失败
changeSubTit
(
loading
)
{
changeSubTit
(
loading
)
{
let
{
subTitList
}
=
this
.
state
let
{
subTitList
}
=
this
.
state
...
@@ -106,13 +125,18 @@ class LoginPage extends Component{
...
@@ -106,13 +125,18 @@ 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
if
(
global_domain_config
.
includes
(
"obs.uat.guke.tech"
))
{
show
(
'请修改正确域名'
)
return
}
if
(
!
isSubLoding
)
{
if
(
!
isSubLoding
)
{
if
(
isEmpty
(
username
))
{
if
(
isEmpty
(
username
))
{
show
(
'请输入用户名'
,
'warn'
)
show
(
'请输入用户名'
)
return
return
}
}
if
(
isEmpty
(
password
))
{
if
(
isEmpty
(
password
))
{
show
(
'请输入密码'
,
'warn'
)
show
(
'请输入密码'
)
return
return
}
}
let
params
=
{
let
params
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment