fix(router): 保留所有原始查询参数当跳转到周期选择页面时
修改路由跳转逻辑,不再只保留code参数,而是保留所有原始查询参数,确保页面跳转时参数不丢失
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -102,10 +102,10 @@ router.beforeEach((to, from, next) => { | ... | @@ -102,10 +102,10 @@ router.beforeEach((to, from, next) => { |
| 102 | query: to.query, | 102 | query: to.query, |
| 103 | params: to.params | 103 | params: to.params |
| 104 | })); | 104 | })); |
| 105 | - // 跳转到周期选择页面 | 105 | + // 跳转到周期选择页面,保留所有原始参数 |
| 106 | next({ | 106 | next({ |
| 107 | path: '/cycle-selection', | 107 | path: '/cycle-selection', |
| 108 | - query: { code: to.query.code } | 108 | + query: to.query // 保留所有原始查询参数 |
| 109 | }); | 109 | }); |
| 110 | return; | 110 | return; |
| 111 | } | 111 | } | ... | ... |
-
Please register or login to post a comment