|
@@ -340,7 +340,6 @@ class CmsContentTemplateSetRepository {
|
|
|
*/
|
|
|
public function preview($request)
|
|
|
{
|
|
|
- $temalate = $this->cmsContentTemplate->select('id','title','apply_type')->where(['status'=>0,'city_id'=>$request['city_id'],'deleted_at'=>null])->orderBy('apply_type','asc')->get();
|
|
|
$temalates = $this->cmsContentTemplate->select('title')->where(['id'=>$request['tpl_id']])->first();
|
|
|
if (!$temalates){
|
|
|
throw new HttpException(500, '没有找到对应模板');
|
|
@@ -352,13 +351,11 @@ class CmsContentTemplateSetRepository {
|
|
|
$group_array['apply_type'] = 0;
|
|
|
$group_array['tpl_id'] = $request['tpl_id'];
|
|
|
$group_array['title'] = $temalates->title;
|
|
|
- $group_array['template'] = $temalate->toArray();
|
|
|
$group_array['content'] =[];
|
|
|
}else{//菜市场首页
|
|
|
$group_array['apply_type'] = 1;
|
|
|
$group_array['tpl_id'] = $request['tpl_id'];
|
|
|
$group_array['title'] = $temalates->title;
|
|
|
- $group_array['template'] = $temalate->toArray();
|
|
|
$group_array['content'] =[];
|
|
|
}
|
|
|
|