优化交互

This commit is contained in:
刘祥超
2021-07-07 19:02:39 +08:00
parent adf91bf3d0
commit 11a8d3ba70
3 changed files with 9 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ func (this *AddPopupAction) RunPost(params struct {
}
}
addr = strings.ReplaceAll(addr, "", ":")
addr = regexp.MustCompile(`\s+`).ReplaceAllString(addr, "")
portIndex := strings.LastIndex(addr, ":")
if portIndex < 0 {
@@ -89,6 +90,9 @@ func (this *AddPopupAction) RunPost(params struct {
}
host := addr[:portIndex]
port := addr[portIndex+1:]
if port == "0" {
this.Fail("端口号不能为0")
}
connTimeoutJSON, err := (&shared.TimeDuration{
Count: int64(params.ConnTimeout),

View File

@@ -129,6 +129,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
}
}
addr = strings.ReplaceAll(addr, "", ":")
addr = regexp.MustCompile(`\s+`).ReplaceAllString(addr, "")
portIndex := strings.LastIndex(addr, ":")
if portIndex < 0 {
@@ -143,6 +144,9 @@ func (this *UpdatePopupAction) RunPost(params struct {
}
host := addr[:portIndex]
port := addr[portIndex+1:]
if port == "0" {
this.Fail("端口号不能为0")
}
connTimeoutJSON, err := (&shared.TimeDuration{
Count: int64(params.ConnTimeout),

View File

@@ -25,7 +25,7 @@ Vue.component("sort-arrow", {
})
}
if (order == "asc") {
newArgs.push(this.name + "=")
newArgs.push(this.name + "=desc")
} else if (order == "desc") {
newArgs.push(this.name + "=asc")
} else {