fix(router): 添加x_cycle参数跳过周期检查逻辑
当URL中包含x_cycle参数时,跳过周期检查流程,直接进入页面
Showing
1 changed file
with
11 additions
and
0 deletions
| ... | @@ -69,6 +69,11 @@ const checkCycleSelection = (to) => { | ... | @@ -69,6 +69,11 @@ const checkCycleSelection = (to) => { |
| 69 | return Promise.resolve(false); | 69 | return Promise.resolve(false); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | + // 如果URL中包含x_cycle参数,跳过周期检查 | ||
| 73 | + if (to.query.x_cycle) { | ||
| 74 | + return Promise.resolve(false); | ||
| 75 | + } | ||
| 76 | + | ||
| 72 | return getCycleListAPI({ form_code: to.query.code }) | 77 | return getCycleListAPI({ form_code: to.query.code }) |
| 73 | .then(({ data }) => { | 78 | .then(({ data }) => { |
| 74 | // 如果需要周期选择且有周期列表 | 79 | // 如果需要周期选择且有周期列表 |
| ... | @@ -113,6 +118,12 @@ router.beforeEach((to, from, next) => { | ... | @@ -113,6 +118,12 @@ router.beforeEach((to, from, next) => { |
| 113 | return; | 118 | return; |
| 114 | } | 119 | } |
| 115 | 120 | ||
| 121 | + // 如果URL中包含x_cycle参数,跳过周期检查 | ||
| 122 | + if (to.query.x_cycle) { | ||
| 123 | + next(); | ||
| 124 | + return; | ||
| 125 | + } | ||
| 126 | + | ||
| 116 | // 如果没有表单代码,直接通过 | 127 | // 如果没有表单代码,直接通过 |
| 117 | if (!to.query.code) { | 128 | if (!to.query.code) { |
| 118 | next(); | 129 | next(); | ... | ... |
-
Please register or login to post a comment