Toggle navigation
Toggle navigation
This project
Loading...
Sign in
罗广聪
/
ProtectGod
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
罗广聪
2017-09-29 12:01:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df2d47cb34f9b2ba77ec04f0d83f74c74c73753f
df2d47cb
1 parent
45fdb220
手动添加 跳转
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
12 deletions
src/pages/Customer/edit.js
src/pages/Customer/index.js
src/pages/Customer/edit.js
View file @
df2d47c
...
...
@@ -33,7 +33,7 @@ export default class Edit extends Component {
<
View
style
=
{
styles
.
infoContaier
}
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
昵称
<
/Text
>
<
Text
style
=
{
styles
.
leftTitle
}
>
姓名
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
周周周
<
/Text
>
...
...
@@ -45,10 +45,10 @@ export default class Edit extends Component {
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
昵称
<
/Text
>
<
Text
style
=
{
styles
.
leftTitle
}
>
年龄
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
周周周
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
18
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
...
...
@@ -57,10 +57,10 @@ export default class Edit extends Component {
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
昵称
<
/Text
>
<
Text
style
=
{
styles
.
leftTitle
}
>
手机号码
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
周周周
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
13570000000
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
...
...
@@ -69,10 +69,58 @@ export default class Edit extends Component {
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
昵称
<
/Text
>
<
Text
style
=
{
styles
.
leftTitle
}
>
性别
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
周周周
<
/Text
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
男
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
客户状态
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
已签单
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
客户来源
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
芒果钱包
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
婚姻状态
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
未婚
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
/
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
itemContainer
}
onPress
=
{()
=>
{}}
>
<
View
style
=
{
styles
.
itemLeft
}
>
<
Text
style
=
{
styles
.
leftTitle
}
>
是否生育
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
itemRight
}
>
<
Text
style
=
{
styles
.
itemRightContent
}
>
否
<
/Text
>
<
Image
style
=
{
styles
.
itemRightImg
}
source
=
{
require
(
"../../assets/Mine/rightArrow_gray.png"
)}
...
...
@@ -93,7 +141,7 @@ const styles = StyleSheet.create({
backgroundColor
:
"#F0F0F0"
},
infoContaier
:
{
marginVertical
:
10
,
marginVertical
:
10
},
itemContainer
:
{
height
:
46
,
...
...
src/pages/Customer/index.js
View file @
df2d47c
...
...
@@ -8,7 +8,8 @@ import {
TouchableOpacity
,
ScrollView
,
ListView
,
Dimensions
Dimensions
,
AsyncStorage
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
...
...
@@ -17,6 +18,10 @@ export default class Customer extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
IS_LOGIN
:
""
,
USER_ID
:
""
,
NICKNAME
:
""
,
PROFESSION
:
""
,
hasCustomer
:
true
,
customersList
:
[
"张某某"
,
"周某某"
,
"林某某"
,
"李某某"
]
};
...
...
@@ -52,7 +57,26 @@ export default class Customer extends Component {
});
}
getAsyncStorage
()
{
const
that
=
this
;
AsyncStorage
.
multiGet
(
[
"IS_LOGIN"
,
"USER_ID"
,
"NICKNAME"
,
"PROFESSION"
],
(
err
,
result
)
=>
{
if
(
err
)
{
console
.
error
(
err
);
}
that
.
setState
({
IS_LOGIN
:
result
[
0
][
1
],
USER_ID
:
result
[
1
][
1
]
!=
null
?
result
[
1
][
1
]
:
""
,
NICKNAME
:
result
[
2
][
1
]
!=
null
?
result
[
2
][
1
]
:
""
,
PROFESSION
:
result
[
3
][
1
]
!=
null
?
result
[
3
][
1
]
:
""
});
}
);
}
_renderBegin
()
{
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
beginContaier
}
>
<
Image
...
...
@@ -60,7 +84,7 @@ export default class Customer extends Component {
style
=
{
styles
.
beginPic
}
/
>
<
View
style
=
{
styles
.
beginBtnContaier
}
>
<
TouchableOpacity
style
=
{
styles
.
beginBtnLeft
}
>
<
TouchableOpacity
style
=
{
styles
.
beginBtnLeft
}
onPress
=
{()
=>
{
navigate
(
"CustomerEdit"
)}}
>
<
Text
style
=
{
styles
.
beginBtnLeftText
}
>
手动选择
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
beginBtnRight
}
>
...
...
@@ -76,7 +100,7 @@ export default class Customer extends Component {
return
(
<
View
style
=
{
styles
.
mainContaier
}
>
<
View
style
=
{
styles
.
mainBtnContaier
}
>
<
TouchableOpacity
style
=
{
styles
.
mainBtnContaierLeft
}
>
<
TouchableOpacity
style
=
{
styles
.
mainBtnContaierLeft
}
onPress
=
{()
=>
{
navigate
(
"CustomerEdit"
)}}
>
<
Image
style
=
{
styles
.
mainBtnLeftImg
}
source
=
{
require
(
"../../assets/customer/ic_add.png"
)}
...
...
@@ -114,7 +138,7 @@ export default class Customer extends Component {
render
()
{
const
{
navigate
}
=
this
.
props
.
navigation
;
const
{
hasCustomer
,
customers
}
=
this
.
state
;
const
{
IS_LOGIN
,
hasCustomer
,
customers
}
=
this
.
state
;
return
(
<
View
style
=
{
styles
.
container
}
>
{
hasCustomer
?
(
...
...
Please
register
or
login
to post a comment