site.php
8.9 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?php
return array (
//用户身份
//甲方员工
'a_staff' => 1,
//乙方员工
'b_staff' => 2,
//甲方领导
'a_leader' => 3,
//乙方领导
'b_leader' => 4,
//甲方总领导
'a_leaders' => 5,
//分页数据
'limit' => 10,
//域名
'host' => 'http://xiaofang.w.bronet.cn',
//甲方提交报修流程
'a_step' => ['甲方提交报修信息','乙方确认信息','乙方维修设备','乙方提交维修单','甲方验收维修结果','甲方验收完成'],
//乙方提交报修流程
'b_step' => ['乙方提交报修信息','甲方确认信息','乙方维修设备','乙方提交维修单','甲方验收维修结果','甲方验收完成'],
//验证规则
'v_code' => [
'rule' => [
'mobile' => ['require','regex'=>'/^0?1[3|4|5|6|7|8][0-9]\d{8}$/'],
'mobile_code' => 'require|number',
],
'msg' => [
'mobile.require' => '手机号不能为空',
'mobile' => '手机号格式不正确',
'mobile_code.require' => '验证码不能为空',
'mobile_code.number' => '验证码必须是数字',
]
],
'f_pass' => [
'rule' => [
'mobile' => ['require','regex'=>'/^0?1[3|4|5|6|7|8][0-9]\d{8}$/'],
'password' => 'require',
'password_again' => 'require',
],
'msg' => [
'mobile.require' => '手机号不能为空',
'mobile' => '手机号格式不正确',
'password.require' => '请输入密码',
'password_again.require' => '请再次输入密码',
]
],
'is_work' => [
'rule' => [
'is_work' => 'require|number',
],
'msg' => [
'is_work.require' => '工作状态不能为空',
'is_work.number' => '工作状态必须是数字',
]
],
'ins_add' => [
'rule' => [
'id' => 'require|number',
],
'msg' => [
'id.require' => 'id不能为空',
'id.number' => 'id必须是数字',
]
],
'type' => [
'rule' => [
'type' => 'require|number',
'page' => 'require|number',
],
'msg' => [
'type.require' => '工作类型不能为空',
'type.number' => '工作类型必须是数字',
'page.require' => '页码不能为空',
'page.number' => '页码必须是数字',
]
],
'ins_post' => [
'rule' => [
'point_id' => 'require|number',
'project_id' => 'require|number',
'status' => 'require|number',
'images' => 'require',
'create_time' => 'require',
],
'msg' => [
'point_id.require' => '巡检点id不能为空',
'point_id.number' => '巡检点id必须是数字',
'project_id.require' => '项目id不能为空',
'project_id.number' => '项目id必须是数字',
'status.require' => '巡检状态不能为空',
'status.number' => '巡检状态必须是数字',
'images.require' => '巡检图片不能为空',
'create_time.require' => '巡检时间不能为空',
]
],
'pages' => [
'rule' => [
'page' => 'require|number',
],
'msg' => [
'page.require' => '页码不能为空',
'page.number' => '页码必须是数字',
]
],
'pages_list' => [
'rule' => [
'page' => 'require|number',
'status' => 'require|number',
],
'msg' => [
'page.require' => '页码不能为空',
'page.number' => '页码必须是数字',
'status.require' => '状态码不能为空',
'status.number' => '状态码必须是数字',
]
],
'repair_post' => [
'rule' => [
'images' => 'require',
'video' => 'require',
'audio' => 'require',
'description' => 'require',
],
'msg' => [
'images.require' => '图片凭证不能为空',
'video.require' => '视频凭证不能为空',
'audio.require' => '音频凭证不能为空',
'description.require' => '故障问题不能为空',
]
],
'data' => [
'rule' => [
'id' => 'require|number',
],
'msg' => [
'id.require' => '列表id不能为空',
'id.number' => '列表id必须是数字',
]
],
'improve_post' => [
'rule' => [
'id' => 'require|number',
'repair_images' => 'require',
'repair_description' => 'require',
],
'msg' => [
'id.require' => '报修单id不能为空',
'id.number' => '报修的id必须为数字',
'repair_images.require' => '维修照片不能为空',
'repair_description.require' => '维修备注不能为空',
]
],
'check_post' => [
'rule' => [
'id' => 'require|number',
'confirm_images' => 'require',
],
'msg' => [
'id.require' => '报修单id不能为空',
'id.number' => '报修的id必须为数字',
'confirm_images.require' => '验收照片不能为空',
]
],
'ins_m_post' => [
'rule' => [
'ins_m_time' => 'require',
'address' => 'require',
'a_uid' => 'require|number',
'remark' => 'require',
],
'msg' => [
'ins_m_time.require' => '月检时间不能为空',
'address.require' => '月检地点不能为空',
'a_uid.require' => '月检甲方负责人不能为空',
'a_uid.number' => '月检甲方负责人必须是数字',
'remark.require' => '月检申请备注不能为空',
]
],
'confirm' => [
'rule' => [
'id' => 'require|number',
'type' => 'require|number',
],
'msg' => [
'id.require' => '列表id不能为空',
'id.number' => '列表id必须是数字',
'type.require' => '工作类型不能为空',
'type.number' => '工作类型必须是数字',
]
],
'ins_re_post' => [
'rule' => [
'id' => 'require|number',
'ins_m_time' => 'require',
'address' => 'require',
'a_uid' => 'require|number',
'remark' => 'require',
],
'msg' => [
'id.require' => '月检id不能为空',
'id.number' => '月检id必须是数字',
'ins_m_time.require' => '月检时间不能为空',
'address.require' => '月检地点不能为空',
'a_uid.require' => '月检甲方负责人不能为空',
'a_uid.number' => '月检甲方负责人必须是数字',
'remark.require' => '月检申请备注不能为空',
]
],
'train_post' => [
'rule' => [
'train_time' => 'require',
'address' => 'require',
'remark' => 'require',
],
'msg' => [
'train_time.require' => '培训时间不能为空',
'address.require' => '培训地点不能为空',
'remark.require' => '培训备注不能为空',
]
],
'improve_check_post' => [
'rule' => [
'id' => 'require|number',
'images' => 'require'
],
'msg' => [
'id.require' => '列表id不能为空',
'id.number' => '列表id必须是数字',
'images.require' => '图片不能为空',
]
],
);