聯(lián)系官方銷售客服
1835022288
028-61286886
http://masbank.ahgqzn.cn/index.php?s=news&c=search&catid=6&csxz=hexian&keyword=%E5%AE%A3%E4%BC%A0
請問為什么聯(lián)動搜索功能 加入了聯(lián)動菜單,選擇聯(lián)動菜單的選項數(shù)據(jù)并未產(chǎn)生變化。
<!--按聯(lián)動菜單搜索--> <div class="form-group row"> <label class="col-md-12">區(qū)縣</label> <div class="col-md-10"> <?php $tp = dr_linkage('masqh', $params.csxz); if ($tp.pid) { $tp = dr_linkage('masqh', $tp.pid); } $tpid = $tp.id; $pids = explode(',', $tp.childids); ?> <label><a class="label {if !$params.csxz}label-success{else}label-default{/if}" target="_blank" href="{Router::search_url($params, 'csxz', NULL)}">不限</a></label> <!--調(diào)用聯(lián)動菜單address,pid為動態(tài)獲取的地區(qū)id--> {linkage code=masqh pid=0} <label><a class="label {if in_array($t.ii, $pids)}label-success{else}label-default{/if}" target="_blank" href="{Router::search_url($params, 'csxz', $t.id)}">{$t.name}</a></label> {/linkage} </div> </div> {if $tp.child} <div class="form-group row"> <label class="col-md-12">社區(qū)村鎮(zhèn)</label> <div class="col-md-10"> <label><a class="label {if $tpid == dr_linkage('masqh', $params.csxz, 0, 'id')}label-success{else}label-default{/if}" target="_blank" href="{Router::search_url($params, 'csxz', $tpid)}">不限</a></label> <!--調(diào)用聯(lián)動菜單address,pid為動態(tài)獲取的地區(qū)id--> {linkage code=masqh pid=$tpid} <label><a class="label {if $t.id==$params.csxz}label-success{else}label-default{/if}" target="_blank" href="{Router::search_url($params, 'csxz', $t.id)}">{$t.name}</a></label> {/linkage} </div> </div> {/if}
search標(biāo)簽后面加一個debug看看數(shù)據(jù)
回復(fù)@迅睿框架技術(shù)-田聰明 :
這個不是search的debug數(shù)據(jù),需要放置在search標(biāo)簽之后
標(biāo)簽解析:{list action=search module=MOD_DIR id=a656386a9929621d46d48213a3c1a2f5 total=32 order= catid=6 page=1 pagesize=10 urlrule=/index.php?s=news&c=search&catid=6&csxz=hexian&keyword=%E5%AE%A3%E4%BC%A0&page=%7Bpage%7D}
使用范圍:search標(biāo)簽只能用于搜索頁面,當(dāng)前頁面不是搜索頁面,可能會無效
搜索解析:
查詢解析: SELECT * FROM `dr_1_news` WHERE (`dr_1_news`.`id` IN(SELECT `dr_1_news`.`id` FROM `dr_1_news` WHERE `dr_1_news`.`status` = 9 AND `dr_1_news`.`catid`=6 AND (`dr_1_news`.`title` LIKE "%宣傳%" OR `dr_1_news`.`quyu` LIKE "%宣傳%") ORDER BY NULL )) AND `dr_1_news`.`catid` = 6 ORDER BY `dr_1_news`.`updatetime` DESC LIMIT 0,10
開發(fā)模式:已關(guān)閉
數(shù)據(jù)緩存:未設(shè)置
總記錄數(shù):32
分頁功能:已開啟
當(dāng)前頁碼:1
總頁數(shù)量:4
每頁數(shù)量:10
分頁地址:/index.php?s=news&c=search&catid=6&csxz=hexian&keyword=%E5%AE%A3%E4%BC%A0&page=頁碼
可用字段:id、catid、title、thumb、keywords、description、hits、uid、author、status、url、link_id、tableid、inputip、inputtime、updatetime、displayorder、quyu、fujian、_inputtime、_updatetime、_fujian
說明這個字段csxz不是模塊主表字段,csxz是什么字段??
回復(fù)@迅??蚣芗夹g(shù)-田聰明 :整個是按照聯(lián)動菜單的寫法寫的二級區(qū)劃;
搜索頁面:
請正面回答這個問題:csxz是什么字段??
csxz如果不是模塊主表就沒辦法搜索了,樓主肯定把字段名稱搞錯了
回復(fù)@迅??蚣芗夹g(shù)-田聰明 : $tp = dr_linkage('masqh', $params.csxz);
masqh 是模塊主表字段
$params.csxz中的cszx需要改成模塊主表字段,也就隨你說的masqh才行
你完全在胡亂寫呢
把csxz全部換成masqh,字段高錯了而已 ?? ??
回復(fù)@迅??蚣芗夹g(shù)-田聰明 :抱歉按照demo寫的 沒注意
回復(fù)@haoming04 :大佬 我試試