PageHtmlModel.php 725 字节
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/25
 * Time: 19:49
 */

namespace app\index\model;


use think\Model;

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