正在显示
1 个修改的文件
包含
35 行增加
和
1 行删除
@@ -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 | * 检测邮箱状态 |
@@ -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){ |
-
请 注册 或 登录 后发表评论