index.phtml
3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<script>
__custom = {'yopid':'index'};
</script>
<script type="text/javascript">
//读取cookie中的性别
$(document).ready(function(){
var gender = $.cookie('_Gender');
if(typeof gender == 'undefined' || gender == '' || gender == null){
$.get('/index/guide', function(data){
var newMask = document.createElement("div");
newMask.id = 'cover';
newMask.innerHTML=data;
document.body.appendChild(newMask);
var p_h = $('#cover').height();
var h = (p_h-400)/2;
$('#cover .guide-box').css('top',h+'px');
$('#cover').bind('click', function(event){
$.setcookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
closeCover();
});
$('#cover .guide-box .close').bind('click', function(event){
getSource('弹窗','CLOSE','homepage_man');
$.setcookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
analy('guide_close');
closeCover();
});
$('.boys img').bind('click', function(event){
getSource('弹窗','BOYS','homepage_man');
$.setcookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
analy( 'guide_boys');
closeCover();
});
$('.girls img').bind('click', function(event){
getSource('弹窗','GIRLS','homepage_woman');
$.setcookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});
analy( 'guide_girls');
});
$('#cover .guide-box .go').bind('click', function(event){
if($(this).hasClass('goboys')){
getSource('弹窗','BOYS','homepage_man');
$.setcookie('_Gender','1,3',{path : '/',domain : '.yohobuy.com',expires : 90});
analy('guide_boys');
}else{
getSource('弹窗','GIRLS','homepage_woman');
$.setcookie('_Gender','2,3',{path : '/',domain : '.yohobuy.com',expires : 90});
analy('guide_girls');
}
closeCover();
});
//防止冒泡事件
$('#cover .guide-box').bind('click', function(event){
event.stopPropagation();
});
});
}
function closeCover(){
var cover = $('#cover');
cover.remove();
}
});
function analy(click_name){
var _analysis = new QAnalysis;
_analysis.dataCollect({
'click_homeguide_name': click_name
});
}
</script>
<div class="wrapper screen wrapper-index2">
<?php
$info = QINOperations_Models_Plugin_Content_Client::getContentList(1, 1);
$num = 0;
foreach ($info as $v){
$floor = $v;
$floor['plugin_content'] = json_decode($v['plugin_content'], true);
$floor['gender'] = '1,3';
$floor['floor'] = $num;
print QLib_Sidebar::show($floor['plugin_file_name'], $floor);
$num++;
}
?>
</div>
<?php print QLib_Sidebar::show('indexFoot', array('resutl' => 1));?>
<script type="text/javascript">
$.imageHover();
</script>
<div id="tjnode">
</div>
<script type="text/javascript">
$(document).ready(function(){
var tj_uid = $.uid('_UID');
if(tj_uid == 0){
tj_uid ="";
}
var str = '<script type="text/javascript" src="http://static.criteo.net/js/ld/ld.js" async="true"><\/script>';
str += '<script type="text/javascript">';
str +='window.criteo_q = window.criteo_q || [];window.criteo_q.push({ event: "setAccount", account: 16184 },{ event: "setCustomerId", id: "'+tj_uid+'"},{ event: "setSiteType", type: "d" },{ event: "viewHome" });';
str +='<\/script>';
$('#tjnode').html(str);
});
</script>