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