BTemplateModuleProjectLogic.php
1.7 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* @remark :
* @name :BTemplateModuleProjectLogic.php
* @author :lyh
* @method :post
* @time :2023/11/14 14:41
*/
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Template\BModuleProject;
class BTemplateModuleProjectLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new BModuleProject();
$this->param = $this->requestAll;
}
/**
* @remark :获取左侧模块列表
* @name :ModuleList
* @author :lyh
* @method :post
* @time :2023/6/29 13:35
*/
public function ModuleList($map,$order = 'created_at',$filed = ['id','name','sort','status','image','html']){
$map['status'] = 0;
$lists = $this->model->list($map,$order,$filed);
return $this->success($lists);
}
/**
* @remark :保存私有化左侧模块
* @name :moduleProjectSave
* @author :lyh
* @method :post
* @time :2023/11/14 14:46
*/
public function moduleProjectSave(){
try {
$this->param['operator_id'] = $this->user['id'];
$this->param['project_id'] = $this->user['project_id'];
$this->model->add($this->param);
}catch (\Exception $e){
$this->fail('系统错误,请联系管理员');
}
return $this->success();
}
/**
* @remark :
* @name :delModule
* @author :lyh
* @method :post
* @time :2023/11/28 17:42
*/
public function delModule(){
try {
$this->model->del($this->param);
}catch (\Exception $e){
$this->fail('系统错误,请联系管理员');
}
return $this->success();
}
}