作者 lyh

gx

@@ -17,7 +17,7 @@ class BTemplateController extends BaseController @@ -17,7 +17,7 @@ class BTemplateController extends BaseController
17 * @time :2023/6/29 9:21 17 * @time :2023/6/29 9:21
18 */ 18 */
19 public function publicTemplateLists(BTemplateLogic $BTemplateLogic){ 19 public function publicTemplateLists(BTemplateLogic $BTemplateLogic){
20 - $lists = $BTemplateLogic->publicTemplateLists($this->map,$this->order); 20 + $lists = $BTemplateLogic->publicTemplateLists($this->map,$this->page,$this->row,$this->order);
21 $this->response('success',Code::SUCCESS,$lists); 21 $this->response('success',Code::SUCCESS,$lists);
22 } 22 }
23 23
@@ -29,9 +29,9 @@ class BTemplateLogic extends BaseLogic @@ -29,9 +29,9 @@ class BTemplateLogic extends BaseLogic
29 * @method :post 29 * @method :post
30 * @time :2023/6/29 9:34 30 * @time :2023/6/29 9:34
31 */ 31 */
32 - public function publicTemplateLists($map,$order = 'created_at',$filed = ['id','name','image','created_at']){ 32 + public function publicTemplateLists($map,$page,$row,$order = 'created_at',$filed = ['id','name','image','created_at']){
33 $templateModel = new Template(); 33 $templateModel = new Template();
34 - $lists = $templateModel->list($map,$order,$filed); 34 + $lists = $templateModel->lists($map,$page,$row,$order,$filed);
35 return $this->success($lists); 35 return $this->success($lists);
36 } 36 }
37 37
@@ -50,9 +50,9 @@ class BTemplateLogic extends BaseLogic @@ -50,9 +50,9 @@ class BTemplateLogic extends BaseLogic
50 //查看当前模板是否已编辑保存web_template 50 //查看当前模板是否已编辑保存web_template
51 $TemplateInfo = $this->model->read([ 51 $TemplateInfo = $this->model->read([
52 'template_id'=>$info['template_id'], 52 'template_id'=>$info['template_id'],
53 - 'source'=>$this->param['source'], 53 + 'source'=>!isset($this->param['source']) ? 1 : $this->param['source'],
54 'project_id'=>$this->user['project_id'], 54 'project_id'=>$this->user['project_id'],
55 - 'source_id'=>$this->param['source_id'], 55 + 'source_id'=>!isset($this->param['source_id']) ? 0 : $this->param['source_id'],
56 ]); 56 ]);
57 if($TemplateInfo === false){ 57 if($TemplateInfo === false){
58 //获取模板详情 58 //获取模板详情