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 08:49:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ce13eb175c9ed55bfc983dda2ce57a54b562450e
ce13eb17
1 parent
40717f52
客户管理入口
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
21 deletions
index.ios.js
src/pages/Customer/index.js
index.ios.js
View file @
ce13eb1
...
...
@@ -53,29 +53,27 @@ const MainTabBar = TabNavigator(
)
}
},
Customer
:
{
screen
:
Customer
,
InsuranceChurch
:
{
screen
:
InsuranceChurch
,
navigationOptions
:
{
title
:
"客户管理"
,
// header: null,
// tabBarVisible: false,
title
:
"保堂"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
discover
_s.png"
)}
/
>
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
umbrella
_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
discover
_n.png"
)}
/
>
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
umbrella
_n.png"
)}
/
>
)
}
},
InsuranceChurch
:
{
screen
:
InsuranceChurch
,
Customer
:
{
screen
:
Customer
,
navigationOptions
:
{
title
:
"
保堂
"
,
title
:
"
客户管理
"
,
tabBarIcon
:
({
focused
})
=>
focused
?
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
umbrella
_s.png"
)}
/
>
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
discover
_s.png"
)}
/
>
)
:
(
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
umbrella
_n.png"
)}
/
>
<
Image
source
=
{
require
(
"./src/assets/tabbar/ic_
discover
_n.png"
)}
/
>
)
}
},
...
...
src/pages/Customer/index.js
View file @
ce13eb1
...
...
@@ -8,7 +8,7 @@ import {
TouchableOpacity
,
ScrollView
,
ListView
,
Dimensions
,
Dimensions
}
from
"react-native"
;
import
{
StackNavigator
,
TabNavigator
}
from
"react-navigation"
;
import
post
from
"../../utils/fetch"
;
...
...
@@ -28,7 +28,7 @@ export default class Home extends Component {
getAllPhone
()
{
Contacts
.
getAll
((
err
,
contacts
)
=>
{
if
(
err
&&
err
.
type
===
'permissionDenied'
)
{
if
(
err
&&
err
.
type
===
"permissionDenied"
)
{
}
else
{
let
phones
=
[];
contacts
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -36,11 +36,16 @@ export default class Home extends Component {
phones
.
push
(
phone
.
number
);
});
});
post
(
'/spreader/rank/friends/contact'
,
{
contact
:
phones
},
(
res
)
=>
{
this
.
getRankData
();
},
(
resErr
)
=>
{
Toast
.
show
(
resErr
.
cnmsg
,
Toast
.
error
);
});
post
(
"/spreader/rank/friends/contact"
,
{
contact
:
phones
},
res
=>
{
this
.
getRankData
();
},
resErr
=>
{
Toast
.
show
(
resErr
.
cnmsg
,
Toast
.
error
);
}
);
}
});
}
...
...
@@ -49,7 +54,32 @@ export default class Home extends Component {
const
{
navigate
}
=
this
.
props
.
navigation
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
客户管理页面
<
/Text
>
<
Begin
/>
<
/View
>
);
}
}
class
Begin
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
}
render
()
{
return
(
<
View
style
=
{
styles
.
beginContaier
}
>
<
Image
source
=
{
require
(
"../../assets/customer/pic.png"
)}
style
=
{
styles
.
beginPic
}
/
>
<
View
style
=
{
styles
.
beginBtnContaier
}
>
<
TouchableOpacity
style
=
{
styles
.
beginBtnLeft
}
>
<
Text
style
=
{
styles
.
beginBtnLeftText
}
>
手动选择
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
beginBtnRight
}
>
<
Text
style
=
{
styles
.
beginBtnRightText
}
>
通信录导入
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
}
...
...
@@ -61,5 +91,48 @@ const styles = StyleSheet.create({
justifyContent
:
"flex-start"
,
alignItems
:
"stretch"
,
backgroundColor
:
"#EFEFEF"
}
},
beginContaier
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
backgroundColor
:
"#fff"
,
paddingBottom
:
50
,
},
beginPic
:
{
width
:
189
,
height
:
193
,
},
beginBtnContaier
:
{
flexDirection
:
"row"
,
marginHorizontal
:
30
,
marginTop
:
40
,
},
beginBtnLeft
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
paddingVertical
:
12
,
borderStyle
:
"solid"
,
borderColor
:
"#999"
,
borderWidth
:
1
,
borderRadius
:
5
,
},
beginBtnLeftText
:
{
fontSize
:
16
,
color
:
"#242424"
,
},
beginBtnRight
:
{
flex
:
1
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
paddingVertical
:
12
,
marginLeft
:
20
,
borderRadius
:
5
,
backgroundColor
:
"#1B9341"
,
},
beginBtnRightText
:
{
fontSize
:
16
,
color
:
"white"
,
},
});
...
...
Please
register
or
login
to post a comment