ItemDetails.php 671 字节
<?php

namespace app\common\model;

use think\Model;

class ItemDetails extends Model
{

    // 表名
    protected $name = 'item_details';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    // 追加属性
    protected $append = [
    ];

    public function getImagesAttr($value,$data){
        if (!empty($data['images'])){
            $image = explode(',',$data['images']);
            foreach ($image as $k => $v){
                $list[] = cdnurl($v, true);
            }
            return $list;
        }
    }

}