即时系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
603 B

<?php
namespace app\enterprise\model;
use think\Model;
class PostsFile extends Model
{
public static function getPostsFile($posts_id)
{
$fileWhere = [
'posts_id' => $posts_id,
'delete_time' => 0
];
$files = self::where($fileWhere)
->field('file_id,type')
->order('sort asc')
->select()
->toArray();
foreach ($files as $fileKey => $fileValue) {
$files[$fileKey]['src'] = File::where(['file_id' => $fileValue['file_id']])->value('src');
}
return $files;
}
}