用户关联 免费 怎么写?
我这样写显示的是把所有关联用户都调用出来了~~
{if $mfxy && $vip && $index.price > 0 }
{member IN_id=$mfxy return=r}
{if $uid == $member.id || $r.id == $member.id }
{$neirong}
{elseif dr_is_son_buy(MOD_DIR, $index.id)}
{$neirong}
{else}
<div class="subscribe" style="text-align: center">
<div class="title"><i class="ico left_ico"></i>本章节是VIP章节,需要购买才能继续阅读<i class="ico right_ico"></i></div>
<p>
<a href="{dr_url('book/buy/index', ['id'=>$index.id])}" target="_blank" class="btn btn-circle2 red"> 购买VIP(¥{$index.price}) </a>
</p>
</div>
{/if}
{/member}
{else}
{$neirong}
{/if}
左手
{if $member.id && in_array($member.id, explode(',', $mfxy))} 登陆用户在关联里面 {/if}这个方法只能判断登陆用户在组里面,并不能判断免费看文章,需要改下看文章的判断方法{if $mfxy && $vip && $index.price > 0 } {if $uid == $member.id || $member.id && in_array($member.id, explode(',', $mfxy)) } {$neirong} {elseif dr_is_son_buy(MOD_DIR, $index.id)} {$neirong} {else} <div class="subscribe" style="text-align: center"> <div class="title"><i class="ico left_ico"></i>本章节是VIP章节,需要购买才能继续阅读<i class="ico right_ico"></i></div> <p> <a href="{dr_url('book/buy/index', ['id'=>$index.id])}" target="_blank" class="btn btn-circle2 red"> 购买VIP(¥{$index.price}) </a> </p> </div> {/if} {else} {$neirong} {/if}是这样写吗? 测试好像可以用,不知道是否严谨~~呵呵二开/定制/使用解答专家