作者 jinglong
1 个管道 的构建 通过 耗费 0 秒

修改富文本解析

... ... @@ -13,6 +13,7 @@ namespace api\home\controller;
use cmf\controller\RestBaseController;
use think\Db;
use think\Validate;
use app\portal\model\PortalPostModel;
/**
* @title 产品系列
*/
... ... @@ -180,6 +181,10 @@ class SeriesController extends RestBaseController
//查找父类名称
$pid = CommonController::findData('type',['id'=>$res['t_id']],'pid');
$parent_name = CommonController::findData('type',['id'=>$pid['pid']],$flag);
if($res){
$contentModel = new PortalPostModel();
$res['detail'] = $contentModel->getPostContentAttr($res['detail']);
}
$this->success('成功',['data'=>$res,'parent_name'=>$parent_name['name']]);
}
}
... ...
... ... @@ -12,6 +12,7 @@ namespace api\home\controller;
use cmf\controller\RestBaseController;
use think\Validate;
use app\portal\model\PortalPostModel;
/**
* @title 主要服务
*/
... ... @@ -75,6 +76,10 @@ class ServiceController extends RestBaseController
$field_service = 'id,name,detail';
}
$res = CommonController::findData('service',['id'=>$service_id],$field_service);
if($res){
$contentModel = new PortalPostModel();
$res['detail'] = $contentModel->getPostContentAttr($res['detail']);
}
$this->success('成功',$res);
}
}
... ...