Skip to content

Commit

Permalink
fix: 修复错误导入
Browse files Browse the repository at this point in the history
  • Loading branch information
tangym committed Jun 7, 2023
1 parent 9ca8aa1 commit 99e6cc7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions application/api/controller/DataQuery.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Created by VSCode.
* User: cattong
Expand All @@ -10,7 +11,6 @@

use app\common\library\ResultCode;
use app\common\model\RegionModel;
use think\Log;

class DataQuery extends Base
{
Expand All @@ -25,7 +25,7 @@ public function areas()
if ($list) {
return ajax_return(ResultCode::ACTION_SUCCESS, '操作成功!', $list);
}

if ($drilldown == 2) {
$list = $RegionModel->where('pid', '=', $pid)->select();
foreach ($list as $key => $value) {
Expand All @@ -40,11 +40,10 @@ public function areas()
$where[] = ['pid', '=', $pid];
$list = $RegionModel->where($where)->select();
}

$list = parse_fields($list, 1);

return ajax_return(ResultCode::ACTION_SUCCESS, '操作成功!', $list);

}

//获取树状结构
Expand Down Expand Up @@ -74,4 +73,4 @@ protected function getTree($data, $pid = 0, $fieldPK = 'id', $fieldPid = 'pid',

return array_merge($arr);
}
}
}

0 comments on commit 99e6cc7

Please sign in to comment.