| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 | 
							- <!DOCTYPE html>
 
- <html>
 
- <head>
 
- <title></title>
 
- <!--#include virtual="/h5v2/htm2/head.htm" -->
 
- <style type="text/css">
 
- body{
 
- 	background-image: url(img/awardPopup.jpg);
 
- }
 
- </style>
 
- </head>
 
- <body>
 
- <div id="dataListDiv"></div>
 
- <div id="myPhone" style="position:absolute;left:671px;top:395px;width:120px;height:30px;line-height:30px;text-align:center;font-size:18px;color:red;"></div>
 
- <div id="buttonDiv"></div>
 
- <!--#include virtual="/h5v2/htm2/foot.htm" -->
 
- <!--#include virtual="activity_cfg.htm" -->
 
- <script type="text/javascript">
 
-     // 中奖查询展示
 
-     function prizelog(fn) {
 
-         ajax({
 
-             url: webUrl + "index.php?m=Home&c=Activityv2&a=prizelog",
 
-             data: {
 
-                 uid: uid,
 
-                 act_id: act_id,
 
-                 is_vip: dudu_is_vip + child_is_vip
 
-             },
 
-             success: function (res) {
 
-                 if (res.code == 0) {
 
-                     var listHTML = '';
 
-                     listHTML +='<div style="position:absolute; left:422px;top:260px; font-size:16px;">';
 
-                         listHTML +='<marquee width="435" height="100" direction="up" behavior="scroll" scrolldelay="100">';
 
-                             listHTML +='<table width="435px" border="0" style="color:#000000">';
 
-                             for(var i = 0; i < res.data.length; i++){
 
-                                 listHTML +='<tr height="50">';
 
-                                     listHTML +='<td width="150" align="center">';
 
-                                     listHTML +=res.data[i].user_phone;
 
-                                     listHTML +='</td>';
 
-                                     listHTML +='<td width="150" align="center">';
 
-                                     listHTML +=res.data[i].prize_name;
 
-                                     listHTML +='</td>';
 
-                                     listHTML +='<td align="center">';
 
-                                     listHTML +=res.data[i].created_at;
 
-                                     listHTML +='</td>';
 
-                                 listHTML +='</tr>';
 
-                             }
 
-                             listHTML+='</table>';
 
-                         listHTML+='</marquee>';
 
-                     listHTML+='</div>';
 
-                     G('dataListDiv').innerHTML = listHTML;
 
-                 }
 
-                 fn && fn(res);
 
-             }
 
-         })
 
-     }
 
-     // 用户获奖记录
 
-     function userPrizelog(fn) {
 
-         ajax({
 
-             url: webUrl + "index.php?m=Home&c=Activityv2&a=userPrizelog",
 
-             data: {
 
-                 uid: uid,
 
-                 act_id: act_id,
 
-                 is_vip: dudu_is_vip + child_is_vip
 
-             },
 
-             success: function (res) {
 
-                 if (res.code == 0) {
 
-                     dataJson = res.data;
 
-                     if(res.data.my_prizes){
 
-                         prizeCount = res.data.my_prizes.length;
 
-                     }
 
-                     if (res.data.user_phone) {
 
-                         G('myPhone').innerHTML = res.data.user_phone.user_phone;
 
-                     }
 
-                     if(res.data.my_prizes[0] && res.data.user_phone.phone_status !=1){
 
-                         prize = res.data.my_prizes[0];
 
-                         phoneFlag = 2;
 
-                     }else if(res.data.my_prizes[0] && res.data.user_phone.phone_status ==1){
 
-                         phoneFlag = 1;
 
-                     }
 
-                 }
 
-                 fn && fn(res);
 
-             }
 
-         })
 
-     }
 
-     var linkImage = CONFIG.SPACER;//透明图片
 
-     var buttons = [];//按钮数组
 
-     var prize;//奖品信息
 
-     var phoneFlag = 0; //0表示未中奖,1表示中奖留了号码,2表示中奖没留号码
 
-     var prizeImg = '';//奖品图片
 
-     var prizeCount = 0;
 
-     var dataJson = [];
 
-     var act_id = ACTIVITY_CFG.ACT_ID, act_code = ACTIVITY_CFG.ACT_CODE;//活动id及code
 
