URL跳转可以设置是否保留参数

This commit is contained in:
GoEdgeLab
2022-02-20 09:17:30 +08:00
parent d1c79b801b
commit cdd87a29ac
3 changed files with 13 additions and 2 deletions

View File

@@ -43,6 +43,13 @@
<p class="comment">选中后则跳转之后保留跳转之前的URL路径和参数。</p>
</td>
</tr>
<tr v-if="mode == 'equal' || mode == 'matchRegexp'">
<td>是否保留请求参数</td>
<td>
<checkbox name="keepArgs" value="1" v-model="redirect.keepArgs"></checkbox>
<p class="comment">选中后则跳转之后保留跳转之前的URL上的参数即问号之后的部分</p>
</td>
</tr>
<tr>
<td>跳转状态码</td>
<td>

View File

@@ -11,6 +11,7 @@ Tea.context(function () {
matchPrefix: false,
matchRegexp: false,
keepRequestURI: false,
keepArgs: true,
conds: null,
isOn: true
}
@@ -22,8 +23,7 @@ Tea.context(function () {
} else if (this.redirect.matchRegexp) {
this.mode = "matchRegexp"
} else {
this.mode = "matchPrefix"
this.redirect.matchPrefix = true
this.mode = "equal"
}
this.$delay(function () {