use think\Model;
use think\Db;
class ContentModel extends Model
{
protected $name='content';
public function getContentByCon($con)
{
$tabname = db('diymodel')->where(['id'=>$con['mid']])->value('tabname');
$info = db('diy_'.$tabname)->where(['conid'=>$con['vid']])->find();
if ($info) {
$con = array_merge($con, $info);
}
$con['ys_title'] = $con['title'];
foreach ($con as $k => $v) {
$con[$k] = disablewords($v);//替换禁用词
if (config('sys.pc_mip')) {
con | { "ys_title": null } |