Kirin 4 vuotta sitten
vanhempi
commit
e180e3ae80
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      app/api/controller/PublicController.php

+ 3 - 3
app/api/controller/PublicController.php

@@ -37,13 +37,13 @@ class PublicController
         $res = [];
         $res = [];
         foreach ($province as $k => $v) {
         foreach ($province as $k => $v) {
             $child = [];
             $child = [];
-            $citys = SystemCity::where('level', 1)->where('parent_id', $v['id'])->select();
+            $citys = SystemCity::where('level', 1)->where('parent_id', $v['city_id'])->select();
 //            var_dump($citys);
 //            var_dump($citys);
-            var_dump($v['id']);
+//            var_dump($v['id']);
             if (count($citys)) {
             if (count($citys)) {
                 foreach ($citys as $kk => $vv) {
                 foreach ($citys as $kk => $vv) {
                     $childs = [];
                     $childs = [];
-                    $dictres = SystemCity::where('level', 2)->where('parent_id', $vv['id'])->select();
+                    $dictres = SystemCity::where('level', 2)->where('parent_id', $vv['city_id'])->select();
 //                    var_dump($dictres);
 //                    var_dump($dictres);
                     if (count($dictres)) {
                     if (count($dictres)) {
                         foreach ($dictres as $kkk => $vvv) {
                         foreach ($dictres as $kkk => $vvv) {