Parcourir la source

增加省市为空时判断

theo il y a 2 ans
Parent
commit
6a265e2f07
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      common/models/forms/DeclarationForm.php

+ 3 - 3
common/models/forms/DeclarationForm.php

@@ -722,7 +722,7 @@ class DeclarationForm extends Model
                 $userPayPasswd = '111111';
             }
         }
-        
+
         // 增加会员
         $user = new User();
         $user->USER_NAME = $this->insertUserName;
@@ -744,8 +744,8 @@ class DeclarationForm extends Model
         $user->DEC_LV = $this->decLv;
         $user->LAST_DEC_LV = $this->decLv;
         $user->EMP_LV = EmployLevel::getDefaultLevelId();
-        $user->PROVINCE = $this->province ?? 0;
-        $user->CITY = $this->city ?? 0;
+        $user->PROVINCE = intval($this->province) ?? 0;
+        $user->CITY = intval($this->city) ?? 0;
         $user->COUNTY = intval($this->county) ?? 0;
         $user->AVATAR = 'avatar/1.png';
         $user->IS_DEC = 0;