作者 邓超

x

... ... @@ -128,16 +128,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){
echo $e->getMessage();
}
... ...