summaryrefslogtreecommitdiff
path: root/libs/Matcha.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-09-25 00:29:49 +0800
committerEltrac Koalar <hi@guhub.cn>2022-09-25 00:29:49 +0800
commit5c1db4c9a6b7c210dbd927d00c16192ccaad7745 (patch)
treea29cbefe8d5b708dd1bf3b16198dbe2d42aa6677 /libs/Matcha.php
parentd23f16c5ffe7c8fe2e68d5dabb01761178aa7781 (diff)
:bug: Fix: 相关链接填入多个文章时,之后的文章错误地显示第一个文章的信息
Diffstat (limited to 'libs/Matcha.php')
-rw-r--r--libs/Matcha.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/Matcha.php b/libs/Matcha.php
index 717680d..9bc3cc6 100644
--- a/libs/Matcha.php
+++ b/libs/Matcha.php
@@ -482,11 +482,15 @@ class Matcha
echo '没有设置 cid,请检查你的设置';
return false;
}
- $archives->widget('Widget_Archive@indexxiu', 'pageSize=1&type=post', 'cid='.$item['cid'])->to($post);
+ $post=Helper::widgetById('Contents', $item['cid']);
echo '<a href="'.$post->permalink.'">
<h2>'.$post->title.'</h2>
<p>';
- $post->excerpt(30);
+ if(isset($item['des'])){
+ echo $item['des'];
+ }else{
+ $post->excerpt(30);
+ }
echo '</p></a>';
}
//如果是自定义链接