...
|
...
|
@@ -54,10 +54,12 @@ export function goToSection(section) { |
|
|
|
|
|
export function goToUserOrMe(uid) {
|
|
|
return (dispatch, getState) => {
|
|
|
|
|
|
let {user} = getState();
|
|
|
if (uid != 0 && uid == user.profile.uid) {
|
|
|
Actions.User();
|
|
|
dispatch({
|
|
|
type: GO_TO_USER,
|
|
|
});
|
|
|
} else {
|
|
|
Actions.UserThatNotMe();
|
|
|
dispatch({
|
...
|
...
|
@@ -68,6 +70,24 @@ export function goToUserOrMe(uid) { |
|
|
};
|
|
|
}
|
|
|
|
|
|
export function goToUser() {
|
|
|
return (dispatch, getState) => {
|
|
|
let operation = () => {
|
|
|
Actions.User();
|
|
|
return {
|
|
|
type: GO_TO_USER,
|
|
|
};
|
|
|
};
|
|
|
|
|
|
let {user} = getState();
|
|
|
if (user.profile.uid == 0) {
|
|
|
dispatch(loginThenSyncUserInfo(operation));
|
|
|
} else {
|
|
|
dispatch(operation());
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
|
|
|
export function goToPost(id) {
|
|
|
Actions.SubjectPost();
|
|
|
return {
|
...
|
...
|
@@ -258,14 +278,6 @@ export function resetErrorCount() { |
|
|
};
|
|
|
}
|
|
|
|
|
|
export function goToUser(user, previousScene) {
|
|
|
Actions.User();
|
|
|
return {
|
|
|
type: GO_TO_USER,
|
|
|
payload: {...user, previousScene},
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function parseBNS(json) {
|
|
|
let {resourceList, forumInfo} = json;
|
|
|
let {advertList, textNoticeList} = resourceList;
|
...
|
...
|
|