File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class Router {
28
28
// 整合路由参数
29
29
mixinParam ( url , params ) {
30
30
url = url && this . addRootPath ( url )
31
-
31
+
32
32
// 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
33
33
// 如果有url中有get参数,转换后无需带上"?"
34
34
let query = ''
@@ -54,12 +54,12 @@ class Router {
54
54
mergeConfig . url = this . mixinParam ( options , params )
55
55
mergeConfig . type = 'navigateTo'
56
56
} else {
57
- mergeConfig = uni . $u . deepMerge ( options , this . config )
57
+ mergeConfig = uni . $u . deepMerge ( this . config , options )
58
58
// 否则正常使用mergeConfig中的url和params进行拼接
59
59
mergeConfig . url = this . mixinParam ( options . url , options . params )
60
60
}
61
-
62
- if ( params . intercept ) {
61
+
62
+ if ( params . intercept ) {
63
63
this . config . intercept = params . intercept
64
64
}
65
65
// params参数也带给拦截器
@@ -119,4 +119,4 @@ class Router {
119
119
}
120
120
}
121
121
122
- export default ( new Router ( ) ) . route
122
+ export default ( new Router ( ) ) . route
You can’t perform that action at this time.
0 commit comments