mirror of https://gitee.com/karson/fastadmin.git
修复联动调用选择空时的错误
parent
b9877c10ff
commit
80d928d872
|
|
@ -273,18 +273,18 @@ class Ajax extends Backend
|
||||||
{
|
{
|
||||||
$params = $this->request->get("row/a");
|
$params = $this->request->get("row/a");
|
||||||
if (!empty($params)) {
|
if (!empty($params)) {
|
||||||
$province = isset($params['province']) ? $params['province'] : '';
|
$province = isset($params['province']) ? $params['province'] : null;
|
||||||
$city = isset($params['city']) ? $params['city'] : '';
|
$city = isset($params['city']) ? $params['city'] : null;
|
||||||
} else {
|
} else {
|
||||||
$province = $this->request->get('province', '');
|
$province = $this->request->get('province');
|
||||||
$city = $this->request->get('city', '');
|
$city = $this->request->get('city');
|
||||||
}
|
}
|
||||||
$where = ['pid' => 0, 'level' => 1];
|
$where = ['pid' => 0, 'level' => 1];
|
||||||
$provincelist = null;
|
$provincelist = null;
|
||||||
if ($province !== '') {
|
if ($province !== null) {
|
||||||
$where['pid'] = $province;
|
$where['pid'] = $province;
|
||||||
$where['level'] = 2;
|
$where['level'] = 2;
|
||||||
if ($city !== '') {
|
if ($city !== null) {
|
||||||
$where['pid'] = $city;
|
$where['pid'] = $city;
|
||||||
$where['level'] = 3;
|
$where['level'] = 3;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue