|
@@ -259,7 +259,8 @@
|
|
|
colors.push({
|
|
|
"id": colors.length + 1,
|
|
|
"typeId": this.typeId,
|
|
|
- "label": this.typeName
|
|
|
+ "label": this.typeName,
|
|
|
+ "url":"1"
|
|
|
});
|
|
|
$.each(this.childTypeList, function() {
|
|
|
|
|
@@ -271,7 +272,8 @@
|
|
|
"id": colors.length + 1,
|
|
|
"typeId": this.typeId,
|
|
|
"label": this.childTypeName,
|
|
|
- "childTypeId": this.childTypeId
|
|
|
+ "childTypeId": this.childTypeId,
|
|
|
+ "url":"1"
|
|
|
});
|
|
|
|
|
|
|
|
@@ -334,16 +336,18 @@
|
|
|
$(".icon-caidan").hide();
|
|
|
$('.my-btn-cancel').show();
|
|
|
if($(this).val().length > 0) {
|
|
|
- $('#search-hot').hide();
|
|
|
+ $('#search-hot').hide(500);
|
|
|
$(".autocompleter-list").css("height", $(document).height())
|
|
|
} else {
|
|
|
$("#search-hot").css("height",$(document.body).height()).show();
|
|
|
+ $("body").css("overflow","hidden");
|
|
|
}
|
|
|
});
|
|
|
//搜索框失去焦点事件
|
|
|
$('#search').on('blur', function(e) {
|
|
|
setTimeout(function(){
|
|
|
$('#search-hot,.my-btn-cancel').hide();
|
|
|
+ $("body").css("overflow","auto");
|
|
|
$(".icon-caidan").show();
|
|
|
},700);
|
|
|
|
|
@@ -353,6 +357,7 @@
|
|
|
$('#search').val($(this).text());
|
|
|
console.log($(this).text())
|
|
|
$('#search-hot').hide();
|
|
|
+ $("body").css("overflow","auto");
|
|
|
var parameter = {};
|
|
|
parameter["id"] = $(this).attr("name");
|
|
|
parameter["label"] = $(this).text();
|
|
@@ -362,17 +367,6 @@
|
|
|
}
|
|
|
search(parameter);
|
|
|
});
|
|
|
- //点击历史记录跳转
|
|
|
-// $(document).on('tap', '#history button', function() {
|
|
|
-// var parameter = {};
|
|
|
-// parameter["id"] = $(this).attr("name");
|
|
|
-// parameter["label"] = $(this).text();
|
|
|
-// parameter["typeId"] = $(this).attr("typeid");
|
|
|
-// if(typeof($(this).attr("childtypeid")) != "undefined") {
|
|
|
-// parameter["childTypeId"] = $(this).attr("childtypeid");
|
|
|
-// }
|
|
|
-// search(parameter);
|
|
|
-// });
|
|
|
//搜索框本地缓存
|
|
|
function search(selected) {
|
|
|
if(!window.localStorage) {
|
|
@@ -401,7 +395,7 @@
|
|
|
//json格式化插入
|
|
|
localStorage.setItem('search_histoty', JSON.stringify(obj));
|
|
|
sessionStorage.setItem('search_data', JSON.stringify(searchobj));
|
|
|
- console.log(obj)
|
|
|
+ console.log("999999999999")
|
|
|
mui.openWindow({
|
|
|
url: 'pro-list.html?productId=' + selected.typeId
|
|
|
});
|
|
@@ -414,6 +408,7 @@
|
|
|
$(".autocompleter-list").css("height", $(document).height());
|
|
|
} else {
|
|
|
$('#search-hot').show();
|
|
|
+ $("body").css("overflow","hidden");
|
|
|
$(".autocompleter-list").css("height", "auto");
|
|
|
}
|
|
|
});
|
|
@@ -424,6 +419,7 @@
|
|
|
$(document).on('tap', '.my-btn-cancel', function() {
|
|
|
$(this).hide();
|
|
|
$('#search-hot').hide();
|
|
|
+ $("body").css("overflow","auto");
|
|
|
$('#search').autocompleter("close");
|
|
|
$(".autocompleter-list").empty().css("height", "auto");
|
|
|
$('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
|