Browse Source

fix:数据

super-yimizi 3 weeks ago
parent
commit
ed791df8fd

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

@@ -31,6 +31,8 @@ class BodyMeasurements extends Validate
         'pants_length' => 'float|egt:0|elt:150',
         'pants_length' => 'float|egt:0|elt:150',
         'shoe_size' => 'length:0,10',
         'shoe_size' => 'length:0,10',
         'measurement_date' => 'date',
         'measurement_date' => 'date',
+        'belly_belt' => 'float|egt:0|elt:100',
+        'leg_root' => 'float|egt:0|elt:100',
     ];
     ];
 
 
     // 验证消息
     // 验证消息
@@ -91,6 +93,12 @@ class BodyMeasurements extends Validate
         'pants_length.elt' => '裤长不能大于150厘米',
         'pants_length.elt' => '裤长不能大于150厘米',
         'shoe_size.length' => '鞋码长度不能超过10个字符',
         'shoe_size.length' => '鞋码长度不能超过10个字符',
         'measurement_date.date' => '测量日期格式错误',
         'measurement_date.date' => '测量日期格式错误',
+        'belly_belt.float' => '肚围长度必须是数字',
+        'belly_belt.egt' => '肚围长度不能小于0',
+        'belly_belt.elt' => '肚围长度不能大于100厘米',
+        'leg_root.float' => '腿根长度必须是数字',
+        'leg_root.egt' => '腿根长度不能小于0',
+        'leg_root.elt' => '腿根长度不能大于100厘米',
     ];
     ];
 
 
     // 验证场景
     // 验证场景

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

@@ -69,7 +69,9 @@ class BodyMeasurements extends Model
             'arm_length' => '臂长',
             'arm_length' => '臂长',
             'wrist' => '腕围',
             'wrist' => '腕围',
             'pants_length' => '裤长',
             'pants_length' => '裤长',
-            'shoe_size' => '鞋码'
+            'shoe_size' => '鞋码',
+            'belly_belt' => '肚围',
+            'leg_root' => '腿根'
         ];
         ];
 
 
         // 女性专用字段
         // 女性专用字段