Browse Source

fix:数据

super-yimizi 3 weeks ago
parent
commit
9c11ecff48

+ 1 - 0
application/api/controller/BodyProfile.php

@@ -335,6 +335,7 @@ class BodyProfile extends Api
             'chest', 'waist', 'hip', 'thigh', 'calf', 'upper_arm', 'forearm', 
             'chest', 'waist', 'hip', 'thigh', 'calf', 'upper_arm', 'forearm', 
             'neck', 'shoulder_width', 'bust', 'underbust', 'inseam', 'outseam', 
             'neck', 'shoulder_width', 'bust', 'underbust', 'inseam', 'outseam', 
             'knee', 'arm_length', 'wrist', 'pants_length','belly_belt','leg_root',
             'knee', 'arm_length', 'wrist', 'pants_length','belly_belt','leg_root',
+             'ankle', 'waist_lower', 'mid_waist',
             'shoe_size', 'measurement_date'
             'shoe_size', 'measurement_date'
         ];
         ];
         
         

+ 12 - 0
application/api/validate/BodyMeasurements.php

@@ -33,6 +33,9 @@ class BodyMeasurements extends Validate
         'measurement_date' => 'date',
         'measurement_date' => 'date',
         'belly_belt' => 'float|egt:0|elt:100',
         'belly_belt' => 'float|egt:0|elt:100',
         'leg_root' => 'float|egt:0|elt:100',
         'leg_root' => 'float|egt:0|elt:100',
+        'ankle' => 'float|egt:0|elt:30',
+        'waist_lower' => 'float|egt:0',
+        'mid_waist' => 'float|egt:0',
     ];
     ];
 
 
     // 验证消息
     // 验证消息
@@ -99,6 +102,15 @@ class BodyMeasurements extends Validate
         'leg_root.float' => '腿根长度必须是数字',
         'leg_root.float' => '腿根长度必须是数字',
         'leg_root.egt' => '腿根长度不能小于0',
         'leg_root.egt' => '腿根长度不能小于0',
         'leg_root.elt' => '腿根长度不能大于100厘米',
         'leg_root.elt' => '腿根长度不能大于100厘米',
+        'ankle.float' => '脚踝长度必须是数字',
+        'ankle.egt' => '脚踝长度不能小于0',
+        'ankle.elt' => '脚踝长度不能大于30厘米',
+        'waist_lower.float' => '下腰围长度必须是数字',
+        'waist_lower.egt' => '下腰围长度不能小于0',
+        // 'waist_lower.elt' => '下腰围长度不能大于30厘米',
+        'mid_waist.float' => '中腰围长度必须是数字',
+        'mid_waist.egt' => '中腰围长度不能小于0',
+        // 'mid_waist.elt' => '中腰围长度不能大于30厘米',
     ];
     ];
 
 
     // 验证场景
     // 验证场景

+ 4 - 1
application/common/model/BodyMeasurements.php

@@ -71,7 +71,10 @@ class BodyMeasurements extends Model
             'pants_length' => '裤长',
             'pants_length' => '裤长',
             'shoe_size' => '鞋码',
             'shoe_size' => '鞋码',
             'belly_belt' => '肚围',
             'belly_belt' => '肚围',
-            'leg_root' => '腿根'
+            'leg_root' => '腿根',
+            'ankle' => '脚踝',
+            'waist_lower' => '下腰围',
+            'mid_waist' => '中腰围',
         ];
         ];
 
 
         // 女性专用字段
         // 女性专用字段