联系官方销售客服

1835022288

028-61286886

POSCMS 版主:POSCMS负责人
如何把联动菜单的省份市区,写成下拉列表模式?
类型:POSCMS 更新时间:2019-06-10 23:12:08

<div class="search-list">

  <div class="fl search-tit">地区筛选</div>

  <ul class="fl search-uls">

    <li class="fl search-lis"><a href="{dr_search_url($params, 'diqu', NULL)}" class="{if !$params.diqu}on{/if}">不限</a></li>

    <li class="fl search-lis" style="color: #666666">

      <div class="province fl province1">

        <p class="box-sizing">

             <span class="fl province-span1">{if $params.diqu}{php $linkage = dr_linkage('address', $get.diqu);}{$linkage.name}{else}省/直辖市{/if}</span>

             <span class="icon-jiantouarrow483 iconfont fr font12"></span>

        </p>

        <ul class="province-list province-list1">

        {list action=linkage code=address pid=$get.diqu}

          <a href="javascript:;" onClick="javascript:location.href='{dr_search_url($params, 'diqu', $t.id)}'">

          <li class="data1">{$t.name}</li>

          </a>

        {/list}

        </ul>

      </div>

      &nbsp;省 </li>

    <li class="fl search-lis" style="color: #666666">

      <div class="province fl province2">

        <p class="box-sizing"> <span class="fl province-span2 get_city">请选择城市</span> <span class="icon-jiantouarrow483 iconfont fr font12"></span> </p>

        <ul class="province-list province-list2" id="city_list">

          {list action=linkage code=address pid=$get.diqu return=c1}

          {list action=linkage code=address pid=$c1.id return=c2}

          <a href="javascript:;" onClick="javascript:location.href='{dr_search_url($params, 'diqu', $c2.id)}'">

          <li class="data1">{$c2.name}</li>

          </a>

          {/list}

          {/list}

        </ul>

      </div>

      &nbsp;市 </li>

  </ul>

</div>