<?php
class helpCenterModule extends Model
{
    public function __construct()
    {
        parent::__construct("sl_help_center");
    }
    /**
     * Notice: 获取用户信息
     * Date: 2019年6月10日11:55:48
     * @author dyj
     */
    //根据分类获取用户的问答
    public function getAllByType($type){
        $data = $this->where(['type'=>$type])->orderBy('sort desc,id desc')->all();
        foreach ($data as $k=>$v){
            $data[$k]['content'] = html_entity_decode($v['content']);
        }
        return $data;
    }
}