Browse Source

fix:数据

super-yimizi 3 weeks ago
parent
commit
3078a01da9

+ 48 - 28
application/admin/controller/BodyTypeConfig.php

@@ -57,14 +57,21 @@ class BodyTypeConfig extends Backend
         parent::_initialize();
         $this->model = new BodyTypeConfigModel;
         
-        // 分类选项
+        // 分类选项 - 根据性别区分
         $categories = [
+            // 通用分类(男女都有)
             'shoulder' => '肩型',
+            'leg' => '腿型',
+            'back' => '背型',
+            
+            // 男性特有分类
             'chest' => '胸型(男)',
+            
+            // 女性特有分类
             'bust' => '胸型(女)',
             'waist' => '腰型',
             'hip' => '臀型',
-            'leg' => '腿型'
+            'abdomen' => '腹型'
         ];
         
         $this->view->assign('categories', $categories);
@@ -370,36 +377,49 @@ class BodyTypeConfig extends Backend
     private function importInitialData()
     {
         $data = [
-            // 肩型
-            ['type_category' => 'shoulder', 'type_name' => '平肩', 'gender' => 0, 'description' => '肩部线条平直,无明显斜度', 'sort' => 1],
-            ['type_category' => 'shoulder', 'type_name' => '溜肩', 'gender' => 0, 'description' => '肩部向下倾斜,线条柔和', 'sort' => 2],
-            ['type_category' => 'shoulder', 'type_name' => '削肩', 'gender' => 0, 'description' => '肩部窄小,线条削瘦', 'sort' => 3],
+            // 肩型(通用)
+            ['type_category' => 'shoulder', 'type_name' => '平肩', 'gender' => 0, 'description' => '稳稳挂住单肩包', 'sort' => 1],
+            ['type_category' => 'shoulder', 'type_name' => '常规', 'gender' => 0, 'description' => '偶尔挂住单肩包', 'sort' => 2],
+            ['type_category' => 'shoulder', 'type_name' => '溜肩', 'gender' => 0, 'description' => '完全挂不住单肩包', 'sort' => 3],
 
             // 男性胸型
-            ['type_category' => 'chest', 'type_name' => '平胸', 'gender' => 1, 'description' => '胸部平坦,肌肉不明显', 'sort' => 1],
-            ['type_category' => 'chest', 'type_name' => '肌肉', 'gender' => 1, 'description' => '胸肌发达,线条明显', 'sort' => 2],
-            ['type_category' => 'chest', 'type_name' => '圆胸', 'gender' => 1, 'description' => '胸部丰满圆润', 'sort' => 3],
+            ['type_category' => 'chest', 'type_name' => '平坦', 'gender' => 1, 'description' => '少量肌肉或脂肪', 'sort' => 1],
+            ['type_category' => 'chest', 'type_name' => '肌肉', 'gender' => 1, 'description' => '胸部有明显肌肉轮廓', 'sort' => 2],
+            ['type_category' => 'chest', 'type_name' => '肥大', 'gender' => 1, 'description' => '有明显脂肪堆积', 'sort' => 3],
 
             // 女性胸型
-            ['type_category' => 'bust', 'type_name' => '小巧', 'gender' => 2, 'description' => '胸部小巧精致', 'sort' => 1],
-            ['type_category' => 'bust', 'type_name' => '正常', 'gender' => 2, 'description' => '胸部大小适中', 'sort' => 2],
-            ['type_category' => 'bust', 'type_name' => '丰满', 'gender' => 2, 'description' => '胸部丰满饱满', 'sort' => 3],
-            ['type_category' => 'bust', 'type_name' => '胖', 'gender' => 2, 'description' => '胸部较大', 'sort' => 4],
-
-            // 腰型
-            ['type_category' => 'waist', 'type_name' => '细腰', 'gender' => 0, 'description' => '腰部纤细,曲线明显', 'sort' => 1],
-            ['type_category' => 'waist', 'type_name' => '正常', 'gender' => 0, 'description' => '腰部比例正常', 'sort' => 2],
-            ['type_category' => 'waist', 'type_name' => '圆腰', 'gender' => 0, 'description' => '腰部较粗,线条圆润', 'sort' => 3],
-
-            // 臀型
-            ['type_category' => 'hip', 'type_name' => '平臀', 'gender' => 0, 'description' => '臀部较平,缺乏曲线', 'sort' => 1],
-            ['type_category' => 'hip', 'type_name' => '正常', 'gender' => 0, 'description' => '臀部曲线正常', 'sort' => 2],
-            ['type_category' => 'hip', 'type_name' => '翘臀', 'gender' => 0, 'description' => '臀部翘挺,曲线优美', 'sort' => 3],
-
-            // 腿型
-            ['type_category' => 'leg', 'type_name' => '直腿', 'gender' => 0, 'description' => '腿部笔直,线条流畅', 'sort' => 1],
-            ['type_category' => 'leg', 'type_name' => 'O型腿', 'gender' => 0, 'description' => '膝盖外弯,呈O型', 'sort' => 2],
-            ['type_category' => 'leg', 'type_name' => 'X型腿', 'gender' => 0, 'description' => '膝盖内弯,呈X型', 'sort' => 3],
+            ['type_category' => 'bust', 'type_name' => '平坦', 'gender' => 2, 'description' => '日常穿A以下的内衣', 'sort' => 1],
+            ['type_category' => 'bust', 'type_name' => '小巧', 'gender' => 2, 'description' => '日常穿A或B的内衣', 'sort' => 2],
+            ['type_category' => 'bust', 'type_name' => '标准', 'gender' => 2, 'description' => '日常穿B或C的内衣', 'sort' => 3],
+            ['type_category' => 'bust', 'type_name' => '饱满', 'gender' => 2, 'description' => '日常穿C或D的内衣', 'sort' => 4],
+            ['type_category' => 'bust', 'type_name' => '丰满', 'gender' => 2, 'description' => '日常穿D以上的内衣', 'sort' => 5],
+
+            // 背型(通用)
+            ['type_category' => 'back', 'type_name' => '挺腰', 'gender' => 0, 'description' => '平时走路昂首挺胸', 'sort' => 1],
+            ['type_category' => 'back', 'type_name' => '直背', 'gender' => 0, 'description' => '正常体态或微驼', 'sort' => 2],
+            ['type_category' => 'back', 'type_name' => '驼背', 'gender' => 0, 'description' => '背部有明显驼背', 'sort' => 3],
+
+            // 腿型(通用)
+            ['type_category' => 'leg', 'type_name' => '粗壮', 'gender' => 0, 'description' => '腿部肌肉明显突出', 'sort' => 1],
+            ['type_category' => 'leg', 'type_name' => '正常', 'gender' => 0, 'description' => '腿部肌肉整体匀称', 'sort' => 2],
+            ['type_category' => 'leg', 'type_name' => '纤细', 'gender' => 0, 'description' => '腿部较为纤细', 'sort' => 3],
+
+            // 女性腰型
+            ['type_category' => 'waist', 'type_name' => '纤细', 'gender' => 2, 'description' => '小腹平坦腰线清晰', 'sort' => 1],
+            ['type_category' => 'waist', 'type_name' => '正常', 'gender' => 2, 'description' => '小腹无明显脂肪堆积', 'sort' => 2],
+            ['type_category' => 'waist', 'type_name' => '微胖', 'gender' => 2, 'description' => '腹部有小肚腩', 'sort' => 3],
+            ['type_category' => 'waist', 'type_name' => '胖', 'gender' => 2, 'description' => '腹部脂肪堆积明显', 'sort' => 4],
+
+            // 女性臀型
+            ['type_category' => 'hip', 'type_name' => '平臀', 'gender' => 2, 'description' => '背部无空隙放入手掌', 'sort' => 1],
+            ['type_category' => 'hip', 'type_name' => '正常', 'gender' => 2, 'description' => '背部空隙可放下手掌', 'sort' => 2],
+            ['type_category' => 'hip', 'type_name' => '翘臀', 'gender' => 2, 'description' => '背部空隙可放入拳头', 'sort' => 3],
+
+            // 女性腹型
+            ['type_category' => 'abdomen', 'type_name' => '纤细', 'gender' => 2, 'description' => '小腹平坦腰线清晰', 'sort' => 1],
+            ['type_category' => 'abdomen', 'type_name' => '正常', 'gender' => 2, 'description' => '小腹无明显脂肪堆积', 'sort' => 2],
+            ['type_category' => 'abdomen', 'type_name' => '微胖', 'gender' => 2, 'description' => '腹部有小肚腩', 'sort' => 3],
+            ['type_category' => 'abdomen', 'type_name' => '胖', 'gender' => 2, 'description' => '腹部脂肪堆积明显', 'sort' => 4],
         ];
 
         foreach ($data as $item) {

+ 2 - 0
application/admin/lang/zh-cn/body_type_config.php

@@ -20,6 +20,8 @@ return [
     'Waist'                 => '腰型',
     'Hip'                   => '臀型',
     'Leg'                   => '腿型',
+    'Back'                  => '背型',
+    'Abdomen'               => '腹型',
     
     // 性别选项
     'Universal'             => '通用',

+ 1 - 1
application/admin/validate/BodyTypeConfig.php

@@ -10,7 +10,7 @@ class BodyTypeConfig extends Validate
      * 验证规则
      */
     protected $rule = [
-        'type_category' => 'require|in:shoulder,chest,bust,waist,hip,leg',
+        'type_category' => 'require|in:shoulder,chest,bust,waist,hip,leg,back,abdomen',
         'type_name'     => 'require|length:1,50',
         'gender'        => 'require|in:0,1,2',
         'type_image'    => 'url',

+ 42 - 25
application/admin/view/body_type_config/import.html

@@ -43,49 +43,66 @@
                         <div class="panel-body">
                             <div class="row">
                                 <div class="col-md-4">
-                                    <h5><span class="label label-primary">肩型</span></h5>
+                                    <h5><span class="label label-primary">肩型(通用)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 平肩(通用)</li>
-                                        <li>• 溜肩(通用)</li>
-                                        <li>• 削肩(通用)</li>
+                                        <li>• 平肩(稳稳挂住单肩包)</li>
+                                        <li>• 常规(偶尔挂住单肩包)</li>
+                                        <li>• 溜肩(完全挂不住单肩包)</li>
                                     </ul>
-                                </div>
-                                <div class="col-md-4">
+                                    
                                     <h5><span class="label label-info">胸型(男)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 平胸(男性)</li>
-                                        <li>• 肌肉(男性)</li>
-                                        <li>• 圆胸(男性)</li>
+                                        <li>• 平坦(少量肌肉或脂肪)</li>
+                                        <li>• 肌肉(胸部有明显肌肉轮廓)</li>
+                                        <li>• 肥大(有明显脂肪堆积)</li>
                                     </ul>
                                     
                                     <h5><span class="label label-danger">胸型(女)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 小巧(女性)</li>
-                                        <li>• 正常(女性)</li>
-                                        <li>• 丰满(女性)</li>
-                                        <li>• 胖(女性)</li>
+                                        <li>• 平坦(日常穿A以下的内衣)</li>
+                                        <li>• 小巧(日常穿A或B的内衣)</li>
+                                        <li>• 标准(日常穿B或C的内衣)</li>
+                                        <li>• 饱满(日常穿C或D的内衣)</li>
+                                        <li>• 丰满(日常穿D以上的内衣)</li>
+                                    </ul>
+                                </div>
+                                <div class="col-md-4">
+                                    <h5><span class="label label-info">背型(通用)</span></h5>
+                                    <ul class="list-unstyled">
+                                        <li>• 挺腰(平时走路昂首挺胸)</li>
+                                        <li>• 直背(正常体态或微驼)</li>
+                                        <li>• 驼背(背部有明显驼背)</li>
+                                    </ul>
+                                    
+                                    <h5><span class="label label-default">腿型(通用)</span></h5>
+                                    <ul class="list-unstyled">
+                                        <li>• 粗壮(腿部肌肉明显突出)</li>
+                                        <li>• 正常(腿部肌肉整体匀称)</li>
+                                        <li>• 纤细(腿部较为纤细)</li>
                                     </ul>
                                 </div>
                                 <div class="col-md-4">
-                                    <h5><span class="label label-success">腰型</span></h5>
+                                    <h5><span class="label label-success">腰型(女性)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 细腰(通用)</li>
-                                        <li>• 正常(通用)</li>
-                                        <li>• 圆腰(通用)</li>
+                                        <li>• 纤细(小腹平坦腰线清晰)</li>
+                                        <li>• 正常(小腹无明显脂肪堆积)</li>
+                                        <li>• 微胖(腹部有小肚腩)</li>
+                                        <li>• 胖(腹部脂肪堆积明显)</li>
                                     </ul>
                                     
-                                    <h5><span class="label label-warning">臀型</span></h5>
+                                    <h5><span class="label label-warning">臀型(女性)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 平臀(通用)</li>
-                                        <li>• 正常(通用)</li>
-                                        <li>• 翘臀(通用)</li>
+                                        <li>• 平臀(背部无空隙放入手掌)</li>
+                                        <li>• 正常(背部空隙可放下手掌)</li>
+                                        <li>• 翘臀(背部空隙可放入拳头)</li>
                                     </ul>
                                     
-                                    <h5><span class="label label-default">腿型</span></h5>
+                                    <h5><span class="label label-success">腹型(女性)</span></h5>
                                     <ul class="list-unstyled">
-                                        <li>• 直腿(通用)</li>
-                                        <li>• O型腿(通用)</li>
-                                        <li>• X型腿(通用)</li>
+                                        <li>• 纤细(小腹平坦腰线清晰)</li>
+                                        <li>• 正常(小腹无明显脂肪堆积)</li>
+                                        <li>• 微胖(腹部有小肚腩)</li>
+                                        <li>• 胖(腹部脂肪堆积明显)</li>
                                     </ul>
                                 </div>
                             </div>

+ 2 - 0
application/admin/view/body_type_config/preview.html

@@ -16,6 +16,8 @@
                             {elseif $row.type_category == 'waist'}腰型
                             {elseif $row.type_category == 'hip'}臀型
                             {elseif $row.type_category == 'leg'}腿型
+                            {elseif $row.type_category == 'back'}背型
+                            {elseif $row.type_category == 'abdomen'}腹型
                             {/if}
                         </td>
                     </tr>

+ 3 - 1
application/admin/view/body_type_config/sort.html

@@ -6,9 +6,11 @@
             <li><a href="#t-shoulder" data-toggle="tab" data-value="shoulder">肩型</a></li>
             <li><a href="#t-chest" data-toggle="tab" data-value="chest">胸型(男)</a></li>
             <li><a href="#t-bust" data-toggle="tab" data-value="bust">胸型(女)</a></li>
+            <li><a href="#t-back" data-toggle="tab" data-value="back">背型</a></li>
+            <li><a href="#t-leg" data-toggle="tab" data-value="leg">腿型</a></li>
             <li><a href="#t-waist" data-toggle="tab" data-value="waist">腰型</a></li>
             <li><a href="#t-hip" data-toggle="tab" data-value="hip">臀型</a></li>
-            <li><a href="#t-leg" data-toggle="tab" data-value="leg">腿型</a></li>
+            <li><a href="#t-abdomen" data-toggle="tab" data-value="abdomen">腹型</a></li>
         </ul>
     </div>
     <div class="panel-body">

+ 9 - 3
public/assets/js/backend/body_type_config.js

@@ -38,7 +38,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 "bust": __('Bust(Female)'),
                                 "waist": __('Waist'),
                                 "hip": __('Hip'),
-                                "leg": __('Leg')
+                                "leg": __('Leg'),
+                                "back": __('Back'),
+                                "abdomen": __('Abdomen')
                             },
                             formatter: function (value, row, index) {
                                 var categoryMap = {
@@ -47,7 +49,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     'bust': '胸型(女)',
                                     'waist': '腰型',
                                     'hip': '臀型',
-                                    'leg': '腿型'
+                                    'leg': '腿型',
+                                    'back': '背型',
+                                    'abdomen': '腹型'
                                 };
                                 var colorMap = {
                                     'shoulder': 'primary',
@@ -55,7 +59,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     'bust': 'danger',
                                     'waist': 'success',
                                     'hip': 'warning',
-                                    'leg': 'default'
+                                    'leg': 'default',
+                                    'back': 'info',
+                                    'abdomen': 'success'
                                 };
                                 return '<span class="label label-' + (colorMap[value] || 'default') + '">' + (categoryMap[value] || value) + '</span>';
                             }