作者 anyv
1 个管道 的构建 通过 耗费 0 秒

首页搜索

... ... @@ -181,12 +181,9 @@ class IndexController extends WeChatBaseController
*/
public function search_salesman_goods(){
if($this -> request -> isPost()){
}else{
return $this -> fetch();
}
$data_salesman_goods = Db::name('goods') -> where("type =2 and book_name like %".$_POST['book_name']."%") -> select();
$this -> assign('data_salesman_goods',$data_salesman_goods);
return $this -> fetch();
}
... ...
... ... @@ -34,9 +34,9 @@
<div class="in_search">
<div class="in_search1">
<form action="">
<form action="{:url('Index/search_salesman_goods')}" method="post">
<img src="__TMPL__/public/assets/images/1.png" alt="">
<input type="text" placeholder="输入书籍名称">
<input type="text" name="book_name" placeholder="输入书籍名称">
</form>
</div>
<div class="in_search_no">搜索</div>
... ...