mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 20:00:26 +08:00
URL跳转可以设置是否保留参数
This commit is contained in:
@@ -27,11 +27,13 @@ func (this *CreatePopupAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
func (this *CreatePopupAction) RunPost(params struct {
|
||||
Mode string
|
||||
BeforeURL string
|
||||
AfterURL string
|
||||
MatchPrefix bool
|
||||
MatchRegexp bool
|
||||
KeepRequestURI bool
|
||||
KeepArgs bool
|
||||
Status int
|
||||
CondsJSON []byte
|
||||
IsOn bool
|
||||
@@ -99,12 +101,14 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
}
|
||||
|
||||
this.Data["redirect"] = maps.Map{
|
||||
"mode": params.Mode,
|
||||
"status": params.Status,
|
||||
"beforeURL": params.BeforeURL,
|
||||
"afterURL": params.AfterURL,
|
||||
"matchPrefix": params.MatchPrefix,
|
||||
"matchRegexp": params.MatchRegexp,
|
||||
"keepRequestURI": params.KeepRequestURI,
|
||||
"keepArgs": params.KeepArgs,
|
||||
"conds": conds,
|
||||
"isOn": params.IsOn,
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user