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 10:25:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e28937afc722ae7111ee8a1b226c07933bd3236f
e28937af
1 parent
c5208c7e
customer Edit
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
4 deletions
index.ios.js
src/pages/Customer/edit.js
src/pages/Customer/index.js
index.ios.js
View file @
e28937a
...
...
@@ -13,6 +13,7 @@ import InsuranceCircle from "./src/pages/InsuranceCircle/index";
import
InsuranceChurch
from
"./src/pages/InsuranceChurch/index"
;
import
Mine
from
"./src/pages/Mine/index"
;
import
Customer
from
"./src/pages/Customer/index"
;
import
CustomerEdit
from
"./src/pages/Customer/edit"
;
import
Login
from
"./src/pages/Login"
;
import
AllProduct
from
"./src/pages/Home/allProduct"
;
import
ProductTemplate
from
"./src/Components/ProductTemplate"
;
...
...
@@ -107,6 +108,7 @@ const ProtectGod = StackNavigator(
Mine
:
{
screen
:
Mine
},
Login
:
{
screen
:
Login
},
Customer
:
{
screen
:
Customer
},
CustomerEdit
:
{
screen
:
CustomerEdit
},
AllProduct
:
{
screen
:
AllProduct
,
navigationOptions
:
{
headerTitle
:
"全部产品"
}
...
...
src/pages/Customer/edit.js
0 → 100644
View file @
e28937a
import
React
,
{
Component
}
from
"react"
;
import
{
AppRegistry
,
StyleSheet
,
Text
,
View
,
Image
,
TouchableOpacity
,
ScrollView
,
ListView
,
Dimensions
,
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
export
default
class
Edit
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
}
componentWillMount
()
{}
componentDidMount
()
{}
getListData
()
{
post
(
"/test/insurance/article"
,
{},
res
=>
{},
err
=>
{});
}
render
()
{
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
编辑客户信息
<
/Text
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#EFEFEF"
}
});
...
...
src/pages/Customer/index.js
View file @
e28937a
...
...
@@ -13,7 +13,7 @@ import {
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
export
default
class
Home
extends
Component
{
export
default
class
Customer
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
@@ -59,7 +59,7 @@ export default class Home extends Component {
return
(
<
View
style
=
{
styles
.
container
}
>
{
hasCustomer
?
(
<
Main
customersList
=
{
this
.
state
.
customersList
}
/
>
<
Main
customersList
=
{
this
.
state
.
customersList
}
navigation
=
{
this
.
props
.
navigation
}
/
>
)
:
(
<
Begin
/>
)}
...
...
@@ -101,6 +101,7 @@ class Main extends Component {
render
()
{
const
{
customersList
}
=
this
.
props
;
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
mainContaier
}
>
<
View
style
=
{
styles
.
mainBtnContaier
}
>
...
...
@@ -122,7 +123,7 @@ class Main extends Component {
<
ScrollView
style
=
{
styles
.
mainSvcContainer
}
>
{
customersList
.
map
((
item
,
index
)
=>
{
return
(
<
TouchableOpacity
key
=
{
index
}
style
=
{
styles
.
mainCustomerItem
}
>
<
TouchableOpacity
key
=
{
index
}
style
=
{
styles
.
mainCustomerItem
}
onPress
=
{()
=>
navigate
(
"CustomerEdit"
)}
>
<
Text
style
=
{
styles
.
mainCustomerItemText
}
>
{
item
}
<
/Text
>
<
Image
style
=
{
styles
.
mainCustomerItemImg
}
source
=
{
require
(
"../../assets/customer/rightArrow_gray.png"
)}
/
>
<
/TouchableOpacity
>
...
...
@@ -226,6 +227,7 @@ const styles = StyleSheet.create({
color
:
"#242424"
},
mainSvcContainer
:
{
flex
:
1
,
backgroundColor
:
"white"
,
},
mainCustomerItem
:
{
...
...
@@ -238,7 +240,7 @@ const styles = StyleSheet.create({
marginRight
:
10
,
borderStyle
:
"solid"
,
borderColor
:
"#F2F2F2"
,
border
Top
Width
:
1
,
border
Bottom
Width
:
1
,
},
mainCustomerItemText
:
{
fontSize
:
16
,
...
...
Please
register
or
login
to post a comment