Authored by chaogeng

Merge branch 'dev_6.0逛优化' into test6.0

... ... @@ -40,7 +40,7 @@
<div class="form-group">
<label for="advertCode" class="col-sm-2 control-label">广告码:</label>
<div class="col-sm-10">
<input type="text" value="[[advertCode]]" name="content" id="advertCode" placeholder="广告码" required="required" class="form-control">
<input type="text" value="[[advertCode||'']]" name="content" id="advertCode" placeholder="广告码" class="form-control">
</div>
</div>
... ...
... ... @@ -52,7 +52,7 @@
</select>
</div>
<div class="col-sm-2">
<select class="form-control" id="minSortId">
<select class="form-control" id="minSortId" required>
<option value="[[minSortId||'-1']]">[[minSortName||'请选择二级分类']]</option>
</select>
</div>
... ... @@ -556,6 +556,7 @@
</div>
<div class="col-sm-5">
<a id="search" class="go-search btn btn-primary">搜索商品</a>
<a id="searchLimit" class="go-search btn btn-primary">搜限购商品</a>
<a id="searchBLK" class="go-search btn btn-primary">BLK商品</a>
<a id="searchGlobal" class="go-search btn btn-primary">搜全球购</a>
</div>
... ... @@ -608,7 +609,7 @@
</div>
</div>
<div class="gird" id="goodsgird" appType="0" containGlobal="N" is_global="N">
<div class="gird" id="goodsgird" appType="0" containGlobal="N" is_global="N" isLimitBuy="N">
</div>
</div>
</script>
... ...
... ... @@ -146,7 +146,12 @@ function articleCategoryOP(prefix, url, item) {
$('#maxsord').show();
new common.dropDown({
el: "#parentId",
ajax: 'guangGetSortList'
ajax: 'guangGetSortList',
params: function () {
return {
parentId: 0
};
}
});
} else {
$('#maxsord').hide();
... ...
... ... @@ -803,22 +803,41 @@ var goodsgird = new common.grid({
var appType = $("#goodsgird").attr("appType");
var containGlobal = $("#goodsgird").attr("containGlobal");
var isGlobal = $("#goodsgird").attr("isGlobal");
return {
status: 1,
sales: "Y",
stocknumber: "1",
attribute_not: "2",
query: common.util.__input('skns'),
price: price,
color: Bll2.getIds(Bll.sorts[0].list),
style: Bll2.getIds(Bll.sorts[1].list),//风格先不管
msort: Bll2.getIds(Bll.sorts[2].list),
brand: Bll2.getIds(Bll.sorts[3].list),
gender: Bll2.getIds(Bll.sorts[4].list),
app_type:appType,
contain_global:containGlobal,
is_global:isGlobal
};
var isLimitBuy = $("#goodsgird").attr("isLimitBuy");
if(isLimitBuy == 'N'){
return {
status: 1,
sales: "Y",
stocknumber: "1",
attribute_not: "2",
query: common.util.__input('skns'),
price: price,
color: Bll2.getIds(Bll.sorts[0].list),
style: Bll2.getIds(Bll.sorts[1].list),//风格先不管
msort: Bll2.getIds(Bll.sorts[2].list),
brand: Bll2.getIds(Bll.sorts[3].list),
gender: Bll2.getIds(Bll.sorts[4].list),
app_type:appType,
contain_global:containGlobal,
is_global:isGlobal
};
}else {
return {
isLimitbuy: "Y",
attribute_not: "2",
query: common.util.__input('skns'),
price: price,
color: Bll2.getIds(Bll.sorts[0].list),
style: Bll2.getIds(Bll.sorts[1].list),//风格先不管
msort: Bll2.getIds(Bll.sorts[2].list),
brand: Bll2.getIds(Bll.sorts[3].list),
gender: Bll2.getIds(Bll.sorts[4].list),
/*app_type:appType,*/
contain_global:containGlobal,
is_global:isGlobal
};
}
},
columns: [
{
... ... @@ -1035,6 +1054,23 @@ $(document).on("click", "#search", function () {
$("#goodsgird").attr("appType","0");
$("#goodsgird").attr("containGlobal","N");
$("#goodsgird").attr("isGlobal","N");
$("#goodsgird").attr("isLimitBuy","N");
if (goodsgird.grid) {
goodsgird.reload(1);
} else {
goodsgird.init('/yohosearch/search');
}
});
/**
* 手动输入中“搜限购商品”按钮
*/
$(document).on("click", "#searchLimit", function () {
$(".goods-list").show();
$("#goodsgird").attr("appType","0");
$("#goodsgird").attr("containGlobal","N");
$("#goodsgird").attr("isGlobal","N");
$("#goodsgird").attr("isLimitBuy","Y");
if (goodsgird.grid) {
goodsgird.reload(1);
} else {
... ... @@ -1050,6 +1086,7 @@ $(document).on("click", "#searchBLK", function () {
$("#goodsgird").attr("appType","1");
$("#goodsgird").attr("containGlobal","N");
$("#goodsgird").attr("isGlobal","N");
$("#goodsgird").attr("isLimitBuy","N");
if (goodsgird.grid) {
goodsgird.reload(1);
} else {
... ... @@ -1065,6 +1102,7 @@ $(document).on("click", "#searchGlobal", function () {
$("#goodsgird").attr("appType","");
$("#goodsgird").attr("containGlobal","Y");
$("#goodsgird").attr("isGlobal","Y");
$("#goodsgird").attr("isLimitBuy","N");
if (goodsgird.grid) {
goodsgird.reload(1);
} else {
... ...
... ... @@ -37,7 +37,12 @@ new common.dropDown({
new common.dropDown({
el: "#maxSortId",
ajax: 'guangGetSortList'
ajax: 'guangGetSortList',
params: function () {
return {
parentId: 0
};
}
});
new common.dropDown({
... ...