...
|
...
|
@@ -720,28 +720,34 @@ function actionNav() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取三级导航的tip图标
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function actionTipPic() {
|
|
|
var $content_code = ''
|
|
|
var tipscode = {};
|
|
|
var $contentcode = '';
|
|
|
var serverApi = 'http://www.yohobuy.com/common/getbanner?content_code=';
|
|
|
var $img = '';
|
|
|
var $title = '';
|
|
|
var $link = '';
|
|
|
|
|
|
$(document).on('mouseenter','.sub-nav-item',function(){
|
|
|
$content_code = $(this).find('.showdetail').attr('data-code');
|
|
|
if($content_code){
|
|
|
$(document).on('mouseenter', '.sub-nav-item', function() {
|
|
|
$contentcode = $(this).find('.showdetail').attr('data-code');
|
|
|
if ($contentcode) {
|
|
|
if (!tipscode[$contentcode]) {
|
|
|
tipscode[$contentcode] = $contentcode;
|
|
|
$img = $(this).find('.showdetail').find('img');
|
|
|
$title = $(this).find('.showdetail').find('.title');
|
|
|
$link = $(this).find('.showdetail').find('a');
|
|
|
$.get(serverApi + $content_code+'&width=337&height=250&client_type=web', function(rsdata) {
|
|
|
$img.attr('src',rsdata.data.src);
|
|
|
$link.attr('href',rsdata.data.url);
|
|
|
$.get(serverApi + $contentcode + '&width=337&height=250&client_type=web', function(rsdata) {
|
|
|
$img.attr('src', rsdata.data.src);
|
|
|
$link.attr('href', rsdata.data.url);
|
|
|
$title.text(rsdata.data.title);
|
|
|
}, 'jsonp');
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -1348,7 +1354,7 @@ function actionLoginInfo() { |
|
|
*/
|
|
|
function init() {
|
|
|
actionNav(); //处理导航
|
|
|
actionTipPic();//鼠标移入后查询
|
|
|
actionTipPic(); //鼠标移入后查询
|
|
|
actionExeTemplate(); //处理模板
|
|
|
actionInitCookie(); //初始化cookie
|
|
|
actionExeCookieMap(); //格式化cookie
|
...
|
...
|
|