From 3251aff582308155abb05ccca3daf994a2996ce0 Mon Sep 17 00:00:00 2001 From: zyx0814 Date: Fri, 13 Sep 2024 16:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=B0=81=E9=9D=A2?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/table/table_pichome_resources.php | 19 +++++++++++-------- dzz/pichome/library/index.php | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/class/table/table_pichome_resources.php b/core/class/table/table_pichome_resources.php index 092476e..4a9f744 100644 --- a/core/class/table/table_pichome_resources.php +++ b/core/class/table/table_pichome_resources.php @@ -331,15 +331,18 @@ class table_pichome_resources extends dzz_table $hascoverrids[] = $v['rid']; } $rids = array_diff($rids, $hascoverrids); - foreach (DB::fetch_all("select * from %t where rid in(%n)", array('thumb_record', $rids)) as $v) { - if ($v['rid']) $return[$v['rid']]['imgstatus'] = 1; - if ($v['sstatus']) { - $return[$v['rid']]['icondata'] =IO::getFileUri($v['spath']); - } else $return[$v['rid']]['icondata'] = false; - if ($v['lstatus']) { - $return[$v['rid']]['originalimg'] =IO::getFileUri($v['lpath']); - } else $return[$v['rid']]['originalimg'] = false; + if(!empty($rids)){ + foreach (DB::fetch_all("select * from %t where rid in(%n)", array('thumb_record', $rids)) as $v) { + if ($v['rid']) $return[$v['rid']]['imgstatus'] = 1; + if ($v['sstatus']) { + $return[$v['rid']]['icondata'] =IO::getFileUri($v['spath']); + } else $return[$v['rid']]['icondata'] = false; + if ($v['lstatus']) { + $return[$v['rid']]['originalimg'] =IO::getFileUri($v['lpath']); + } else $return[$v['rid']]['originalimg'] = false; + } } + return $return; } diff --git a/dzz/pichome/library/index.php b/dzz/pichome/library/index.php index 8dde021..f066a91 100644 --- a/dzz/pichome/library/index.php +++ b/dzz/pichome/library/index.php @@ -1031,7 +1031,7 @@ where r.isdelete = 0 and r.appid = %s order by r.dateline desc ", ['pichome_reso $appid = isset($_GET['appid']) ? trim($_GET['appid']) : ''; $url = 'index.php?mod=pichome&op=fileview#appid=' . $appid; $sid = 'vapp_'.$appid; - $qrcode = C::t('pichome_route')->getQRcodeBySid($url, $appid); + $qrcode = C::t('pichome_route')->getQRcodeBySid($url, $sid); exit(json_encode(['success' => true, 'qrcode' => $qrcode])); } else { $theme = GetThemeColor();