1
This commit is contained in:
parent
742f09e079
commit
1bbaba0c94
@ -58,6 +58,8 @@ class CommonGoodsEditForm extends Model
|
||||
|
||||
|
||||
public $banner_urls;
|
||||
public $video_banner_urls;
|
||||
|
||||
public $cat_id;
|
||||
public $cat1_id;
|
||||
public $cat2_id;
|
||||
@ -69,7 +71,7 @@ class CommonGoodsEditForm extends Model
|
||||
{
|
||||
return [
|
||||
[['name', 'subtitle', 'detail', 'cover_pic', 'video_url', 'unit', 'plugin_sign', 'goods_no',], 'trim'],
|
||||
[['name', 'subtitle', 'detail', 'cover_pic', 'video_url', 'banner_urls', 'unit', 'plugin_sign', 'goods_no', 'date'], 'string'],
|
||||
[['name', 'subtitle', 'detail', 'cover_pic', 'video_url', 'video_banner_urls', 'banner_urls', 'unit', 'plugin_sign', 'goods_no', 'date'], 'string'],
|
||||
[['original_price', 'cost_price', 'price', 'goods_weight'], 'number'],
|
||||
[['type', 'use_attr', 'goods_stock', 'virtual_sales', 'confine_count', 'freight_id', 'sort', 'cx_mch_id'], 'integer'],
|
||||
|
||||
@ -180,6 +182,11 @@ class CommonGoodsEditForm extends Model
|
||||
|
||||
$goods_hub->banner_urls = $this->banner_urls;
|
||||
|
||||
|
||||
$video_banner_urls = is_string($this->video_banner_urls) ? $this->video_banner_urls : json_encode($this->video_banner_urls);
|
||||
$goods_hub->video_banner_urls = $video_banner_urls;
|
||||
|
||||
|
||||
$pic_urls = is_string($this->pic_urls) ? $this->pic_urls : json_encode($this->pic_urls);
|
||||
$goods_hub->pic_urls = $pic_urls;
|
||||
$video_urls = is_string($this->video_url) ? $this->video_url : json_encode($this->video_url);
|
||||
|
||||
@ -174,6 +174,25 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
|
||||
|
||||
|
||||
<?= PickFile::widget([
|
||||
'multiple' => true,
|
||||
'accept' => 'images',
|
||||
'id' => 'video_banner_urls',
|
||||
'name' => 'video_banner_urls',
|
||||
'label' => '冠军视频封面图',
|
||||
'value' => $model->goodsHub ? $model->goodsHub->video_banner_urls : '',
|
||||
'tip' => '图片大小750×750',
|
||||
'required' => true,
|
||||
// 'imageCompressEnable' => 1,
|
||||
// 'imageCompressBorder' => 750,
|
||||
]) ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user