...
|
...
|
@@ -12,24 +12,38 @@ function getRanToken() { |
|
|
return ranToken;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 增加单条记录
|
|
|
*/
|
|
|
function addHistory(brandId) {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/category/brand/addBrandSearch',
|
|
|
data: 'brandId=' + brandId,
|
|
|
success: function(data) {
|
|
|
},
|
|
|
error: function() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//绑定提交前的存local操作
|
|
|
function bindWirteLocal($brandList) {
|
|
|
$brandList.on('click','p', function(e) {
|
|
|
|
|
|
$brandList.on('click', 'p', function(e) {
|
|
|
var a,brandName,brandId,url;
|
|
|
var query = brandName + url,
|
|
|
historys;
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
a = $(this).find('a');
|
|
|
|
|
|
brandName = a.attr("brandName");
|
|
|
brandName = a.attr('brandName');
|
|
|
|
|
|
brandId = a.attr("brandId");
|
|
|
brandId = a.attr('brandId');
|
|
|
|
|
|
url = a.attr('href');
|
|
|
|
|
|
url = a.attr("href");
|
|
|
|
|
|
var query = brandName+url,
|
|
|
historys;
|
|
|
|
|
|
if (localStorage) {
|
|
|
historys = localStorage.getItem('historys-brand');
|
...
|
...
|
@@ -50,7 +64,7 @@ function bindWirteLocal($brandList) { |
|
|
localStorage.setItem('historys-brand', historys);
|
|
|
}
|
|
|
|
|
|
if ($('.net-search').length > 0){
|
|
|
if ($('.net-search').length > 0) {
|
|
|
addHistory(brandId);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -58,23 +72,6 @@ function bindWirteLocal($brandList) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 增加单条记录
|
|
|
*/
|
|
|
function addHistory(brandId)
|
|
|
{
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/category/brand/addBrandSearch',
|
|
|
data: 'brandId=' + brandId,
|
|
|
success: function (data) {
|
|
|
|
|
|
},
|
|
|
error: function () {
|
|
|
//showTip('网络断开连接啦~');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
exports.getRanToken = getRanToken;
|
|
|
|
...
|
...
|
|