| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 | <{include file="header.html"}><{include file="nav.html"}><!--公用标题居中显示--><{include file="common_header.html"}><{include file="events_top.html"}><{include file="events_infos.html"}><!--遮罩层--><div class="a_cover"></div><!--====================提示层样式5种,分别选择使用 begin===========================--><!--通用文字提示层--><div class="v_tips_box" id="vtips_1">	<div class="v_close_btn"></div>    <p>{{message}}</p>    </div><!--通用文字提示层+按钮--><div class="v_tips_box v_tips_box2" id="vtips_2">	<div class="v_close_btn"></div>	<p>{{message}}</p>    <p><a href="<{$listUrl}>" class="submit_btn_style">返回列表</a></p></div><!--活动结束提示+按钮--><div class="v_tips_box v_tips_box2" id="vtips_3">	<div class="v_close_btn"></div>	<p>活动已结束!</p>    <p><a href="<{$listUrl}>" class="submit_btn_style">其它活动</a></p></div><!--领取奖品提示层+按钮--><div class="v_tips_box v_tips_box3" id="vtips_4">	<div class="v_close_btn close_btn_href" url="<{$giftsUrl}>"></div>    <div class="pro_list_box pro_list_box2 pro_list_box3">        <dl>            <dt>                <img src="<{$web_cfg.cdn}>/public/static/img/item_img.jpg">                <p class="img_cover" style="background-image:url({{img_url}});"></p>            </dt>            <dd>                <p class="pro_name">{{prize_name}}</p>            </dd>        </dl>    </div>	<p class="v_gray">请点击领取奖品,并填写配送地址</p>    <p><a class="submit_btn_style" href="<{$web_cfg.domain}>/?c=Express&lottery_data_id={{lottery_data_id}}">领取奖品</a></p></div><!--查看奖品提示层+按钮--><div class="v_tips_box v_tips_box3" id="vtips_5">	<div class="v_close_btn close_btn_href"  url="<{$giftsUrl}>"></div>    <div class="pro_list_box tips_list_box pro_list_box3">        <dl>            <dt><img src="{{img_url}}"></dt>            <dd>                <p class="pro_name">{{prize_name}}</p>                <p class="pro_num">{{virtual_data}}</p>            </dd>        </dl>    </div>    <p><a class="submit_btn_style" href="<{$giftsUrl}>">查看奖品</a></p></div><!--====================提示层样式5种,分别选择使用 end===========================--><!-- 显示 --><div class="v_tips_box v_tips_box3" id="ks-tips"></div><script>var goUrl = '';function go_page(){	location.href = goUrl;}function showErrorMsg(data_msg){	$('.v_close_btn').show();	$('#error_msg').html(data_msg);	$('#error_tips_box').fadeIn(200);	$('.a_cover').fadeIn(200);}function showErrorMsgGoPage(data_msg){	$('.v_close_btn').show();	$('#error_msg').html(data_msg);	$('#error_tips_box').fadeIn();	$('.a_cover').fadeIn();	setInterval("go_page();",seconds+100);}$("#award_btn").on('click', function(){	var time = 2000;//设置抽奖loading时间	$("#luck_show").hide();	$("#luck_loading").show()/*.delay(time).fadeOut(0)*/;	//$(".loading_img").css({height:"0px"}).animate({height:"70px"},time);});//通用弹出提示层function v_tips_show(){	$(".v_tips_box").fadeIn(200);	$(".a_cover").fadeIn(200);}//点击关闭提示层---通用$(".v_close_btn").live('click', function() {	$(".v_tips_box").fadeOut(.2);	$(".a_cover").fadeOut(.2);});// 点击关闭按钮$(".close_btn_href").live('click', function() {	var url =  $(this).attr('url');	location.href = url;});KISSY.use('node, io, xtemplate, anim', function (S, Node, IO, XTemplate, Anim) {	var $ = S.all;		//视频自适应	var screenWidth = $(window).width();	var baseWidth = 510;	var video_scale = screenWidth / baseWidth;	$(".video_iframe").each(function () {		var new_width = $(this).width() * video_scale;		$(this).width(new_width - 20);		var new_height = $(this).height() * video_scale;		$(this).height(new_height - 20);	});		var drawResult = {};	var drawAnim = new Anim(".loading_img", {'height':'70px'}, {		duration: 2,		complete: function () {			var id = setInterval(function () {				if (!S.isUndefined(drawResult.ok)) {					run_result_anim(drawResult);					clearInterval(id);				}			}, 100);		}	});		//点击抽奖按钮切换抽奖效果	$("#award_btn").on('click', function () {		drawAnim.run();		new IO({			type: "get"			, url: '<{$web_cfg.domain}>/?c=EventsTurntable&a=Rotation'			, data: {events_id: '<{$turntableData.events.id}>'}			, success: function (data) {				if (data.ok) {					drawResult = data;					return false;				} else {					if(data.msg.url){						loadLogin();						//goUrl = '<{$loginUrl}>';						//showErrorMsgGoPage('本活动需登录后才可以参与');						return;					} else {						$("#luck_loading").hide();						$("#luck_result").show();					}				}			}			, error: function (NULL, textStatus) {				alert("请求服务器失败,原因:"+textStatus);			}			, dataType: "json"		});	});		function run_result_anim(data) {		if (data.ok) { //ok			if(data.msg == 'NoPrize'){				$("#luck_loading").hide();				$("#luck_result").show();			} else {				if(data.msg.express == 1){//领奖					var tpl = $("#vtips_4").html();				} else {//查看奖品					var tpl = $("#vtips_5").html();				}								var render = new XTemplate(tpl).render(data.msg);				$("#ks-tips").html(render).fadeIn(.2);				$(".a_cover").fadeIn(.2);			}					} else {			if(data.msg == 'NoPrize'){				$("#luck_loading").hide();				$("#luck_result").show();			} else {				var tpl = $("#vtips_2").html();				var render = new XTemplate(tpl).render({'message':data.msg});				$("#ks-tips").html(render).fadeIn(.2);				$(".a_cover").fadeIn(.2);				$(".v_close_btn").on('click', function() {					$(".v_tips_box").hide();					$(".a_cover").hide();				});			}		}	}});//有产品列表时添加整体body背景色$(body).addClass("bg_white");</script><{include file="bottom.html"}>
 |