@@ -390,7 +390,6 @@ class mb_specialControl extends SystemControl
*/
public function goods_listOp() {
$model_goods = Model('goods');
-
$condition = array();
$condition['goods_name'] = array('like', '%' . $_REQUEST['keyword'] . '%');
$goods_list = $model_goods->getGoodsOnlineList($condition, 'goods_id,goods_name,goods_promotion_price,goods_image,goods_storage', 10);
@@ -1696,5 +1696,5 @@ td.trigger i:hover { color: #27A9E3;}
.mb-item-edit-content .search-goods-list .goods-price { color: #F30; text-align: left; width: 310px; float: right; clear: both;}
.mb-item-edit-content .search-goods-list a { background-color: #F9F9F9; padding: 4px 12px; border: solid 1px #CCC; border-radius: 4px; position: absolute; z-index: 1; bottom: 10px; right: 10px;}
.mb-item-edit-content .home7 .content img { max-width: 200px;max-height: 200px;}
-.mb-item-edit-content .home2 .content img { max-width: 200px;max-height: 200px;}
+.mb-item-edit-content .home2 .content img { max-width: 150px;width: 100%;}
.mb-item-edit-content .goods-list .content img { max-width: 200px;max-height: 200px;}
@@ -231,10 +231,12 @@
});
$('#btn_mb_special_goods_search').on('click', function () {
- var url = '<?php echo urlAdmin('mb_special', 'goods_list');?>';
+ var search_type=$('#search_type').val();
var keyword = $('#txt_goods_name').val();
+ var $mb_special_goods_list=$('#mb_special_goods_list');
+ var url = '<?php echo urlAdmin('mb_special', 'goods_list');?>';
if (keyword) {
- $('#mb_special_goods_list').load(url, {keyword: keyword});
+ $mb_special_goods_list.load(url, {keyword: keyword,search_type:search_type});
}
@@ -81,6 +81,15 @@
<div class="search-goods" style="position: absolute;left: 500px;top: 220px;">
<h3>选择商品添加</h3>
<h5>商品关键字:</h5>
+ <label>
+ 类型:
+ <select name="search_type" id="search_type">
+ <option value="keyword">关键字</option>
+ <option value="brand">品牌</option>
+ <option value="hot_id">功效</option>
+ <option value="goods_id">商品编号</option>
+ </select>
+ </label>
<input id="txt_goods_name" type="text" class="txt w200" name="">
<a id="btn_mb_special_goods_search" class="btn-search" href="javascript:;" style="vertical-align: top; margin-left: 5px;" title="搜索"></a>
<div id="mb_special_goods_list"></div>
@@ -92,6 +92,15 @@
<div class="search-goods">
@@ -101,6 +101,15 @@
@@ -90,6 +90,15 @@
@@ -103,6 +103,15 @@