模板
user/people.html
进入公开页有两种链接格式
方法一:http://域名/user/active?uid=用户ID 或 http://域名/user/active/uid/用户ID
方法二:http://域名/user/active?uname=用户昵称 或 http://域名/user/active/uname/用户昵称
用户发布文章
链接:http://域名/user/active?uid=用户ID&type=1
用户发布商品
链接:http://域名/user/active?uid=用户ID&type=2
用户关注列表
链接:http://域名/user/active?uid=用户ID&type=3
用户粉丝列表
链接:http://域名/user/active?uid=用户ID&type=4
用户收藏列表
链接:http://域名/user/active?uid=用户ID&type=5
用户评论列表
链接:http://域名/user/active?uid=用户ID&type=6
用户点赞列表
链接:http://域名/user/active?uid=用户ID&type=7
模板代码
<ul class="content-list"> {if($lists)} {if($type==1 || $type==2)} {foreach $lists as $v} <li> <dl class="content-x"> <dd class="img">{if($v['litpic'])}<img src="{$v['litpic']}">{else}无图{/if}</dd> <dd><a href="{$v['url']}" title="{$v['title']}">{$v['title']}</a></dd> </dl> </li> {/foreach} {else if($type==3)} {foreach $lists as $v} <li> <div class="follow-list-item"> <div class="img-box"><img src="{if($v['litpic'])}{$v['litpic']}{else}{$common}images/login1.png{/if}" alt="{$v['username']}"></div> <h4>{$v['username']}</h4> <p>{if($v['signature'])}{$v['signature']}{else}他很懒,什么都没有留下~{/if}</p> <a href="{fun U('user/nofollow',['uid'=>$v['id']])}" title="关注">关注</a> </div> </li> {/foreach} {else if($type==4)} {foreach $lists as $v} <li> <div class="follow-list-item"> <div class="img-box"><img src="{if($v['litpic'])}{$v['litpic']}{else}{$common}user/images/login1.png{/if}" alt=""></div> <h4>{$v['username']}</h4> <p>{if($v['signature'])}{$v['signature']}{else}他很懒,什么都没有留下~{/if}</p> <a href="{fun U('user/follow',['uid'=>$v['id']])}" title="关注">关注</a> </div> </li> {/foreach} {else if($type==5)} {foreach $lists as $v} <li> <p> <a href="{$v['url']}" target="_blank" class="title">{$v['title']}</a> <span class="btn-table btn-light">{$v['classname']}</span> <a {if($v['member_id']!=0)}href="{fun U('user/active',['uid'=>$v['member_id']])}"{/if} target="_blank" class="title">{if($v['member_id']!=0)}{fun memberInfo($v['member_id'],'username')}{else}[官方]{/if}</a> </p> </li> {/foreach} {else if($type==6)} {foreach $lists as $v} <li> <div class="record-item"> <p><span>时间:{$v['date']}</span></p> <p><span>回复了: <a href="{$v['url']}">{fun newstr($v['body'],30)}</a></span></p> <h4><span class="text-info">【{$classtypedata[$v['tid']]['classname']}】</span><span class="fr"><a href="{$v['url']}" class="btn-more" title="查看详情">查看详情</a></span></h4> </div> </li> {/foreach} {else if($type==7)} {foreach $lists as $v} <li> <div class="follow-list-item"> {if($v['member_id']!=0)} {php $author = memberInfo($v['member_id']); /} <div class="user-top"> <div class="img-box"> <img src="{if($author['litpic'])}{$author['litpic']}{else}{$common}user/images/user.png{/if}" alt=""> </div> <div class="user-name"> <h4>{$author['username']}</h4> <p>{$author['signature']}</p> </div> </div> {else} {php $author = adminInfo($v['userid']); /} <div class="user-top"> <div class="img-box"> <img src="{$common}user/images/user.png" alt=""> </div> <div class="user-name"> <h4>{$author['name']}【官方】</h4> <p></p> </div> </div> {/if} <div class="list-content"> <div class="img-box"> </div> <div class="cont"> <a href="{$v['url']}" title="{$v['title']}">{$v['title']}</a> </div> </div> </div> </li> {/foreach} {/if} {else} <li>没有任何内容~</li> {/if} </ul>