内容页关联文章标签related接口调用不显示
内容页关联文章标签related接口调用不显示?
{if $tag}
{related module=news field=title,inputtime,support,hits,thumb,catid,uid tag=$tag page=1 pagesize=10 urlrule=$urlrule return=r}
{php $api['thumb'] = dr_thumb($c, 260, 195, 0, 'crop');}
{php $api['support'] = intval($r['support']);}
{php $api['title'] = $r['title'];}
{php $api['hits'] = intval($r['hits']);}
{php $api['comments'] = dr_cat_value('works', $r['catid'], 'name');}
{php $api['inputtime'] = dr_fdate($r['_inputtime']);}
{/related}
{/if}应用版权:官方
应用名称:API接口
{php $api['tag'] = $tag;} {php $api['relatedlist'] = [];} {related module=works field=title,support,thumb,upworks,uid tag=$tag page=1 pagesize=10 return=r} {php $api['relatedlist']['id'] = $r['id'];} {php $api['relatedlist']['author'] = dr_member_info($r['uid'])['name'];} {php $api['relatedlist']['thumb'] = dr_thumb($r['thumb'], 260, 195, 0, 'crop');} {php $api['relatedlist']['title'] = $r['title'];} {php $api['relatedlist']['updatetime'] = dr_date($r['updatetime']);} {php $api['relatedlist']['description'] = dr_strcut($r['description'], 100, '...');} {php $api['relatedlist']['user_avatar'] = dr_avatar($r['uid']);} {php $api['relatedlist']['support'] = intval($r['support']);} {php $api['relatedlist']['comments'] = $r['comments'];} {/related} {php $api['relatedlist']['total'] = $total;} {php $api['relatedlist']['nums'] = $nums;} {php $api['relatedlist']['page'] = $page;} {php $api['relatedlist']['pagesize'] = $pagesize;}{php $api['tag'] = $tag;}是这个吗?{if $tag} {related module=news field=title,inputtime,support,hits,thumb,catid,uid tag=$tag page=1 pagesize=10 urlrule=$urlrule return=r} {php $api[$key_r]['thumb'] = dr_thumb($c, 260, 195, 0, 'crop');} {php $api[$key_r]['support'] = intval($r['support']);} {php $api[$key_r]['title'] = $r['title'];} {php $api[$key_r]['hits'] = intval($r['hits']);} {php $api[$key_r]['comments'] = dr_cat_value('works', $r['catid'], 'name');} {php $api[$key_r]['inputtime'] = dr_fdate($r['_inputtime']);} {/related} {/if}