!160 Fix the front-end error reporting problem when the page is deleted
* wip * Fix the front-end error reporting problem when the page is deleted
This commit is contained in:
parent
a3d35f6f09
commit
2b12969d3a
|
|
@ -65,8 +65,7 @@ class Url
|
|||
return $value->url ?? '';
|
||||
} elseif ($type == 'page') {
|
||||
if (! $value instanceof \Beike\Models\Page) {
|
||||
$page = \Beike\Models\Page::query()->find($value);
|
||||
$value = $page->active ? $page : null;
|
||||
$value = \Beike\Models\Page::query()->where('active', 1)->find($value);
|
||||
}
|
||||
|
||||
return $value->url ?? '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue