作者 邓超

x

... ... @@ -225,17 +225,16 @@ function sync($email_id){
// $folders = list_to_tree($folders);
foreach ($folders as $folder){
try {
if(empty($folder['_child'])){
$call($email_id,$folder['id'],$folder['origin_folder']);
}else{
foreach ($folder['_child'] as $item){
// 同步子文件夹
$call($email_id,$item['id'],$item['origin_folder']);
$is = true;
foreach ($folders as $f){
// 是否存在下级
if($f['pid'] == $folder['id']){
$is = false;
}
}
if($is) $call($email_id,$folder['id'],$folder['origin_folder']);
}catch (\Throwable $e){
logs(
$e->getMessage().$e->getTraceAsString(),
... ...