...
|
...
|
@@ -18,6 +18,7 @@ const { |
|
|
FETCH_LOGOUT_STATUS_REQUEST,
|
|
|
FETCH_LOGOUT_STATUS_SUCCESS,
|
|
|
FETCH_LOGOUT_STATUS_FAILURE,
|
|
|
SET_CANCEL_FAILD_DESC
|
|
|
} = require('../../constants/actionTypes').default;
|
|
|
|
|
|
export function onPressLogoutClause() {
|
...
|
...
|
@@ -53,6 +54,12 @@ export function fetchLogoutStatusFailure(message) { |
|
|
payload: message
|
|
|
}
|
|
|
}
|
|
|
export function setCancelFaildDesc(json) {
|
|
|
return{
|
|
|
type: SET_CANCEL_FAILD_DESC,
|
|
|
payload: json
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function confirmLogoutAction() {
|
|
|
return (dispatch, getState) => {
|
...
|
...
|
@@ -69,7 +76,6 @@ export function checkUserLogedIn() { |
|
|
let fetchLogoutState = (uid) => {
|
|
|
return new UserLogoutService(app.host).fetchLogoutState(uid)
|
|
|
.then(json => {
|
|
|
json.desc = ["查询最近一年内订单超时","查询最近一年内订单超时","查询最近一年内订单超时"]
|
|
|
dispatch(fetchLogoutStatusSuccess({state:json.status, descList:json.desc}));
|
|
|
})
|
|
|
.catch(error => {
|
...
|
...
|
@@ -91,13 +97,19 @@ export function checkUserLogedIn() { |
|
|
});
|
|
|
}
|
|
|
}
|
|
|
export function processCancelFaildDesc(desc) {
|
|
|
return (dispatch, getState) => {
|
|
|
var array = desc.split(',');
|
|
|
dispatch(setCancelFaildDesc(array));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//注销失败
|
|
|
export function gotoLogoutFaildReason() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {userLogout} = getState();
|
|
|
let {cancleFialdDesc} = userLogout;
|
|
|
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.userLogout","params":{"title":"注销失败","type":"userLogoutFaildReason","cancleFialdDesc":`+ JSON.stringify(cancleFialdDesc.toJS()) +`}}`;
|
|
|
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.userLogout","params":{"title":"注销失败","type":"userLogoutFaildReason","cancleFialdDesc":"`+ cancleFialdDesc.toJS().join() +`"}}`;
|
|
|
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
|
|
|
}
|
|
|
}
|
...
|
...
|
|