ShoppicModel.php 496 字节
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/11/12
 * Time: 17:50
 */

namespace api\index\model;


use think\Model;

class ShoppicModel extends Model
{
    public function getThumbnailAttr($value){
        return cmf_get_image_preview_url($value);
    }

    public function selectData($where){
        $data = $this
            ->where($where)
            ->field('id,thumbnail,url')
            ->order('id desc')
            ->select();
        return $data;
    }
}