SettingFaqLogic.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @remark :
* @name :SettingFaqLogic.php
* @author :lyh
* @method :post
* @time :2025/10/29 16:34
*/
namespace App\Http\Logic\Bside\Setting;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\WebSetting\SettingFaq;
class SettingFaqLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new SettingFaq();
$this->param = $this->requestAll;
}
/**
* @remark :获取列表页数据
* @name :getFaqLists
* @author :lyh
* @method :post
* @time :2025/10/29 16:50
*/
public function getFaqLists($map = [],$page = 1, $row = 10,$order = 'id')
{
$lists = $this->model->lists($map,$page,$row,$order);
return $this->success($lists);
}
/**
* @remark :保存数据
* @name :saveFaq
* @author :lyh
* @method :post
* @time :2025/10/29 16:50
*/
public function saveFaq()
{
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$this->model->edit($this->param,['id'=>$id]);
}else{
$id = $this->model->addReturnId($this->param);
}
return $this->success(['id' => $id]);
}
}