style.js
3.05 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
$(
function () {
$(".rule-btn").click(
function () {
$("body").append("<div class='dia-bg'></div>");
$(".dia-c").show();
}
);
// $(".dia-c").click(
// function (){
// $(this).hide();
// $(".dia-bg").remove();
// }
// );
$(".dia-c .close-btn").live("click", function () {
$(this).parents(".dia-c").hide();
$(".dia-bg").remove();
});
$(".dia-c-2 .close-btn").live("click",function (){
$(this).parents(".dia-c-2").remove();
$(".dia-bg").remove();
});
$(".check-awa-btn").click(
function () {
$(".awa-list-c").toggle();
}
);
$(".close-list-btn").click(
function () {
$(this).parents(".awa-list-c").hide();
}
);
$(".awa-cover .close-btn").live("click", function () {
$(".dia-bg").remove();
$(".awa-cover").remove();
});
$(".dia-c .try-again").live("click", function () {
$(this).parents(".dia-c").remove();
$(".dia-bg").remove();
}
);
}
);
function awaCover(prize) {
var cHtml = '<div class="awa-cover">' +
'<div class="awa-cover-main">' +
'<p class="title-1">' + prize + '</p>' +
'<p class="title-2">现金券可至【我的-我的资产】查看</p>' +
'<img class="pic-1" src="images/coupon.gif" />' +
'<a>' +
'<img class="pic-2" src="images/awa-button.png" />' +
'</a>' +
'<img class="pic-3" src="images/go_word.png" />' +
'</div>' +
'<a class="close-btn">' +
'<img src="images/close-btn.png" />' +
'</a>' +
'</div>' +
'<div class="dia-bg"></div>'
return cHtml;
}
function addPrize(uid, boxid) {
var str;
$.ajax({
url: '/activity/brandDraw/addBrandActPrize?uid=' + uid + '&boxId=' + boxid,
type: "get",
contentType: "application/json",
dataType: 'json',
async:false, //为了简便,设置为同步操作
success: function (data) {
str=data;
}
});
return str ;
}
function awaBrand(pic) {
var cHtml = '<div class="dia-c-2" style="display:block;">' +
'<a class="close-btn">' +
'<img src="images/close-btn.png" />' +
'</a>' +
'<img class="try-again" src='+pic+' />' +
'</div>' +
'<div class="dia-bg"></div>'
return cHtml;
}
function noAwa() {
var cHtml = '<div class="dia-c-2" style="display:block;">' +
'<a class="close-btn">' +
'<img src="images/close-btn.png" />' +
'</a>' +
'<img class="try-again-2" src="images/coupon.gif" />' +
'</div>' +
'<div class="dia-bg"></div>'
return cHtml;
}
function opened(thisBox,imgurl){
$(".a-box-ul li:eq("+ thisBox +")").find("img").remove();
$(".a-box-ul li:eq("+ thisBox +")").append("<img src="+imgurl+" />");
}