分享
  • 收藏
  • 举报
    X
    请问大神们,黄页怎么才能只显示发布人发布的信息?帖内有代码!急!急!急!
    614
    7

    我的代码如下,目前不能按照MID显示发布者发布内容,只能全部调用出来。PS:我自建了商品模型2,现需要调用mid=2的UID发布的内容。

    红色部分都没起作用,请问原因。 已经尝试过:union="uid=$info.uid" union="ext_id=$idwhere="ext_id=$idwhere="uid=$info.uid" 均未起作用,另外mid写在模板上也没起作用。求解决方法,谢谢。该末班位于/index_style/default/xxx/content/pc_show.htm 是黄页下的内容模板

    {qb:hy name="hy_pcshow_shop001" type="shop" mid="2"  union="uid=$info.uid" order="id" by="asc"  rows="8" js="hy_pcshow_shop001"}


    <div class="product">


    <div class="img"><a href="{$rs.url}"><img src="{$rs.picurl}" onerror="this.src='__STATIC__/images/nopic.png'" width="240" height="180" title="{$rs.title}" /></a></div>


    <div class="info">


    <div class="w"><img src="{$rs.user_icon}" width="50" height="50" /></div>


    <div class="t">


    <div><a href="{:get_url('user',$rs['uid'])}" class="green">{$rs.username}</a></div>


    <div><span style="color:#999999;">价格:</span><span>¥ {$rs.price} 元</span></div>


    </div>


    </div>


    </div>


    {/qb:hy}


    6
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 7
    • 阿赖耶识 程序开发者 消费:24.43元 2019-07-15 10:55 10:556楼
      {qb:tag name="hy_pcshow_shop001" type="shop" mid="2"  where="uid=$info.uid" order="id" by="asc"  rows="8" js="hy_pcshow_shop001"}


      Baymax 消费:0元 2019-07-15 11:50
      替换过来了还是不行
      阿赖耶识 消费:24.43元 2019-07-15 12:13
      你在哪里用的,首页、列表页、内容页
      Baymax 消费:0元 2019-07-15 12:39
      内容页
      阿赖耶识 消费:24.43元 2019-07-15 13:31

      可以用的

      {qb:tag name="hy_pcshow_shop001" type="shop" mid="2" where="uid=$info.uid" order="id" by="asc" rows="6" js="hy_pcshow_shop001"}

      几个问题注意下,因为这个标签是本身内容页里面就存在的,但是因为修改了union为where这样用,并且添加了mid=2,也就是说,你对这个标签进行修改了,那你最好去后台清理下缓存,或者前台双击标签,编辑的时候,选择清空数据下


      第二因为shop本身只有模型1,你新建立了模型,发布商品的时候你看下是不是发布到模型2下了

    0 赏钱 赏礼回复
    • selon 程序开发者 消费:1403.01元 2019-07-15 12:16 12:166楼

      黄页调用商城内容?type=hy 还是shop?

      Baymax 消费:0元 2019-07-15 12:39
      都用过不起作用啊
    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648