...
|
...
|
@@ -8,6 +8,7 @@ |
|
|
|
|
|
import ReactNative from 'react-native';
|
|
|
import {Actions} from 'react-native-router-flux';
|
|
|
import Immutable, {Map} from 'immutable';
|
|
|
import AppService from '../../services/AppService';
|
|
|
import RouterService from '../../services/RouterService';
|
|
|
import {goToSection, goToPost} from '../home/homeActions';
|
...
|
...
|
@@ -42,8 +43,7 @@ export function setChannel(channel) { |
|
|
|
|
|
export function goAction(inputUrl) {
|
|
|
return (dispatch, getState) => {
|
|
|
return new RouterService().parseUrl(inputUrl)
|
|
|
.then((json) => {
|
|
|
let json = new RouterService().parseUrl(inputUrl);
|
|
|
let {action, params} = json;
|
|
|
let {param, share, shareparam, title, url} = params;
|
|
|
|
...
|
...
|
@@ -55,7 +55,7 @@ export function goAction(inputUrl) { |
|
|
}
|
|
|
|
|
|
} else if (action == 'go.comm.postdetail') {
|
|
|
let id = params && params.postid ? params.postid : 0;
|
|
|
let id = params && params.postId ? params.postId : 0;
|
|
|
if (id != 0) {
|
|
|
dispatch(goToPost(id));
|
|
|
}
|
...
|
...
|
@@ -76,9 +76,5 @@ export function goAction(inputUrl) { |
|
|
}
|
|
|
ReactNative.NativeModules.YH_CommunityHelper.displayProductDetail({productSkn, tag});
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
|
__DEV__ && console.log(error);
|
|
|
});
|
|
|
};
|
|
|
} |
...
|
...
|
|