mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
初始化项目
This commit is contained in:
29
app/model/Nav.php
Normal file
29
app/model/Nav.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* @mixin think\Model
|
||||
*/
|
||||
class Nav extends Model
|
||||
{
|
||||
|
||||
public static $statusName = [
|
||||
0=>'不显示',
|
||||
1=>'显示'
|
||||
];
|
||||
//
|
||||
public function getImgAttr($value)
|
||||
{
|
||||
return get_source_link($value);
|
||||
}
|
||||
|
||||
public function getStatusNameAttr()
|
||||
{
|
||||
return self::$statusName[$this->getData('status')];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user