作者 邓超

x

@@ -57,12 +57,13 @@ class Home extends Base { @@ -57,12 +57,13 @@ class Home extends Base {
57 $where = ['email_id'=>$this->getEmails('id')]; 57 $where = ['email_id'=>$this->getEmails('id')];
58 58
59 59
60 - $folder_id = []; 60 + $folder_id = ['-'];
61 if (app()->requestArr('folder_id')){ 61 if (app()->requestArr('folder_id')){
62 $folder_id = app()->requestArr('folder_id'); 62 $folder_id = app()->requestArr('folder_id');
63 }else{ 63 }else{
64 // 目录 64 // 目录
65 $folder = app()->request('folder','收件箱'); 65 $folder = app()->request('folder','收件箱');
  66 + if($folder !== true){
66 $folderList = db()->all(folderSql::all($where['email_id'])); 67 $folderList = db()->all(folderSql::all($where['email_id']));
67 68
68 // 文件夹id 69 // 文件夹id
@@ -79,12 +80,15 @@ class Home extends Base { @@ -79,12 +80,15 @@ class Home extends Base {
79 } 80 }
80 } 81 }
81 82
  83 + }
  84 +
82 if(!$folder_id){ 85 if(!$folder_id){
83 app()->e('folder_not_fount'); 86 app()->e('folder_not_fount');
84 } 87 }
  88 + $folder_id = array_filter($folder_id,'is_int');
85 89
86 //目录 90 //目录
87 - $where['folder_id'] = $folder_id; 91 + if($folder_id) $where['folder_id'] = $folder_id;
88 if($ids) $where['id'] = $ids; 92 if($ids) $where['id'] = $ids;
89 93
90 if(paramHas('attachment')){ 94 if(paramHas('attachment')){