Authored by 于良

Merge branch 'local' into develop

@@ -44,6 +44,10 @@ export function setChannel(channel) { @@ -44,6 +44,10 @@ export function setChannel(channel) {
44 export function goAction(inputUrl) { 44 export function goAction(inputUrl) {
45 return (dispatch, getState) => { 45 return (dispatch, getState) => {
46 let json = new RouterService().parseUrl(inputUrl); 46 let json = new RouterService().parseUrl(inputUrl);
  47 + if (json === null) {
  48 + return;
  49 + }
  50 +
47 let {action, params} = json; 51 let {action, params} = json;
48 let {param, share, shareparam, title, url} = params; 52 let {param, share, shareparam, title, url} = params;
49 53
@@ -43,6 +43,7 @@ export default class RouterService { @@ -43,6 +43,7 @@ export default class RouterService {
43 parseUrl(url) { 43 parseUrl(url) {
44 if (!url) { 44 if (!url) {
45 __DEV__ && console.log('Illegal url: ' + url); 45 __DEV__ && console.log('Illegal url: ' + url);
  46 + return null;
46 } 47 }
47 48
48 // url解码 49 // url解码
@@ -57,6 +58,7 @@ export default class RouterService { @@ -57,6 +58,7 @@ export default class RouterService {
57 58
58 if (markIndex == -1) { 59 if (markIndex == -1) {
59 __DEV__ && console.log('Can not find url rule: ' + url); 60 __DEV__ && console.log('Can not find url rule: ' + url);
  61 + return null;
60 } 62 }
61 63
62 let rule = url.substring(markIndex + mark.length); 64 let rule = url.substring(markIndex + mark.length);
@@ -67,6 +69,7 @@ export default class RouterService { @@ -67,6 +69,7 @@ export default class RouterService {
67 return json; 69 return json;
68 } catch (e) { 70 } catch (e) {
69 __DEV__ && console.log('Parse json string fail: ' + e); 71 __DEV__ && console.log('Parse json string fail: ' + e);
  72 + return null;
70 } 73 }
71 } 74 }
72 } 75 }