-     var is_vips = PageH5.cookie.get('activity_is_vip','0,0');
 
-     var uid = PageH5.cookie.get('activity_userid'),
 
-         dudu_is_vip = parseInt(is_vips.split(',')[0]),
 
-         child_is_vip = parseInt(is_vips.split(',')[1]);
 
- 	function init(){
 
-         
 
- 		var html = '';
 
- 			html+='<div style="position:absolute;left:421px;top:613px;"><img id="btn0" src="'+linkImage+'"/></div>';
 
- 			html+='<div style="position:absolute;left:711px;top:613px;"><img id="btn1" src="'+linkImage+'"/></div>';
 
-         
 
-         if(prizeCount>0){
 
-             for(var i = 0 ; i < prizeCount ; i++ ){
 
-                 html+='<div style="position:absolute;left:458px;top:'+(401+i*27)+'px;"><img src="img/prize_list_l.png"/></div>';
 
-                 html+='<div style="position:absolute;left:458px;top:'+(401+i*27)+'px;width:181px;height:21px;line-height:21px;text-align:center;font-size:18px;color:red;overflow:hidden;">'+dataJson.my_prizes[i].prize_name+'</div>';
 
-                 html+='<div style="position:absolute;left:455px;top:'+(398+i*27)+'px;"><img id="prizeList'+i+'" src="'+linkImage+'"/></div>';
 
-                 var obj2 = {
 
-                     id: 'prizeList'+i, action: goPrizeList, index: i,
 
-                     left: '',
 
-                     right: '',
 
-                     up: ['prizeList'+(i-1)],
 
-                     down: ['prizeList'+(i+1),'btn0'],
 
-                     prize_name: dataJson.my_prizes[i].prize_name,
 
-                     prize_object: dataJson.my_prizes[i].prize_object,
 
-                     focusImage:'img/prize_list_f.png'
 
-                 };
 
-                 buttons.push(obj2);
 
-             }
 
-         }
 
-         G('buttonDiv').innerHTML = html;
 
-         
 
- 		var focusImages = ['getPrize_focus.png','back_focus.png'];
 
- 		for(var i = 0 ; i < 2 ; i++ ){
 
- 			var obj = {
 
- 				id: 'btn'+i, action: goAction, index: i,
 
- 				left: 'btn'+(i-1),
 
- 				right: 'btn'+(i+1),
 
- 				up: 'prizeList'+(prizeCount-1),
 
- 				down: '',
 
- 				focusImage:'img/'+focusImages[i]
 
- 			};
 
- 			buttons.push(obj);
 
- 		}
 
- 		PageH5.btn.init([PageH5.getParam('f'), 'btn0'], buttons, '', true);
 
- 	}
 
-     function goPrizeList(button){
 
-         if(button.prize_object == 'vitual'){
 
-             if(button.prize_name.indexOf('少儿会员')!=-1){
 
-                 location.href =  url_prefix + 'selyg.html?sourceflag=winnerInfo&f='+button.id;
 
-             }else{
 
-                 location.href =  url_prefix + 'klg.html?sourceflag=winnerInfo&f='+button.id;
 
-             }
 
-         }else if(button.prize_object == 'real'){
 
-             PageH5.tip('实物奖:'+button.prize_name);
 
-         }
 
-     }
 
- 	function goAction(button){
 
-         if(button.index==0){
 
-             if(phoneFlag==1){
 
-                 PageH5.tip('您已提交过手机号码!');
 
-             }else if(phoneFlag==2){
 
-                 location.href =  url_prefix + 'phone.html?prizeImg='+prizeImg;
 
-             }else{
 
-                 PageH5.tip('您还未中奖,继续加油噢!');
 
-             }
 
-         }else if(button.index==1){
 
-             back();
 
-         }
 
- 	}
 
-     
 
- 	function back(){
 
-         location.href =  url_prefix + 'index.html?f='+PageH5.getParam('f');
 
- 	}
 
- 	window.onload = function(){
 
-         prizelog();
 
-         userPrizelog(function(){
 
-             init();
 
-         });
 
- 	}
 
- </script>
 
- </body>
 
- </html>
 
 
  |