Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
张文文
6 years ago
Commit
74105950d7dc49ba8a5be6163515ce0366c9a70a
2 parents
47a138ce
72964669
Merge branch 'V6.9.6_Alliance' into V6.9.7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
js/alliance/components/NameAuthen.js
js/alliance/containers/NameAuthenContainer.js
js/alliance/reducers/alliance/allianceActions.js
js/alliance/components/NameAuthen.js
View file @
7410595
...
...
@@ -219,10 +219,10 @@ export default class NameAuthen extends Component {
{
isShowToast
?
<
Prompt
text
=
{
toastMessage
}
duration
=
{
15
00
}
duration
=
{
8
00
}
onPromptHidden
=
{
this
.
props
.
hideToastMessage
}
/> : null
}
<
YH_ActionSheet
ref
=
"YH_ActionSheet"
items
=
{[{
title
:
'拍照'
,
id
:
'1'
},{
title
:
'从相册中选择'
,
id
:
'2'
}]}
...
...
js/alliance/containers/NameAuthenContainer.js
View file @
7410595
'use strict'
import
React
,
{
Component
}
from
"react"
;
import
{
StyleSheet
,
View
,
NativeModules
,
DeviceEventEmitter
}
from
"react-native"
;
import
ReactNative
,
{
StyleSheet
,
View
,
NativeModules
,
DeviceEventEmitter
}
from
"react-native"
;
import
{
bindActionCreators
}
from
"redux"
;
import
{
connect
}
from
"react-redux"
;
import
{
Map
}
from
"immutable"
;
import
TimerMixin
from
'react-timer-mixin'
;
import
*
as
allianceActions
from
'../reducers/alliance/allianceActions'
;
...
...
@@ -48,7 +49,7 @@ class NameAuthenContainer extends Component {
}
componentWillUnmount
()
{
this
.
timer
&&
TimerMixin
.
clearTimeout
(
this
.
timer
);
}
showLoading
(
show
){
...
...
@@ -83,7 +84,15 @@ class NameAuthenContainer extends Component {
return
;
}
this
.
props
.
actions
.
bindIdentityCard
(
cardFrontUrl
,
cardBackUrl
);
this
.
props
.
actions
.
bindIdentityCard
(
cardFrontUrl
,
cardBackUrl
,
(
json
)
=>
{
this
.
timer
=
TimerMixin
.
setTimeout
(()
=>
{
ReactNative
.
NativeModules
.
YH_CommonHelper
.
goBack
();
//绑定成功后更新绑定状态
DeviceEventEmitter
.
emit
(
'IdentityCardBindSuccessEvent'
);
},
1000
);
});
})
.
catch
(
error
=>
{
this
.
showLoading
(
false
);
...
...
js/alliance/reducers/alliance/allianceActions.js
View file @
7410595
...
...
@@ -1434,7 +1434,7 @@ function exposeProductListData(json) {
}
export
function
bindIdentityCard
(
cardFrontUrl
,
cardBackUrl
)
{
export
function
bindIdentityCard
(
cardFrontUrl
,
cardBackUrl
,
callback
)
{
return
(
dispatch
,
getState
)
=>
{
let
{
app
,
alliance
}
=
getState
();
...
...
@@ -1445,9 +1445,7 @@ export function bindIdentityCard(cardFrontUrl, cardBackUrl) {
dispatch
(
bindIdentityCardSuccess
(
json
));
dispatch
(
showToastMessage
(
'绑定成功'
));
ReactNative
.
NativeModules
.
YH_CommonHelper
.
goBack
();
//绑定成功后更新绑定状态
DeviceEventEmitter
.
emit
(
'IdentityCardBindSuccessEvent'
);
callback
&&
typeof
callback
===
'function'
&&
callback
(
json
)
})
.
catch
(
error
=>
{
dispatch
(
bindIdentityCardFailure
(
error
));
...
...
Please
register
or
login
to post a comment