Browse Source

Merge branch 'eta_buss_nation' into debug

zwxi 11 months ago
parent
commit
a25847e144
1 changed files with 11 additions and 8 deletions
  1. 11 8
      controllers/eta_business/eta_business.go

+ 11 - 8
controllers/eta_business/eta_business.go

@@ -300,15 +300,18 @@ func (this *EtaBusinessController) Add() {
 		return
 	}
 	req.Province = strings.TrimSpace(req.Province)
-	if req.Province == "" {
-		br.Msg = "省份不可为空"
-		return
-	}
-	req.City = strings.TrimSpace(req.City)
-	if req.City == "" {
-		br.Msg = "城市不可为空"
-		return
+	if req.Nation == "" {
+		if req.Province == "" {
+			br.Msg = "省份不可为空"
+			return
+		}
+		req.City = strings.TrimSpace(req.City)
+		if req.City == "" {
+			br.Msg = "城市不可为空"
+			return
+		}
 	}
+
 	req.Leader = strings.TrimSpace(req.Leader)
 	if req.Leader == "" {
 		br.Msg = "决策人不可为空"