后台内容模块功能完善

This commit is contained in:
2020-03-31 16:17:45 +08:00
parent de73484cca
commit 85d33da0d4
24 changed files with 386 additions and 251 deletions

View File

@@ -12,25 +12,25 @@ namespace app\model;
/**
* 分类模型
*/
class Ad {
class Ad extends \think\Model{
protected $auto = array('update_time');
protected $insert = array('create_time');
protected $type = array(
protected $type = [
'id' => 'integer',
'cover_id' => 'integer',
);
];
public $keyList = array(
array('name' => 'id', 'title' => 'ID', 'type' => 'hidden', 'help' => '', 'option' => ''),
array('name' => 'place_id', 'title' => 'PLACE_ID', 'type' => 'hidden', 'help' => '', 'option' => ''),
array('name' => 'title', 'title' => '广告名称', 'type' => 'text', 'help' => '', 'option' => ''),
array('name' => 'cover_id', 'title' => '广告图片', 'type' => 'image', 'help' => '', 'option' => ''),
array('name' => 'url', 'title' => '广告链接', 'type' => 'text', 'help' => '', 'option' => ''),
array('name' => 'photolist', 'title' => '辅助图片', 'type' => 'images', 'help' => '', 'option' => ''),
array('name' => 'listurl', 'title' => '辅助链接', 'type' => 'textarea', 'help' => '对应辅助图片的排序,一行一个', 'option' => ''),
array('name' => 'background', 'title' => '广告背景颜色', 'type' => 'text', 'help' => '', 'option' => ''),
array('name' => 'content', 'title' => '广告描述', 'type' => 'textarea', 'help' => '', 'option' => ''),
array('name' => 'status', 'title' => '状态', 'type' => 'select', 'help' => '', 'option' => array('1' => '开启', '0' => '用')),
);
public static $keyList = [
['name' => 'id', 'title' => 'ID', 'type' => 'hidden', 'help' => '', 'option' => ''],
['name' => 'place_id', 'title' => 'PLACE_ID', 'type' => 'hidden', 'help' => '', 'option' => ''],
['name' => 'title', 'title' => '广告名称', 'type' => 'text', 'help' => '', 'option' => ''],
['name' => 'cover_id', 'title' => '广告图片', 'type' => 'image', 'help' => '', 'option' => ''],
['name' => 'url', 'title' => '广告链接', 'type' => 'text', 'help' => '', 'option' => ''],
['name' => 'photolist', 'title' => '辅助图片', 'type' => 'images', 'help' => '', 'option' => ''],
['name' => 'listurl', 'title' => '辅助链接', 'type' => 'textarea', 'help' => '对应辅助图片的排序,一行一个', 'option' => ''],
['name' => 'background', 'title' => '广告背景颜色', 'type' => 'text', 'help' => '', 'option' => ''],
['name' => 'content', 'title' => '广告描述', 'type' => 'textarea', 'help' => '', 'option' => ''],
['name' => 'status', 'title' => '状态', 'type' => 'select', 'help' => '', 'option' => [['key' => '0', 'label'=>'禁用'],['key' => '1', 'label'=>'用']]]
];
}