AboutModel.php 694 字节
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/3
 * Time: 19:06
 */

namespace api\index\model;


use think\Model;

class AboutModel extends Model
{
    /**
     * thumbnail 自动转化
     * @param $value
     * @return array
     */
    public function getThumbnailAttr($value)
    {
        return cmf_get_image_url($value);
    }
    /**
     * content 自动转化
     * @param $value
     * @return array
     */
    public function getContentAttr($value)
    {
        return cmf_replace_content_file_url(htmlspecialchars_decode($value));
    }
    public function findData($where){
        $data = $this->where($where)->find();
        return $data;
    }
}