You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
685 B
33 lines
685 B
<?php
|
|
namespace app\model;
|
|
/**
|
|
* @property int id
|
|
* @property string server_name
|
|
* @property string header_photo
|
|
* @property string server_link
|
|
*/
|
|
class ServiceSettingModel extends BaseModel
|
|
{
|
|
protected $name = 'service_setting';
|
|
protected $pk = 'id';
|
|
|
|
const TYPE_ONE = 1;
|
|
const TYPE_TWO = 2;
|
|
|
|
public static $typeList = [
|
|
self::TYPE_ONE => '邮箱',
|
|
self::TYPE_TWO => '跳转地址',
|
|
];
|
|
|
|
public static function getServiceList():array
|
|
{
|
|
$list = self::where(1)->field('server_name,header_photo,server_link,type')->select();
|
|
if(empty($list)){
|
|
return [];
|
|
}
|
|
return $list->toArray();
|
|
}
|
|
|
|
|
|
|
|
}
|