...
|
...
|
@@ -60,6 +60,8 @@ const { |
|
|
GET_ANNOUNCEMENT_SUCCESS,
|
|
|
GET_ANNOUNCEMENT_FAILURE,
|
|
|
|
|
|
GET_CURRENT_CHANNEL_SUCCESS,
|
|
|
|
|
|
GET_GLOBALORDERSTATE_REQUEST,
|
|
|
GET_GLOBALORDERSTATE_SUCCESS,
|
|
|
GET_GLOBALORDERSTATE_FAILURE,
|
...
|
...
|
@@ -297,6 +299,13 @@ export function getAnnouncementFailure() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
export function getCurrentChannelSuccess(json) {
|
|
|
return {
|
|
|
type: GET_CURRENT_CHANNEL_SUCCESS,
|
|
|
payload: json,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function getGlobalOrderStateSuccess(json) {
|
|
|
return {
|
|
|
type: GET_GLOBALORDERSTATE_SUCCESS,
|
...
|
...
|
@@ -722,6 +731,23 @@ export function getAnnouncement() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
export function getCurrentChannel() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, mine} = getState();
|
|
|
|
|
|
let channel;
|
|
|
Promise.all([
|
|
|
ReactNative.NativeModules.YH_CommonHelper.currentChannel()
|
|
|
]).then(result => {
|
|
|
channel = result[0];
|
|
|
dispatch(getCurrentChannelSuccess(channel));
|
|
|
})
|
|
|
.catch(error => {
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function getGlobalOrderState() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, mine} = getState();
|
...
|
...
|
@@ -778,6 +804,7 @@ export function onMineCenterRefresh() { |
|
|
dispatch(getEnvelopesItem());
|
|
|
dispatch(getCertificationData());
|
|
|
dispatch(getAnnouncement());
|
|
|
dispatch(getCurrentChannel());
|
|
|
dispatch(getGlobalOrderState());
|
|
|
if (Platform.OS === 'android') {
|
|
|
dispatch(getNewCouponInfo());
|
...
|
...
|
|