正在显示
1 个修改的文件
包含
43 行增加
和
9 行删除
@@ -176,10 +176,10 @@ class Home extends Base { | @@ -176,10 +176,10 @@ class Home extends Base { | ||
176 | if($form_not_in){ | 176 | if($form_not_in){ |
177 | $form_not_in = is_array($form_not_in) ? $form_not_in : [$form_not_in]; | 177 | $form_not_in = is_array($form_not_in) ? $form_not_in : [$form_not_in]; |
178 | $form_not_in = array_filter($form_not_in,function ($v){ | 178 | $form_not_in = array_filter($form_not_in,function ($v){ |
179 | - if(is_string($v) && Verify::sEmail($v)){ | ||
180 | - return true; | ||
181 | - } | ||
182 | - return false; | 179 | + if(is_string($v) && Verify::sEmail($v)){ |
180 | + return true; | ||
181 | + } | ||
182 | + return false; | ||
183 | }); | 183 | }); |
184 | if($form_not_in){ | 184 | if($form_not_in){ |
185 | if(isset($where['from.notin'])){ | 185 | if(isset($where['from.notin'])){ |
@@ -234,6 +234,40 @@ class Home extends Base { | @@ -234,6 +234,40 @@ class Home extends Base { | ||
234 | 234 | ||
235 | } | 235 | } |
236 | 236 | ||
237 | + /** | ||
238 | + * 统计 | ||
239 | + * @throws \Lib\Err | ||
240 | + * @author:dc | ||
241 | + * @time 2024/10/14 16:20 | ||
242 | + */ | ||
243 | + public function count() | ||
244 | + { | ||
245 | + | ||
246 | + $where = []; | ||
247 | + | ||
248 | + $where['folder_id'] = []; | ||
249 | + | ||
250 | + // 目录 | ||
251 | + $folder = app()->request('folder', '收件箱'); | ||
252 | + $folderList = db()->all(folderSql::all($where['email_id'])); | ||
253 | + | ||
254 | + // 文件夹id | ||
255 | + if ($folderList) { | ||
256 | + foreach ($folderList as $item) { | ||
257 | + if ($item['folder'] == $folder) { | ||
258 | + $where['folder_id'][] = $item['id']; | ||
259 | + } | ||
260 | + } | ||
261 | + } | ||
262 | + | ||
263 | + // 软删 | ||
264 | + $where['deleted'] = 0; | ||
265 | + | ||
266 | + // 总数 | ||
267 | + $total = db()->count(listsSql::listCount(dbWhere($where))); | ||
268 | + | ||
269 | + app()->_json(['total'=>$total]); | ||
270 | + } | ||
237 | 271 | ||
238 | /** | 272 | /** |
239 | * 检测邮箱状态 | 273 | * 检测邮箱状态 |
@@ -403,10 +437,10 @@ class Home extends Base { | @@ -403,10 +437,10 @@ class Home extends Base { | ||
403 | // 保存 | 437 | // 保存 |
404 | $draftid = listsSql::saveDraft($sendData,$email,app()->request('draft_id',0,'intval')); | 438 | $draftid = listsSql::saveDraft($sendData,$email,app()->request('draft_id',0,'intval')); |
405 | // 保存失败 | 439 | // 保存失败 |
406 | - if($draftid){ | 440 | + if($draftid){ |
407 | app()->_json(['draft_id'=>$draftid]); | 441 | app()->_json(['draft_id'=>$draftid]); |
408 | - } | ||
409 | - app()->e('save_draft_error'); | 442 | + } |
443 | + app()->e('save_draft_error'); | ||
410 | 444 | ||
411 | } | 445 | } |
412 | // 定时发送 或者是单条发送 | 446 | // 定时发送 或者是单条发送 |
@@ -554,7 +588,7 @@ class Home extends Base { | @@ -554,7 +588,7 @@ class Home extends Base { | ||
554 | // return $mailInstance->move($uid,$origin_folder,$to_origin_folder); | 588 | // return $mailInstance->move($uid,$origin_folder,$to_origin_folder); |
555 | // }catch (\Throwable $e){ | 589 | // }catch (\Throwable $e){ |
556 | // if(app()->request('move_err_copy',1)){ | 590 | // if(app()->request('move_err_copy',1)){ |
557 | - // 复制成功 | 591 | + // 复制成功 |
558 | try { | 592 | try { |
559 | if($mailInstance->copy($uid,$origin_folder,$to_origin_folder)){ | 593 | if($mailInstance->copy($uid,$origin_folder,$to_origin_folder)){ |
560 | return $mailInstance->deleted($uid,$origin_folder); | 594 | return $mailInstance->deleted($uid,$origin_folder); |
@@ -859,7 +893,7 @@ class Home extends Base { | @@ -859,7 +893,7 @@ class Home extends Base { | ||
859 | 893 | ||
860 | // 是否再次 重新获取 | 894 | // 是否再次 重新获取 |
861 | $reload = app()->request('reload',0,'intval'); | 895 | $reload = app()->request('reload',0,'intval'); |
862 | - | 896 | + $data['allowreply'] = db()->value(folderSql::first(['id'=>$data['folder_id']],'folder'))!='发件箱'?1:0; |
863 | HOME_INFO_BODY: | 897 | HOME_INFO_BODY: |
864 | $body = db()->first(bodySql::first($id)); | 898 | $body = db()->first(bodySql::first($id)); |
865 | if($body && !$reload){ | 899 | if($body && !$reload){ |
-
请 注册 或 登录 后发表评论