审查视图

app/index/model/PageHtmlModel.php 701 字节
王晓刚 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?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);
    }
王晓刚 authored
25 26 27 28 29
    /**
     * content 自动转化
     * @param $value
     * @return string
     */
王晓刚 authored
30
    public function getContentAttr($value)
王晓刚 authored
31
    {
王晓刚 authored
32
        return cmf_replace_content_file_url(htmlspecialchars_decode($value));
王晓刚 authored
33
    }
王晓刚 authored
34 35 36 37 38
    public function findData($where){
        $data = $this->where($where)->find();
        return $data;
    }
}