diff --git a/app/custom/hdl/hdl_order.go b/app/custom/hdl/hdl_order.go index a9b3de1..414bd57 100644 --- a/app/custom/hdl/hdl_order.go +++ b/app/custom/hdl/hdl_order.go @@ -15,10 +15,12 @@ func City(c *gin.Context) { list := make([]map[string]interface{}, 0) for _, v := range data { tmpList := make([]map[string]string, 0) - tmp := map[string]interface{}{ - "name": v.Name, "value": utils.Int64ToStr(v.Id), "list": tmpList, + if v.ProvinceId == 0 && v.CityId == 0 { + tmp := map[string]interface{}{ + "name": v.Name, "value": utils.Int64ToStr(v.Id), "list": tmpList, + } + list = append(list, tmp) } - list = append(list, tmp) } for k, v := range list { tmpList := make([]map[string]string, 0)