|
...
|
...
|
@@ -16,63 +16,63 @@ class TemplateModule extends Base |
|
|
|
protected $table = 'gl_public_template_module';
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
// * @remark :获取器image
|
|
|
|
// * @name :getImageAttribute
|
|
|
|
// * @author :lyh
|
|
|
|
// * @method :post
|
|
|
|
// * @time :2023/8/3 16:17
|
|
|
|
// */
|
|
|
|
// public function getImageAttribute($value){
|
|
|
|
// $value = getImageUrl($value);
|
|
|
|
// return $value;
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// /**
|
|
|
|
// * @remark :获取器images
|
|
|
|
// * @name :getImageAttribute
|
|
|
|
// * @author :lyh
|
|
|
|
// * @method :post
|
|
|
|
// * @time :2023/8/3 16:17
|
|
|
|
// */
|
|
|
|
// public function getImagesAttribute($value){
|
|
|
|
// $arr = explode(',',$value);
|
|
|
|
// $value = [];
|
|
|
|
// foreach ($arr as $v){
|
|
|
|
// $value[] = getImageUrl($v);
|
|
|
|
// }
|
|
|
|
// return $value;
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// /**
|
|
|
|
// * @remark :写入器images
|
|
|
|
// * @name :setImageAttribute
|
|
|
|
// * @author :lyh
|
|
|
|
// * @method :post
|
|
|
|
// * @time :2023/8/3 16:17
|
|
|
|
// */
|
|
|
|
// public function setVideoAttribute($value){
|
|
|
|
// $arr = explode(',',trim($value,','));
|
|
|
|
// $arr_images = [];
|
|
|
|
// foreach ($arr as $v){
|
|
|
|
// $arr_images[] = basename($v);
|
|
|
|
// }
|
|
|
|
// $this->attributes['video'] = implode(',',$arr_images);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// /**
|
|
|
|
// * @remark :获取器images
|
|
|
|
// * @name :getImageAttribute
|
|
|
|
// * @author :lyh
|
|
|
|
// * @method :post
|
|
|
|
// * @time :2023/8/3 16:17
|
|
|
|
// */
|
|
|
|
// public function getVideoAttribute($value){
|
|
|
|
// $arr = explode(',',$value);
|
|
|
|
// $value = [];
|
|
|
|
// foreach ($arr as $v){
|
|
|
|
// $value[] = getFileUrl($v);
|
|
|
|
// }
|
|
|
|
// return $value;
|
|
|
|
// }
|
|
|
|
/**
|
|
|
|
* @remark :获取器image
|
|
|
|
* @name :getImageAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/3 16:17
|
|
|
|
*/
|
|
|
|
public function getImageAttribute($value){
|
|
|
|
$value = getImageUrl($value);
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取器images
|
|
|
|
* @name :getImageAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/3 16:17
|
|
|
|
*/
|
|
|
|
public function getImagesAttribute($value){
|
|
|
|
$arr = explode(',',$value);
|
|
|
|
$value = [];
|
|
|
|
foreach ($arr as $v){
|
|
|
|
$value[] = getImageUrl($v);
|
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :写入器images
|
|
|
|
* @name :setImageAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/3 16:17
|
|
|
|
*/
|
|
|
|
public function setVideoAttribute($value){
|
|
|
|
$arr = explode(',',trim($value,','));
|
|
|
|
$arr_images = [];
|
|
|
|
foreach ($arr as $v){
|
|
|
|
$arr_images[] = basename($v);
|
|
|
|
}
|
|
|
|
$this->attributes['video'] = implode(',',$arr_images);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取器images
|
|
|
|
* @name :getImageAttribute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/3 16:17
|
|
|
|
*/
|
|
|
|
public function getVideoAttribute($value){
|
|
|
|
$arr = explode(',',$value);
|
|
|
|
$value = [];
|
|
|
|
foreach ($arr as $v){
|
|
|
|
$value[] = getFileUrl($v);
|
|
|
|
}
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|