diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index f0f13a41e..849394f7c 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -734,8 +734,13 @@ func BatchString2Slice(strs ...string) (strList []string) { func GetShortNameFromURL(strURL string) (shortName string) { index := strings.LastIndex(strURL, "/") - if index > 0 { - shortName = strURL[index+1:] + index2 := strings.LastIndex(strURL, "?") + if index != -1 { + if index2 == -1 { + shortName = strURL[index+1:] + } else { + shortName = strURL[index+1 : index2] + } } return shortName }