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
Email Patches
Plain Diff
Browse Files
Authored by
盖剑秋
8 years ago
Commit
55e4cc0cc6ec8d394dce27a4284302d4da4d53b4
1 parent
7bea4bba
Show anti fraud view controled by server. reviewed by Boss Hai.
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
3 deletions
js/order/Order.js
js/order/components/detail/Detail.js
js/order/constants/actionTypes.js
js/order/containers/DetailContainer.js
js/order/reducers/app/appActions.js
js/order/reducers/app/appInitialState.js
js/order/reducers/app/appReducer.js
js/order/Order.js
View file @
55e4cc0
...
...
@@ -15,7 +15,7 @@ import detailInitialState from './reducers/detail/detailInitialState';
import
ListContainer
from
'./containers/ListContainer'
;
import
DetailContainer
from
'./containers/DetailContainer'
;
import
{
setPlatform
,
setHost
,
setServiceHost
,
setSingleHost
,
setChannel
}
from
'./reducers/app/appActions'
;
import
{
setPlatform
,
setHost
,
setServiceHost
,
setSingleHost
,
setChannel
,
setShowAntiFraud
}
from
'./reducers/app/appActions'
;
import
{
setOrderCode
}
from
'./reducers/detail/detailActions'
;
...
...
@@ -41,6 +41,7 @@ export default function native(platform) {
store
.
dispatch
(
setServiceHost
(
this
.
props
.
serviceHost
));
store
.
dispatch
(
setSingleHost
(
this
.
props
.
singleHost
));
store
.
dispatch
(
setChannel
(
this
.
props
.
channelId
));
store
.
dispatch
(
setShowAntiFraud
(
this
.
props
.
showAntiFraud
));
let
type
=
this
.
props
.
type
;
if
(
type
==
'list'
)
{
store
.
dispatch
(
setShowIndex
(
this
.
props
.
firstShowIndex
));
...
...
js/order/components/detail/Detail.js
View file @
55e4cc0
...
...
@@ -189,7 +189,7 @@ export default class Detail extends Component {
}
let
dataSource
=
{
'tip'
:
data
'tip'
:
data
&&
this
.
props
.
showAntiFraud
?
[
1
]
:
[],
'address'
:
data
...
...
js/order/constants/actionTypes.js
View file @
55e4cc0
...
...
@@ -42,4 +42,5 @@ export default keyMirror({
DELETE_ORDER_SUCCESS
:
null
,
DELETE_ORDER_FAILURE
:
null
,
SET_SHOW_ANTI_FRAUD
:
null
,
});
...
...
js/order/containers/DetailContainer.js
View file @
55e4cc0
...
...
@@ -104,7 +104,7 @@ class DetailContainer extends Component {
}
onPressAntiFraudTip
()
{
ReactNative
.
NativeModules
.
YH_OrderHelper
.
jumpAntiFraudDetailViewController
();
}
showDelayDeliveryNotice
(
noticeString
){
...
...
@@ -115,6 +115,7 @@ class DetailContainer extends Component {
let
{
detail
,
app
}
=
this
.
props
;
return
(
<
Detail
showAntiFraud
=
{
app
.
showAntiFraud
}
resource
=
{
detail
}
channel
=
{
app
.
channel
}
onPressFooterAction
=
{
this
.
onPressFooterAction
}
...
...
js/order/reducers/app/appActions.js
View file @
55e4cc0
...
...
@@ -10,8 +10,16 @@ const {
SET_SINGLE_HOST
,
SET_YOHOOD_TICKET
,
SET_YOHOOD_TICKETS
,
SET_SHOW_ANTI_FRAUD
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
export
function
setShowAntiFraud
(
showAntiFraud
)
{
return
{
type
:
SET_SHOW_ANTI_FRAUD
,
payload
:
showAntiFraud
,
}
}
export
function
setPlatform
(
platform
)
{
return
{
type
:
SET_PLATFORM
,
...
...
js/order/reducers/app/appInitialState.js
View file @
55e4cc0
...
...
@@ -10,6 +10,7 @@ let InitialState = Record({
singleHost
:
'http://single.yoho.cn/favorite'
,
yohoodTicketSkn
:
'51335912'
,
yohoodTicketsSkn
:
'51335908'
,
showAntiFraud
:
true
,
});
export
default
InitialState
;
...
...
js/order/reducers/app/appReducer.js
View file @
55e4cc0
...
...
@@ -10,6 +10,7 @@ const {
SET_SINGLE_HOST
,
SET_YOHOOD_TICKETS
,
SET_YOHOOD_TICKET
,
SET_SHOW_ANTI_FRAUD
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
const
initialState
=
new
InitialState
;
...
...
@@ -18,6 +19,8 @@ export default function appReducer(state = initialState, action) {
if
(
!
(
state
instanceof
InitialState
))
return
initialState
.
merge
(
state
);
switch
(
action
.
type
)
{
case
SET_SHOW_ANTI_FRAUD
:
return
state
.
set
(
'showAntiFraud'
,
action
.
payload
);
case
SET_PLATFORM
:
return
state
.
set
(
'platform'
,
action
.
payload
);
case
SET_CHANNEL
:
...
...
Please
register
or
login
to post a comment