修复IP查询结果显示时可能不显示县级单位的问题

This commit is contained in:
刘祥超
2023-03-29 20:06:15 +08:00
parent 033a3a624d
commit 67aafeee30

View File

@@ -177,7 +177,7 @@ func (this *QueryResult) Summary() string {
pieces = append(pieces, cityName)
}
if len(townName) > 0 && !lists.ContainsString(pieces, townName) && !lists.ContainsString(pieces, strings.TrimSuffix(townName, "县")) {
pieces = append(pieces, cityName)
pieces = append(pieces, townName)
}
if len(providerName) > 0 && !lists.ContainsString(pieces, providerName) {