...
|
...
|
@@ -58,25 +58,28 @@ class Home extends Base { |
|
|
|
|
|
$where = ['email_id'=>$this->getEmails('id')];
|
|
|
|
|
|
// 目录
|
|
|
$folder = app()->request('folder','收件箱');
|
|
|
$folderList = db()->all(folderSql::all($where['email_id']));
|
|
|
|
|
|
$folder_id = [];
|
|
|
// 文件夹id
|
|
|
if($folderList){
|
|
|
foreach ($folderList as $item){
|
|
|
if(
|
|
|
// 数组文件夹
|
|
|
(is_array($folder) && in_array($item['folder'],$folder))
|
|
|
|| $item['folder'] == $folder
|
|
|
){
|
|
|
$folder_id[] = $item['id'];
|
|
|
if (app()->requestArr('folder_id')){
|
|
|
$folder_id = app()->requestArr('folder_id');
|
|
|
}else{
|
|
|
// 目录
|
|
|
$folder = app()->request('folder','收件箱');
|
|
|
$folderList = db()->all(folderSql::all($where['email_id']));
|
|
|
|
|
|
// 文件夹id
|
|
|
if($folderList){
|
|
|
foreach ($folderList as $item){
|
|
|
if(
|
|
|
// 数组文件夹
|
|
|
(is_array($folder) && in_array($item['folder'],$folder))
|
|
|
|| $item['folder'] == $folder
|
|
|
){
|
|
|
$folder_id[] = $item['id'];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (app()->requestArr('folder_id')){
|
|
|
$folder_id = array_merge($folder_id,app()->requestArr('folder_id'));
|
|
|
}
|
|
|
|
|
|
if(!$folder_id){
|
|
|
app()->e('folder_not_fount');
|
...
|
...
|
|