ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 大佬們我用的自帶的代碼發現搜索的時候有問題會帶想問一下怎么去 1 0
123(不懂技術) SVIP會員 OEM版權 2020-07-01 12:23:01 私信
迅睿CMS版本:4.3.8 #搜索 #欄目

大佬們 我用的search自帶的代碼 發現搜索的時候url有問題
image
url會帶catid-6- 想問一下怎么去掉這個

用內容搜索框的話是可以url不帶欄目的

<div class="input-group">
<input type="text" class="form-control" placeholder="搜索內容..." name="keyword" value='{$keyword}' id='search_keyword' onkeypress="if(event.keyCode==13) {dr_module_search('search_keyword');return false;}">
<div class="input-group-btn">
<button class="btn default" type="button" onclick="dr_module_search('search_keyword')"> <i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
<script>
     // 這段js是用來執行搜索的
     function dr_module_search(name) {
         var url="{Router::search_url($params, 'keyword', 'dayruicom')}";
         var value = $("#"+name).val();
         if (value) {
             location.href=url.replace('dayruicom', value);
         } else {
             $("#"+name).focus()
             dr_tips(0, "輸入關鍵字");
         }
         return false;
     }
 </script>

內容搜索框 用這個可以url不帶欄目 但是無法實現輸入為空則顯示輸入關鍵詞

<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="news">
<input type="hidden" name="c" value="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="搜索內容..." name="keyword">
<div class="input-group-btn">
<button class="btn default" type="submit"> <i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>

想實現的目標 用搜索 如果沒有輸入搜索內容則顯示輸入關鍵詞(自帶模塊已實現) 如果搜索的話url不帶欄目名稱(內容搜索框已經實現) 我想結合一下這兩種 請問應該怎么做

解決方案
  • {php unset($params['catid']);}
     var url="{Router::search_url($params, 'keyword', 'dayruicom')}";

    加一句就可以去掉

    滿意答案
    短信幣+1
  • 2020-07-01 12:31:27
    Chrome 8分鐘26秒 0
    迅睿框架創始人:多謝大哥!!!!