Authored by 于良

bug fix: http://jira.yoho.cn:8888/browse/YH-2672 review by 盖剑秋

... ... @@ -44,6 +44,10 @@ export function setChannel(channel) {
export function goAction(inputUrl) {
return (dispatch, getState) => {
let json = new RouterService().parseUrl(inputUrl);
if (json === null) {
return;
}
let {action, params} = json;
let {param, share, shareparam, title, url} = params;
... ...
... ... @@ -43,6 +43,7 @@ export default class RouterService {
parseUrl(url) {
if (!url) {
__DEV__ && console.log('Illegal url: ' + url);
return null;
}
// url解码
... ... @@ -57,6 +58,7 @@ export default class RouterService {
if (markIndex == -1) {
__DEV__ && console.log('Can not find url rule: ' + url);
return null;
}
let rule = url.substring(markIndex + mark.length);
... ... @@ -67,6 +69,7 @@ export default class RouterService {
return json;
} catch (e) {
__DEV__ && console.log('Parse json string fail: ' + e);
return null;
}
}
}
... ...