Authored by 于良

Merge branch 'local' into develop

... ... @@ -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;
}
}
}
... ...