浏览代码

一些功能

Kirin 4 年之前
父节点
当前提交
e180e3ae80
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/api/controller/PublicController.php

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

@@ -37,13 +37,13 @@ class PublicController
         $res = [];
         foreach ($province as $k => $v) {
             $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($v['id']);
+//            var_dump($v['id']);
             if (count($citys)) {
                 foreach ($citys as $kk => $vv) {
                     $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);
                     if (count($dictres)) {
                         foreach ($dictres as $kkk => $vvv) {