Files
ulthon_information/app/model/Nav.php
2022-02-14 22:54:35 +08:00

39 lines
602 B
PHP

<?php
declare(strict_types=1);
namespace app\model;
use app\common\model\Base;
/**
* @mixin think\Model
*/
class Nav extends Base
{
public static $autoClearCache = [
[
'type' => 'key',
'name' => 'type_list',
'field' => 'type'
]
];
public static $statusName = [
0 => '不显示',
1 => '显示'
];
//
public function getImgAttr($value)
{
return get_source_link($value);
}
public function getStatusNameAttr()
{
return self::$statusName[$this->getData('status')];
}
}