ServiceController.php
2.1 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
71
72
73
74
75
<?php
namespace App\Http\Controllers\Aside;
use App\Enums\Common\Code;
use App\Http\Logic\Aside\Service\ServiceLogic;
/**
* @remark :企业服务设置信息
* @name :ServiceController
* @author :lyh
* @time :2023/6/25 16:13
*/
class ServiceController extends BaseController
{
/**
* @remark :列表
* @name :lists
* @author :lyh
* @method :post
* @time :2023/6/25 14:31
*/
public function lists(ServiceLogic $serviceLogic){
$lists = $serviceLogic->serviceLists($this->map);
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :新增或编辑
* @name :save
* @author :lyh
* @method :post
* @time :2023/6/25 11:51
*/
public function save(ServiceLogic $serviceLogic){
$serviceLogic->serviceSave();
$this->response('success');
}
/**
* @remark :参数验证
* @name :validParam
* @author :lyh
* @method :post
* @time :2023/6/25 14:03
*/
public function verifyParam(){
$this->request->validate([
'address' => 'required',
'duty_phone' => 'required',
'landline_telephone' => 'required',
'free_hotline' => 'required',
'enterprise_qq' => 'required',
'android' => 'required',
'official_account' => 'required',
'ios' => 'required',
'images' => 'required',
'app_remark' => 'required',
],[
'address.required' => '地址不能为空',
'duty_phone.required' => '值班电话不能为空',
'landline_telephone.required' => '座机电话不能为空',
'free_hotline.required' => '免费热线不能为空',
'enterprise_qq.required' => '企业qq不能为空',
'android.required' => '安卓不能为空',
'official_account.required' => '公众号不能为空',
'ios.required' => 'ios下载地址不能为空',
'images.required' => '轮播图不能为空',
'app_remark.required' => 'app下载备注信息不能为空',
]);
}
}