|
@@ -57,6 +57,7 @@ class Product extends Model
|
|
|
'real_look',
|
|
|
'real_sales',
|
|
|
'images',
|
|
|
+ 'videothumb',
|
|
|
'specList',
|
|
|
'specTableList',
|
|
|
];
|
|
@@ -69,6 +70,18 @@ class Product extends Model
|
|
|
public function getImageAttr($value) {
|
|
|
return Config::getImagesFullUrl($value);
|
|
|
}
|
|
|
+ public function getVideoFileAttr($value) {
|
|
|
+ return Config::getImagesFullUrl($value);
|
|
|
+ }
|
|
|
+ public function getVideothumbAttr($value, $data) {
|
|
|
+ $rs = '';
|
|
|
+ if($data['video_file']){
|
|
|
+ $images_url = explode('.', $data['video_file']);
|
|
|
+ unset($images_url[count($images_url) - 1]);
|
|
|
+ $rs = join('.', $images_url) . '_0.jpg';
|
|
|
+ }
|
|
|
+ return Config::getImagesFullUrl($rs);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 加密商品id
|