作者 邓超

h

... ... @@ -132,11 +132,18 @@ class Home extends Base {
if(app()->requestHas('from')){
// 如果是发件箱
if($folder == '发件箱'){
$where['to'] = app()->request('from');
$tos = app()->request('from');
if(!$where['to']){
// 不让查询数据
$where['id'] = 0;
}
if($tos){
$tos = array_map(function ($v){
return "find_in_set('".addcslashes($v,"'")."',`to`)";
},is_array($tos) ? $tos : [$tos]);
$where['_'][] = '('.implode(' or ',$tos).')';
}
}else{
$where['from'] = app()->request('from');
if(!$where['from']){
... ...