root 9 年之前
父節點
當前提交
b84491ca4b
共有 1 個文件被更改,包括 25 次插入1 次删除
  1. 25 1
      mobile/control/type.php

+ 25 - 1
mobile/control/type.php

@@ -53,11 +53,35 @@ class typeControl extends mobileHomeControl
                     }
                 }
             }
-            joutput_data(array("data"=>$goods_class,"id"=>$id));
+            joutput_data(array("data" => $goods_class, "id" => $id));
 
         } else {
             joutput_error(1001, "keyword is must!");
         }
     }
 
+    public function typeBygcidOp()
+    {
+        $id = $_GET['id'];
+        $gc_id = $_GET['gc_id'];
+
+        if (!empty($gc_id)) {
+
+            $gc_2 = Model()->table('goods_class')->where(array('gc_parent_id' => $gc_id))->select();
+
+            $gc_2_array = array();
+            foreach ($gc_2 as $value) {
+
+                $gc_item_2['gc_id'] = $value['gc_id'];
+                $gc_item_2['gc_name'] = $value['gc_name'];
+
+                array_push($gc_2_array,$gc_item_2);
+            }
+            joutput_data(array("data" => $gc_2_array, "id" => $id));
+
+        } else {
+            joutput_error(1001, "gc_id is must!");
+        }
+    }
+
 }