| 插件名稱 | 模塊內(nèi)容收藏 V1.5 |
| 插件作者 | 迅睿官方團(tuán)隊 |
| 最近更新 | 2024-11-13 11:17:57 |
| 自動清理已失效的文章數(shù)據(jù) |
收藏列表怎么在前端調(diào)用,收藏列表在首頁顯示不出來,可以查到記錄是2條,但是在欄目頁可以顯示,這是哪里出錯了

<?php $ids=[]; $table=dr_module_table_prefix('pcd', SITE_ID).'_favorite';?>
{table table=$table}
<?php $ids[]=$t['cid'];?>
{/table}
{if $ids}
<?php $ids=implode(',', $ids);?>
{module IN_id=$ids page=1 pagesize=6 cache=300 urlrule=wendacms return=t}
<tr>
<td class="sop-icon1">
<a href="javascript:dr_delete_favorite('{$t.id}');">
<i class="fa fa-times"></i>
</a>
</td>
<td class="sop-cart">
<a href="{$t.url}"><img class="primary-image" alt="" src="{dr_thumb($t.thumb,100,100)}"></a>
</td>
........
<script>
function dr_delete_favorite(id) {
$.get("{dr_url_prefix('index.php')}?is_ajax=1&s=api&app={MOD_DIR}&c=module&m=favorite&delete=1&id="+id, function(data){
dr_cmf_tips(data.code, data.msg);
if (data.code) {
$('#module_favorite_'+id).html(data.data);
}
}, 'json');
</script>官方提醒:使用module內(nèi)容循環(huán)標(biāo)簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋
1 module=某某目錄
2
{MOD_DIR}在首頁是無效的,需要改成某某目錄
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!