mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
URL跳转可以设置是否保留参数
This commit is contained in:
@@ -27,11 +27,13 @@ func (this *CreatePopupAction) RunGet(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *CreatePopupAction) RunPost(params struct {
|
func (this *CreatePopupAction) RunPost(params struct {
|
||||||
|
Mode string
|
||||||
BeforeURL string
|
BeforeURL string
|
||||||
AfterURL string
|
AfterURL string
|
||||||
MatchPrefix bool
|
MatchPrefix bool
|
||||||
MatchRegexp bool
|
MatchRegexp bool
|
||||||
KeepRequestURI bool
|
KeepRequestURI bool
|
||||||
|
KeepArgs bool
|
||||||
Status int
|
Status int
|
||||||
CondsJSON []byte
|
CondsJSON []byte
|
||||||
IsOn bool
|
IsOn bool
|
||||||
@@ -99,12 +101,14 @@ func (this *CreatePopupAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.Data["redirect"] = maps.Map{
|
this.Data["redirect"] = maps.Map{
|
||||||
|
"mode": params.Mode,
|
||||||
"status": params.Status,
|
"status": params.Status,
|
||||||
"beforeURL": params.BeforeURL,
|
"beforeURL": params.BeforeURL,
|
||||||
"afterURL": params.AfterURL,
|
"afterURL": params.AfterURL,
|
||||||
"matchPrefix": params.MatchPrefix,
|
"matchPrefix": params.MatchPrefix,
|
||||||
"matchRegexp": params.MatchRegexp,
|
"matchRegexp": params.MatchRegexp,
|
||||||
"keepRequestURI": params.KeepRequestURI,
|
"keepRequestURI": params.KeepRequestURI,
|
||||||
|
"keepArgs": params.KeepArgs,
|
||||||
"conds": conds,
|
"conds": conds,
|
||||||
"isOn": params.IsOn,
|
"isOn": params.IsOn,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,13 @@
|
|||||||
<p class="comment">选中后,则跳转之后,保留跳转之前的URL路径和参数。</p>
|
<p class="comment">选中后,则跳转之后,保留跳转之前的URL路径和参数。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>跳转状态码</td>
|
<td>跳转状态码</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Tea.context(function () {
|
|||||||
matchPrefix: false,
|
matchPrefix: false,
|
||||||
matchRegexp: false,
|
matchRegexp: false,
|
||||||
keepRequestURI: false,
|
keepRequestURI: false,
|
||||||
|
keepArgs: true,
|
||||||
conds: null,
|
conds: null,
|
||||||
isOn: true
|
isOn: true
|
||||||
}
|
}
|
||||||
@@ -22,8 +23,7 @@ Tea.context(function () {
|
|||||||
} else if (this.redirect.matchRegexp) {
|
} else if (this.redirect.matchRegexp) {
|
||||||
this.mode = "matchRegexp"
|
this.mode = "matchRegexp"
|
||||||
} else {
|
} else {
|
||||||
this.mode = "matchPrefix"
|
this.mode = "equal"
|
||||||
this.redirect.matchPrefix = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$delay(function () {
|
this.$delay(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user