refactor: 后台横幅添加extra_image字段
This commit is contained in:
@@ -105,6 +105,7 @@ class BannerItem
|
||||
'desc_txt_color',
|
||||
'type',
|
||||
'image',
|
||||
'extra_image',
|
||||
'video',
|
||||
'link_to' => 'custom',
|
||||
'link',
|
||||
@@ -159,6 +160,7 @@ class BannerItem
|
||||
'desc_txt_color',
|
||||
'type',
|
||||
'image',
|
||||
'extra_image',
|
||||
'video',
|
||||
'link_to',
|
||||
'link',
|
||||
@@ -242,6 +244,7 @@ class BannerItem
|
||||
'desc_txt_color' => '描述字体颜色',
|
||||
'type' => '前台显示类型',
|
||||
'image' => '图片地址',
|
||||
'extra_image' => '额外图片地址',
|
||||
'video' => '视频地址',
|
||||
'link_to' => '链接类型',
|
||||
'link' => '链接地址',
|
||||
@@ -274,6 +277,7 @@ class BannerItem
|
||||
'item.desc_txt_color',
|
||||
'item.type',
|
||||
'item.image',
|
||||
'item.extra_image',
|
||||
'item.video',
|
||||
'item.link_to',
|
||||
'item.link',
|
||||
|
||||
@@ -22,6 +22,7 @@ class SysBannerItemValidate extends Validate
|
||||
'desc_txt_color' => 'max:7',
|
||||
'type' => 'in:image,video',
|
||||
'image' => 'max:255',
|
||||
'extra_image' => 'max:255',
|
||||
'video' => 'max:255',
|
||||
'link_to' => 'requireIf:type,image|max:64|in:article,article_category,product,product_category,system_page,custom',
|
||||
'link' => 'max:255',
|
||||
@@ -47,6 +48,7 @@ class SysBannerItemValidate extends Validate
|
||||
'desc_txt_color.max' => '描述字体颜色最多不能超过7个字符',
|
||||
'type.in' => '显示类型必须是image或video',
|
||||
'image.max' => '图片地址最多不能超过255个字符',
|
||||
'extra_image.max' => '额外图片地址最多不能超过255个字符',
|
||||
'video.max' => '视频地址最多不能超过255个字符',
|
||||
'link_to.requireIf' => '链接类型不能为空',
|
||||
'link_to.max' => '链接类型最多不能超过64个字符',
|
||||
|
||||
@@ -25,6 +25,7 @@ class SysBannerItemBaseModel extends BaseModel
|
||||
'desc_txt_color' => 'string',
|
||||
'type' => 'string',
|
||||
'image' => 'string',
|
||||
'extra_image' => 'string',
|
||||
'video' => 'string',
|
||||
'link_to' => 'string',
|
||||
'link' => 'string',
|
||||
|
||||
@@ -36,6 +36,7 @@ class CreateSysBannerItem extends Migrator
|
||||
->addColumn('desc_txt_color', 'string', ['limit' => 7, 'null' => false, 'default' => '', 'comment' => '描述文本颜色'])
|
||||
->addColumn('type', 'string', ['limit' => 16, 'null' => false, 'comment' => '类型: image为图片, video为视频'])
|
||||
->addColumn('image', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '图片'])
|
||||
->addColumn('extra_image', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '额外的图片'])
|
||||
->addColumn('video', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '视频'])
|
||||
->addColumn('link_to', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接'])
|
||||
->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '链接'])
|
||||
|
||||
Reference in New Issue
Block a user