v9:viewsClick
点击量排行
--------
{pc:get sql="select p.title, p.url,pd.price from mk_hits h, mk_phone p, mk_phone_data pd where h.hitsid = concat('c-13-',p.id) and p.id = pd.id and p.catid=10 order by h.monthviews desc, p.updatetime desc" cache="0" num="9"}
<ul class="listNum">
{loop $data $key $val}
<li><span class="price">¥:{$val[price]}</span><a href="{$val['url']}">{$val['title']}</a></li>
{/loop}
</ul>
{/pc}
随机排行
-------
{pc:get sql="select p.id, p.title,p.thumb, pd.price from mk_phone p, mk_phone_data pd where p.id = pd.id order by rand()" num="8"}
{loop $data $k $v}
<div class="item">
<a href="{phoneUrl('main',$v[id])}"><img src="{$v[thumb]}" alt="{$v[title]}"></a>
<a href="{phoneUrl('main',$v[id])}" class="title">{$v[title]}</a>
<span class="price">{$v[price]}</span>
</div>
{/loop}
{/pc}
自定义调用推荐位
-------------
{pc:get sql="select a.title, a.appcat, a.url, a.thumb from mk_app a ,mk_position_data p where p.posid = 18 and p.catid=$r[catid] and a.id = p.id" num="8"}
{loop $data $key $val}
<div class="item">
<img src="{$val['thumb']}" alt="{$val[title]}">
<h4><a href="{$val['url']}">{$val[title]}</a></h4>
<span class="star">评分:</span>
<span class="cat">分类:{$linkageApp[$val[appcat]][name]}</span>
</div>
{/loop}
{/pc}