|
@@ -22,7 +22,7 @@ class CmsContentTemplateSetRepository {
|
|
|
*/
|
|
|
public function preview($request)
|
|
|
{
|
|
|
- $temalates = $this->cmsContentTemplate->select('title','id')->where(['city_id'=>$request['city_id'],'apply_type'=>$request['type'],'is_open'=>0])->first();
|
|
|
+ $temalates = $this->cmsContentTemplate->select('title','id')->where(['city_id'=>$request['city_id'],'apply_type'=>$request['type'],'is_open'=>1])->first();
|
|
|
if (!$temalates){
|
|
|
throw new HttpException(500, '没有找到对应模板');
|
|
|
}
|
|
@@ -94,6 +94,6 @@ class CmsContentTemplateSetRepository {
|
|
|
}
|
|
|
|
|
|
public function getTemplate($cityId){
|
|
|
- return $this->cmsContentTemplate->select('title','id')->where(['city_id'=>$cityId,'is_open'=>0])->get();
|
|
|
+ return $this->cmsContentTemplate->select('title','apply_type')->where(['city_id'=>$cityId,'is_open'=>1])->orderBy('apply_type','asc')->get();
|
|
|
}
|
|
|
}
|