大家帮我看看,这个小游戏的代码里面
时间: 2016-09-07来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>> 大家帮我看看,这个小游戏的代码里面,哪个JS文件或者哪段JS代码,是提交游戏分数的???非常感谢 大家帮我看看,这个小游戏的代码里面,哪个JS文件或者哪段JS代码,是提交游戏分数的???非常感谢

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- Mobile Devices Support @begin --> <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type"> <meta content="no-cache,must-revalidate" http-equiv="Cache-Control"> <meta content="no-cache" http-equiv="pragma"> <meta content="0" http-equiv="expires"> <meta content="telephone=no, address=no" name="format-detection"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen --> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <title>vivo教师节来啦!!!</title> <link href="//hdg.faisys.com/css/base.min.css?v=201609051755" rel="stylesheet" type="text/css" /> <link href="//hdg.faisys.com/css/dqgryhl.min.css?v=201605241723" rel="stylesheet" type="text/css" /> <script type='text/javascript'> var g_rem = 20; (function(docElem,win){ var setFontSize = function(){ g_rem = (docElem.getBoundingClientRect().width || docElem.clientWidth || win.innerWidth)/16; !g_rem && (g_rem = 20); docElem.style.fontSize = g_rem + 'px'; } win.addEventListener("resize",setFontSize,false); setFontSize(); })(document.documentElement,window); function loadGamePreAssets(){} </script> <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> </head> <body class="gameTpl_-1"> <!-- loading页面 --> <div id="preloadPage" class="bg"> <div class="spinner"> <div class="spinner-container container1"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> <div class="spinner-container container2"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> <div class="spinner-container container3"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> </div> <div class="info"><span id="loadPercent">0</span>%</div> <div id="userPreload" data-src="http://7020498.h40.faiusr.com/4/IdN5E8Z4l3O9h8O9UeM1R4M4ATNlR2M.png"></div> </div> <div class="ajaxLoadBg"> <div class="ajaxLoadBar "></div> </div> <div class="body"> <div class="home"> <div id="homeBgBox"> <img id="homeBg" src="http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgoOKfvQUo2Jr4uQEwgAU4wAw.png"/> </div> <div class="gameInfoBox"> <div class="titleImg imgContainer absCenter"> <img id="titleImg" class="slaveImg abs" src="http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgqeKfvQUojYPwggQw2AQ43gI.png" style="width:15rem;height:8.75rem;top:2rem;left:1rem;"/> </div> </div> <div id='joinNumLine' class='joinNumLine absCenter' style='top:8.5rem;left:3.35rem;color:rgb(255, 157, 11);font-size:0.7rem; text-shadow:rgb(255, 255, 255) -1px -1px 0px, rgb(255, 255, 255) 0px -1px 0px, rgb(255, 255, 255) 1px -1px 0px, rgb(255, 255, 255) 1px 0px 0px, rgb(255, 255, 255) 1px 1px 0px, rgb(255, 255, 255) 0px 1px 0px, rgb(255, 255, 255) -1px 1px 0px, rgb(255, 255, 255) -1px 0px 0px;'> 已有 <span id='joinNum' class="specil" style="color:rgb(255, 157, 11);font-size:0.7rem;text-shadow:rgb(255, 255, 255) -1px -1px 0px, rgb(255, 255, 255) 0px -1px 0px, rgb(255, 255, 255) 1px -1px 0px, rgb(255, 255, 255) 1px 0px 0px, rgb(255, 255, 255) 1px 1px 0px, rgb(255, 255, 255) 0px 1px 0px, rgb(255, 255, 255) -1px 1px 0px, rgb(255, 255, 255) -1px 0px 0px;">1000014</span> 人参加活动</div> <div id="startBtn" class="startBtn imgContainer absCenter" style="top:0rem;"> <img id="startBtnImg" class="slaveImg abs" src="http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAg0eKfvQUopdWxiAQwhAI4bg.png" style="width:6.5rem;height:2.75rem;top:20.8rem;left:4.95rem;"/> </div> </div> <div class="gameBox hide gameBgBox"> <div id="gameBgBox"> <img id="gameBg" src="http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgjuOfvQUon9SH2QYwgAU4wAw.png" style="width:100%;height:auto;"/> </div> <div id="gameTopBar" class="gameTopBar" style="color:rgb(255, 255, 255);background-color:rgba(255, 255, 255, 0)"> <div class="userInfoBox"> <div class="userImgBox" style="border-color:rgba(255, 255, 255, 0.298039)"><img src="http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0" class="userImg" /></div> </div> <div class="timeBox"> 时间<br><span class="time">0</span> </div> </div> <div id="gameLayerBox"> </div> <div class="timeUpImg hide"></div> </div> <div id="spxdPage"></div> <!-- 活动规则,排行榜,我的奖品的弹出层 --> <div class="ruleImg imgContainer absCenter" _mouseIn="0" ontouchend="showRule();"> <img id="ruleImg" class="slaveImg abs" src="//hdg.faisys.com/image/ruleImg_yellow.png" style="width:3rem;height:3rem;top:0.15rem;left:12.85rem;"/> </div> <div id="poupInfoBox"> <div class="poupHead"> <div class="poupTitleBox"> <div id="actionExpBtn" class="poupTitleMune checked" _flag="2"> <div class="item">活动说明</div> </div> <div id="ranBtn" class="poupTitleMune " _flag="1"> <div class="item">排行榜</div> </div> <div id="prizeBtn" class="poupTitleMune" _flag="3"> <div class="item">我的奖品<span id='Award_Round_Dot' class='redDot hide'></span></div> </div> <div id="winnerBtn" class="poupTitleMune hide" _flag="4"> <div class="item">获奖名单</div> </div> <div class="poupSlideBar"> <div class="slideBarTip transitionPanel"></div> </div> </div> <div class="poupClose"></div> <div style="clear:both; height:0"></div> <!--<div class="poupTitle">活动及奖品说明</div>--> </div> <div id="popTabBox" class="popTabBox transitionPanel" style="left:0"> <div id="ruleBox" class="poupMain" _flag="2" style="-webkit-overflow-scrolling:touch;"> <div id="getHeight"> <div id="awardLine" class="poupLine"> <div class="mainTitle">活动奖品</div> <div id="awardLineBox"> <div class='unComfortLine awardItem '><span class='awardStyle'>一等奖</span> : <span class='award'>128元移动电源</span></div> <div class='unComfortLine awardItem '><span class='awardStyle'>二等奖</span> : <span class='award'>58元6件套套杯</span></div> <div class='unComfortLine awardItem '><span class='awardStyle'>三等奖</span> : <span class='award'>10元万能手机壳</span></div> <div class='unComfortLine awardItem hide'><span class='awardStyle'>四等奖</span> : <span class='award'>价值5元小礼品</span></div> <div class='unComfortLine awardItem hide'><span class='awardStyle'>五等奖</span> : <span class='award'>价值5元小礼品</span></div> <div class='unComfortLine awardItem hide'><span class='awardStyle'>六等奖</span> : <span class='award'>价值5元小礼品</span></div> <div class='unComfortLine awardItem hide'><span class='awardStyle'>七等奖</span> : <span class='award'>价值5元小礼品</span></div> <div class='unComfortLine awardItem hide'><span class='awardStyle'>八等奖</span> : <span class='award'>价值5元小礼品</span></div> <div class='awardItem anwei '><span class='awardStyle'>安慰奖</span> : <span class='award'>手机小支架</span></div> </div> <div id="selfAwardLine" class="hide" style="word-wrap: break-word;"></div> </div> <div id="gameDateTime" class="poupLine"> <div class="mainTitle">活动时间</div> <p><span id="startDate">2016年9月7日 00:00</span> - <span id="endDate">2016年9月11日 00:00</span></p> </div> <div class="hostLine poupLine"> <div class="mainTitle">主办单位</div> <p>本次活动主办单位为 <a class="hostName" href="http://www.鄢陵vivo专卖店.com" />鄢陵vivo专卖店</a></p> <p>主办单位在法律允许的范围内拥有活动解释权</p> </div> <div id="skillLine" class="skillLine poupLine"> <div class="skillCont"> <div class="mainTitle">技术支持</div> <p>页面技术由 <a class="skillName" href="http://mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#wechat_redirect" />凡科互动</a> 提供,技术支持方仅提供页面技术,不承担由活动引起的相关法律责任</p> </div> </div> </div> <div id="explainBox" class="poupLine"> <div class="mainTitle">活动及兑奖说明</div> <p id="explaiDrawInfoBox"> <span id="haveScore">游戏达到 <span id="scoreLimit" class="scoreLimit">15</span><span class="gameScoreUnit">秒</span><span id="exlainDrawFont">即可获得抽奖机会,</span></span> <span id="directDrawInfoBox" class=""> 每人<span class="dayFont">每日</span>有 <span id="drawTimesLimit">1</span> 次抽奖机会<span class="drawTotalFont">,每人最多可抽奖 <span id="totalDrawTimeLimit">6</span> 次</span>。<br> </span> </p> <div id="exlainInfo">获奖后凭兑奖码联系活动主办单位即可兑奖。<br/>活动期间每人限领一份礼品。</div> </div> </div> <div id="rankBox" class="poupMain" _flag="1" style="-webkit-overflow-scrolling:touch;" > <div id="noRank" class=''>暂无排名</div> <div id="rankMain" class="getRankHeight hide"> <div style="margin-top:0.7rem;margin-left: 0.25rem;">当前排名:<span id="rank"></span> (只显示前<span id="showRankNum">100</span>名)</div> <div style="padding:0rem 0.5rem"> <table class="rankTable" cellspacing="0" cellpadding="0"> <thead> <tr style="line-height: 1rem;"> <th>排行</th> <th>头像</th> <th>昵称</th> <th>成绩</th> </tr> </thead> </table> </div> </div> <div id="rankHeight"> <table id="rankInfoBox" class="rankTable" cellspacing="0" cellpadding="0" style="margin-top: 0;"></table> </div> </div> <div id="awardBox" class="poupMain" _flag="3" > <div id="awardInfo" style="height: 16rem; overflow-y: auto;">暂无中奖纪录</div> <div class='attentionBox'> <div class='menuBtnBox' > <a class='menuName'>关注我们</a> </div> <div class='skillInfo'><a href='http://mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#rd'>我也要免费创建活动</a><span class='gotoFlag'></span></div> <div class='holdBox'></div> </div> </div> <div id="regAwardBox" class="poupMain" _flag="4" style="-webkit-overflow-scrolling:touch;"> <div id="noRegAward" class="hide" style="margin-left:3px;">尚未公布获奖名单,详情请查看活动说明</div> <div id="regAwardMain" style="display:none;"> <div class="regAwardList"> <div class="mainTitle">一等奖</div> <div class="playerName" style="margin-bottom:12px;"></div> </div> <div class="regAwardList"> <div class="mainTitle">二等奖</div> <div class="playerName" style="margin-bottom:12px;"></div> </div> <div class="regAwardList"> <div class="mainTitle">三等奖</div> <div class="playerName" style="margin-bottom:12px;"></div> </div> <div class="regAwardList"> <div class="mainTitle">安慰奖</div> <div class="playerName" style="margin-bottom:12px;"></div> </div> </div> </div> </div> </div> <!-- 兑奖联系方式弹出层 --> <div id="awardUserInfoBg" class="bg hide" style="position:fixed;overflow: scroll;"> <div id="awardUserInfoBox"> <div class="title">领奖信息</div> <div class="awardTips">获奖者需填写联系电话方可查看兑奖码兑奖</div> <div> <input id="nameInput" class="contactInput" type="text" placeholder="请输入姓名" /> <input id="phoneInput" class="contactInput" type="text" placeholder="请输入联系电话" /> <textarea id="addressInput" class="contactInput" name="address" placeholder="请输入联系地址"></textarea> <div id="userSubmitBtn" class="submit">提交</div> <div id="userCancelBtn">暂不提交</div> </div> <div class="awardUserBot">若因未填写资料或资料填写错误导致兑奖失败<br>主办方不承担相关法律责任</div> </div> </div> <!--奖品详情弹出层 --> <div id="awardDetailBox" class="poupMain bg hide"> <div id="awardDeailBg" class="bg hide"></div> <div class="awardCloseIcon"></div> <div class="awardDetail"> <div class="hostName" style="padding: 0.7rem 0.7rem 1rem;text-align: left;color:#fff"></div> <div class="awardName ellipsis"></div> <div class="awardSubTitle"></div> <div class="awardCodeTime"><em>使用期限</em>:<span class="codeBgTime"></span> - <span class="codeEndTime"></span></div> <div class="awardDetailWarp"></div> </div> <div class="codeImgBox"> <div id="codeStatusBox" class="hide" style="padding-top:1.25rem;color:#777"> <div id="codeStatusBtn"></div> <div id="codeStatusInfo">商家已将该兑奖码设置为作废<br>详情请联系商家</div> <div id="codeStatusTips" class="hide"><em style="font-style: normal;">请先收藏<span class="giftNameA">兑奖券</span>,<span class="targetDateMin">1</span>天后可用</em></div> </div> <div id="codeDetailInfoBox"> <img class="codeImg"/> <div class='codeLine'><span id="codeName">优惠码</span>:<span class="code"></span></div> <div class="codeOptInfo"></div> </div> </div> <div class="hide bg codeDetailImgBox"> <div class="absCenter imgBox"> <img class="codeImg" style="width:9rem;height:9rem;"/> </div> </div> <div> <div style="height:0.4rem;"></div> <div> <div class="awardCusText awardDetailBtn"><span class="text">自定义文本<em>(未开启)</em></span><span class="awardDeailIcon"></span></div> <div id="awardCusTextInfo" class="awardDetailText hide"></div> <a id="awardCusBtnInfo" href="###" style="text-decoration:none;"><div class="awardCusBtn awardDetailBtn" style="border-top:none;"><span class="text">自定义按钮<em>(未开启)</em></span><span class="awardDeailIcon"></span></div></a> </div> <div style="height:2.75rem;"></div> <div class="awardCollection"> <div id="awardCollectionBtn" ontouchend = "HdGame.favorite();">收藏优惠券</div> </div> </div> </div> <!--兑奖券详情弹出层 --> <div id="ticketDetailBox" class="poupMain bg hide"> <p class="ticketitle"><span class="closeBtn"></span><span class="text">兑奖券详情</span></p> <div class="ticketInfo"> <div class="itemList"> <div class="title">有效日期</div> <div class="box"> <span class="beginTime">2016.03.03</span>-<span class="endTime">2017.03.03</span> </div> </div> <div class="itemList"> <div class="title">可用时段</div> <div class="box"> <div class="timelimit">周一至周日</div> </div> </div> <div class="itemList addressLine"> <div class="title titleAdress">兑奖地址</div> <div class="box"> <div class="address">地址</div> </div> </div> <div class="itemList"> <div class="title">客服电话</div> <div class="box"> <div class="tel">1356969585</div> </div> </div> <div class="itemList"> <div class="title titleNotice">兑奖须知</div> <div class="box"> <div class="notice">XXXXXX</div> </div> </div> </div> </div> <!--投诉页面弹出层 --> <div id="informBox" class="bg hide"> <div id="inform-reason-page"> <p class="informTitle">请选择投诉原因</p> <div id="inform-reason-box"> <div id="temptShare" class="reasonItem" _index="0">诱导分享<em></em></div> <div id="shamActive" class="reasonItem" _index="1">虚假活动<em></em></div> <div id="political" class="reasonItem" _index="2">政治敏感<em></em></div> <div id="eroticism" class="reasonItem" _index="3">色情低俗<em></em></div> <div id="rumor" class="reasonItem" _index="4">谣言<em></em></div> <div id="otherReason" class="reasonItem" _index="5">其他(收集隐私信息等)<em></em></div> </div> <div id="cancel-inform-btn">取消</div> <div id="next-inform-btn" class="hide">下一步</div> <div id="inform-poup-tip" class="hide">投诉成功</div> </div> <div id="inform-desc-page" style="display: none;"> <p class="informTitle">投诉描述</p> <div id="inform-desc-box"> <textarea name="informDesc" id="informDesc" cols="30" rows="6" placeholder="请填写投诉描述,最多输入50个字"></textarea> </div> <div id="submit-inform-btn">提交</div> </div> </div> <!--投诉结果页面弹出层 --> <div id="informResultBox" class="bg hide"> <img src="//hdg.faisys.com/image/gx.png?v=201604151202"> <h3>投诉成功</h3> <p>感谢你的参与,我们坚决反对色情、暴力、欺诈等违规信息,我们会认真处理你的投诉,维护绿色、健康的网络环境</p> <div class="confirm-btn">确认</div> </div> <!-- 右侧按钮 --> <div class="homeBtnBox"> <div id="myAwardBtn" ontouchend="HdGame.changePoup(3)" style="display:none;"><span class='redDot'></span></div> <div id="informBtn" ontouchend="HdGame.changePoup(5)"> <span>投诉</span> </div> </div> <!-- logo --> <div id="logoImgBox" class="logoImgBox imgContainer absCenter footerBox" > <img id="logoImg" class="slaveImg abs" src="http://11019180.h40.faiusr.com/2/1/ACgIABACGAAgl8K6vgUoroPGSjDXATjaAQ.jpg" style="width:4.4rem;height:4.4rem;top:0rem;left:0rem;"/> </div> <!-- 抽奖等待弹出层 --> <div id="lots-wait-Box" style="display:none"> <div id="lots-wait-img"></div> <div id="lots-wait-hint">当前抽奖人数过多<br/>请稍等 <span id="lots-wait-hint-num">0</span> 秒</div> </div> <!-- 助力引导层 --> <div id="helpGuideBox" style="display:none"> <p>你今天已经没有抽奖机会了</br>分享给好友或群聊</p> <p style="margin-top:1.1rem;">今天将额外获得1次抽奖机会!<br/>(仅限当天首次分享)</p> </div> <!-- <div id="jv_dev_box" style="position:fixed;top:0;bottom:0;right:0;margin:auto;display:table;width:2rem;background-color:rgba(0,0,0,.3);color:#fff;"> <div id="jv_share_btn" style="text-align:center;line-height:2;border-bottom:1px solid #fff;">share</div> </div> --> <!-- 结果弹出层 --> <div class="resuleBox hide"> <div id="resule-status-box" style="display:none"> <div id="resule-status-scrollWrap"> <div class="resule-bgLight"></div> <div id="resule-status-bird"></div> <div id="resule-status-head"> <div class="resule-status-userImg one" style="display: none;"> <img src="http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0"/> </div> <div class="resule-status-userImg PKner-A hide"> <img /> </div> <div class="PKner-B hide"> <img src="//hdg.faisys.com/image/jtou.png"/> </div> <div class="resule-status-userImg PKner-C hide"> <img src="http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0"/> </div> <p class="userA-name hide">haha</p> <p class="userB-name hide">河边走</p> <div id="resule-status-ribbon" class="resule-status-ribbon"></div> </div> <div id="resule-status-body"> <p class="youraward"style="font-size:0.8rem; line-height:1.2rem">您的成绩为:<span class="resuleArg" style="font-size:0.8rem;"></span><span class="result-scoreUnit"><span class="gameScoreUnit">秒</span></span></p> <p class="beat-Percent hide">成功击败全国<span></span>%的玩家</p> <p class="resule-status-minscore" style="display:none;">成绩必须达到 <span class="resuleArg resulescoreLimit"></span> <span class="gameScoreUnit">秒</span>才能<span id="minscoreDrawFont">抽奖</span></p> <p id="bestArg" style="margin-top:0.5rem">最佳成绩为:<span class="resuleArg"></span><span class="result-scoreUnit"><span class="gameScoreUnit">秒</span></span></p> <p>最佳排名为:<span class="result-scoreUnit">NO.</span><span class="resuleArg"></span></p> <div id="rank_showRule" style="text-decoration:underline;margin:0.7rem 0rem;" class="hide" ontouchend="showRule();">活动规则</div> <div id="resule-status-count" style="margin-top:0.6rem"> <p class="totalDraw">您还有 <span id="totalDrawCount" class="resuleArg"></span> 次抽奖机会</p> <p class="dayDraw">今天还有 <span class="resuleArg dayDrawCount"></span> 次机会抽奖</p> <p class="dayDraw4Total hide">今天可抽 <span class="resuleArg dayDrawCount"></span> 次</p> </div> <div class="little-PK hide"> <p class="fighter-B"></p> <p class="othergrade">最佳成绩<span class="resuleArg"></span><span class="gameScoreUnit"><span class="gameScoreUnit">秒</span></span></p> <p id="rankB">全国排名NO.<span class="resuleArg"></span></p> <p class="WhetherAward"></p> <p class="winAWard" style="margin:1rem 0"> <a href="javascript:void(0)">活动奖品</a> </p> </div> </div> <div id="resule-status-other" class="hide"> <p style="font-size:0.8rem;font-weight:bold;">通关并且</p> <p class="resule-status-minscore hide" style="margin: 10px 0px 50px;">成绩必须达到 <span class="resuleArg resuleArg-fail resulescoreLimit"></span> <span class="gameScoreUnit">秒</span>才能抽奖</p> </div> <div id="resule-sucReg" class="hide" style="margin-top:0.6rem">您已经成功报名参与活动!</div> <div id="resule-foot-box"> <div class="resule-foot-one"> <div class="resule-button resule-one-button resule-status-gift hide">赶紧去抽奖</div> <div class="resule-button resule-one-button resule-status-reg hide">我要报名</div> <div class="resule-button resule-one-button resule-status-again hide">再玩一次</div> <div class="resule-button resule-one-button resule-status-send hide">领取礼品</div> <div class="resule-button resule-one-button resule-status-rightNow hide">马上PK</div> </div> <div class="resule-foot-two"> <div class="resule-button resule-status-seeRank">排行榜</div><div class="resule-button resule-status-home">返回首页</div><div class="resule-button resule-status-again restart-again ">再玩一次</div><div class="hide resule-button resule-status-firstPage">首页</div> </div> </div> </div> <div id="resule-status-lotsBox" style="display:none"> <div id="resule-status-lots"></div> <div id="resule-status-lotsHand"></div> </div> <div class='attentionBox'> <div id="drawMenuBtnBox" class='menuBtnBox hide' > <a class='menuName'>关注我们</a> </div> <div class='skillInfo'><a href='http://mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#rd' style='color:#fff;text-decoration:underline;'>我也要免费创建活动</a><span class='gotoFlag'></span></div> <div class="holdBox"></div> </div> </div> <div id="resule-gift-box" style="display:none"> <div id="resule-gift-scrollWrap" class="resule-gift-overflowScrolling" style="padding-top: 1.2rem;"> <div class="resule-bgLight"></div> <!--<div id="resule-gift-jiantou" class="resule-fxts resule-fxts_s"></div>--> <div style="position:absolute; width: 100%;"> <p id="resule-gift-luck" style="text-align:center;" >恭喜你获得了</p> <div class="imgContainer"> <img id="resule-gift-sucImg" class="slaveImg" src="//hdg.faisys.com/image/gift.png?v=201504091029" style="width:6rem;height:6rem"> </div> <div id="resule-gift-foot"> <p id="resule-gift-rank"> <span class="gifArg awardStyle"></span> </p> <p id="resule-gift-goods"> <span class="gifArg awardName"></span> </p> <!--<p id="resule-gift-code" >兑奖码:<span class="gifArg"></span></p>--> <a id="resulte-gift-showMyAward" style="text-decoration: underline;color:#fff;">点击查看奖品详情</a> <!--<p id="resule-gift-explain" style="text-align:left;" >获奖后凭兑奖码联系活动主办单位即可兑奖。<br/>活动期间每人限领一份礼品。</p>--> </div> </div> </div> <!--<div id="faiImgBox" class="imgContainer absCenter hide" > <img id="resule-faiImg" class="slaveImg abs" src="//hdg.faisys.com/image/dqgryhl/faiImg.png" style="width:15rem;height:18rem;top:0.5rem;left:0.5rem;"/> </div>--> <div id="faiImgBox"> <img class="abs" src="//hdg.faisys.com/image/faiImg.png?v=201509171041" style="width:13.5rem;height:16.75rem;top:2.0rem;left:1.2rem;"/> <div class='resule-gift-draw repeatDraw'>继续抽奖</div> <div class='resule-gift-home menuBack menuBack2'>返回首页</div> </div> <div class='attentionBox'> <div class='menuBtnBox'> <a class='menuName'>关注我们</a> </div> <div class='skillInfo'><a href='http://mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#rd'>我也要免费创建活动</a><span class='gotoFlag'></span></div> <div class="holdBox"></div> </div> </div> </div> <!-- 一键关注弹出页 --> <div id="attentionMask" class="homePoupMask"> <div id="attentionPoup" class="homePoupInner attentionPoup"> <img src="//hdg.faisys.com/image/caewm.jpg?v=201506151818"/> <img id="QRImg" src="http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg58W6vgUoy-W51wIwrgM4rgM.jpg" style="position:absolute;top:0.5rem;left:0;right:0;margin:auto;"/> </div> </div> <!--卡券一键关注弹出页--> <div id="newAttentionMask" class="homePoupMask hide"> <div id="newAttentionPoup" class="homePoupInner attentionPoup"> <img src="//hdg.faisys.com/image/caewm.jpg?v=201506151818"/> <img id="QRImg_1" style="position:absolute;top:0.5rem;left:0;right:0;margin:auto;"/> </div> </div> <!-- 运营账号弹出页 --> <!-- 技术支持弹出页 --> <div id="skillSupMask" class="homePoupMask"> <div id="skillSupPoup" class="homePoupInner attentionPoup"> <img src="//hdg.faisys.com/image/yxcaewm.jpg?v=201602221653" style="width:10.7rem;position: absolute;top: 0.2rem;left: 0;right: 0;margin:auto"/> <img src="//hdg.faisys.com/image/nbuyhd.gif?v=201602221653" style="position:relative;"/> </div> </div> </div> <script type="text/javascript"> var _manage = false, m_debug = false, _resRoot = '//hdg.faisys.com', hg = {}; //错误监控 (function(){var _faiAjax=function(){var r=/\?/;var _o={type:"get",url:"",data:"",error:function(){},success:function(){}};var _sendRequest=function(o){var xmlhttp=null;o.type=o.type||_o.type;o.url=o.url||_o.url;o.data=o.data||_o.data;o.error=o.error||_o.error;o.success=o.success||_o.success;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}if(o.type!="post"){o.url+=(this.r.test(o.url)?"&":"?")+o.data;xmlhttp.open("GET",o.url,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){o.success(xmlhttp.responseText)}else{if(o.error){o.error()}}};xmlhttp.send()}else{xmlhttp.open("POST",o.url,true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200){o.success(xmlhttp.responseText)}else{o.error()}};xmlhttp.send(o.data)}};return{ajax:function(option){try{_sendRequest(option)}catch(e){}}}}();hg._faiAjax=_faiAjax;var _jsErrCahche=[];window.onerror=function(sMsg,sUrl,sLine){if(sLine<1||typeof sMsg!="string"||sMsg.length<1){return}if(/WeixinJSBridge|_WXJS/.test(sMsg)){return}var log="Error:"+sMsg+";Line:"+sLine+";Url:"+sUrl;var alertLog="Error:"+sMsg+"\n"+"Line:"+sLine+"\n"+"Url:"+sUrl+"\n";var encodeUrl=function(url){return typeof url==="undefined"?"":encodeURIComponent(url)};var ajax=true;var obj={"m":sMsg,"u":sUrl,"l":sLine};for(var i=0;i<_jsErrCahche.length;i++){if(_jsErrCahche[i].m==obj.m&&_jsErrCahche[i].u==obj.u&&_jsErrCahche[i].l==obj.l){ajax=false;break}}if(ajax){_jsErrCahche.push(obj);_faiAjax.ajax({type:"post",url:"//hd.faisco.cn/ajax/logJsErr_h.jsp?cmd=jsErr",data:"msg="+encodeUrl(log)})}if(m_debug){if(HdGame&&HdGame.tlog){HdGame.tlog(alertLog)}else{alert(alertLog)}}}})(); /* hg.assets : { complete loadComplete onReady onload loadPage } */ function isArray(arr){ return Object.prototype.toString.call(arr) === "[object Array]"; } (function(hg){ var imgPaths = [], readyCallBack = [], loadCallBack = []; hg.assets = { complete : false, loadComplete : false, increment : 0, loadingStyle : 1, loadTimeout : 120000, add : function(src){ var self = this; if(self.complete || _manage){ return; } if(isArray(src)){ for (var i = src.length - 1; i >= 0; i--) { self.add(src[i]); }; }else if(typeof src === 'string'){ imgPaths.push(src); } return this; }, onReady : function(callBack){ var self = this; if(self.complete){ callBack(); }else{ readyCallBack.push(callBack); } return self; }, onload : function(callBack){ var self = this; if(self.loadComplete){ callBack(); }else{ loadCallBack.push(callBack); } return self; }, loadPage : function(){if(_manage)return;var self=this,percent=1,numLoaded=0,$loadPercent=document.getElementById("loadPercent"),loadPallet;window.scrollTo(0,0);if(self.loadingStyle===1){loadimg(imgPaths)}else if(self.loadingStyle===3){var logoImg=document.getElementById("preloadImg");if(logoImg.complete){initLogoImg()}else{logoImg.onload=initLogoImg}function initLogoImg(img){var img=logoImg;var h=img.height;var w=img.width;var bottomPageInfoDeg=-Math.atan(w/h)-Math.PI/2;var canvas=document.getElementById("preloadCanvas");var ctx=canvas.getContext("2d");var ratio=(window.devicePixelRatio||1)/(ctx.backingStorePixelRatio||ctx.webkitBackingStorePixelRatio||ctx.mozBackingStorePixelRatio||ctx.msBackingStorePixelRatio||ctx.oBackingStorePixelRatio||ctx.backingStorePixelRatio||1);var drawImg=function(){ctx.fillStyle="#fff";ctx.fillRect(0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio);ctx.drawImage(img,0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio)};if(h===w){if(h>3.5*g_rem){h=w=3.5*g_rem}drawImg=function(){ctx.save();ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,w/2*ratio,0,2*Math.PI);ctx.clip();ctx.fillStyle="#fff";ctx.fill();ctx.drawImage(img,0.2*g_rem*ratio,0.2*g_rem*ratio,w*ratio,h*ratio);ctx.restore()}}else{if(w>h&&w>8*g_rem){h=8*g_rem*h/w;w=8*g_rem}else{if(h>w&&h>8*g_rem){w=8*g_rem*w/h;h=8*g_rem}}}canvas.width=(w+0.4*g_rem)*ratio;canvas.height=(h+0.4*g_rem)*ratio;canvas.style.width=w+0.4*g_rem+"px";canvas.style.height=h+0.4*g_rem+"px";if(h===w){ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,canvas.width/2,0,2*Math.PI);ctx.clip()}ctx.strokeStyle="#69c5ff";ctx.lineWidth=8*g_rem*ratio;loadPallet=function(tmp){ctx.beginPath();ctx.arc(canvas.width/2,canvas.height/2,4*g_rem*ratio,bottomPageInfoDeg,bottomPageInfoDeg+tmp*(2*Math.PI/100));ctx.stroke();drawImg()};loadimg(imgPaths)}}function setPercent(percent){$loadPercent.innerHTML=percent;if(percent===100){var index=0;setTimeout(function(){index++;if(index<10){loadPallet&&loadPallet(120);setTimeout(arguments.callee,17)}else{loadPallet=null}},17)}loadPallet&&loadPallet(percent)}function loading(){if(numLoaded<imgPaths.length){if(percent<100-imgPaths.length+numLoaded){percent++;setPercent(percent-1)}}else{percent+=10;percent>100&&(percent=100);setPercent(percent-1)}if(percent>=100&&typeof $!='undefined'){setPercent(100);var flag=$(window).height()/$(window).width()<1.575;var bgHeight=flag?$(window).width()*1.575:$(window).height();setTimeout(function(){$("#preloadPage").addClass("leftClose");$("#homeBgBox,.gameBgBox").css("height",bgHeight/g_rem+"rem");flag&&$(".home .bottomSkill,#bottomSkill").css("top",(bgHeight-$(".bottomSkill").outerHeight())/g_rem+"rem");setTimeout(function(){$loadPercent=null;$("#preloadPage").hide()},500);complete();self.loadComplete=true;for(var n=loadCallBack.length,i=0;i<n;i++){loadCallBack[i]()}loadCallBack=null;logoImg=null;$loadPercent=null},300);return}setTimeout(arguments.callee,10)}function loadimg(arr){loading();for(var i=arr.length-1;i>=0;i--){var img=new Image();img.onload=loadCheckComplete;img.onerror=loadCheckComplete;img.src=arr[i];self[arr[i]]=img}if(self.loadTimeout){self._loadTimer=setTimeout(loadTimeout,self.loadTimeout)}}function loadTimeout(){}function loadCheckComplete(){numLoaded++;this.assets_complete=true;if(numLoaded===imgPaths.length){complete()}}function complete(){if(self.complete)return;clearTimeout(self._loadTimer);numLoaded=imgPaths.length;self.complete=true;for(var n=readyCallBack.length,i=0;i<n;i++){readyCallBack[i]()}readyCallBack=null}} }; })(hg); /*----------------------------可编辑元素包装------------------------------------*/ hg.edit = null; hg.edit = {}; //通过conf文件配置可编辑元素的属性 (function(hg){ var origin = [{"name":"forward","pos":{"left":"7.5rem","top":"15rem"},"size":{"width":"2.5rem","height":"4.25rem"},"path":[["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgluOfvQUo9uKBrAQwZDiqAQ.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgmOOfvQUottrxygEwZDiqAQ.png"]]},{"name":"guard","pos":{"left":"6.5rem","top":"7.5rem"},"size":{"width":"3.75rem","height":"4.25rem"},"path":[["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgm_OfvQUopODPkgQwlgE4qgE.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgneOfvQUomO7S8AMwlgE4qgE.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgoOOfvQUo3LTb0AcwlgE4qgE.png"]]}]; var originDef = [{"name":"forward","pos":{"left":"7.5rem","top":"15rem","disable":"disable"},"size":{"width":"1.85rem","height":"3.8rem"},"path":[["*_resRoot*/image/dqgryhl/forward1.png","图片01","50k"],["*_resRoot*/image/dqgryhl/forward2.png","图片02","50k"]],"edit":"all"},{"name":"guard","pos":{"left":"6.5rem","top":"7.5rem","disable":"disable"},"size":{"width":"1.85rem","height":"3.2rem"},"path":[["*_resRoot*/image/dqgryhl/guard1.png","图片03","50k"],["*_resRoot*/image/dqgryhl/guard2.png","图片04","50k"],["*_resRoot*/image/dqgryhl/guard3.png","图片05","50k"]],"edit":"all"}]; var originMod = [{"name":"forward","pos":{"left":"7.5rem","top":"15rem"},"size":{"width":"2.5rem","height":"4.25rem"},"path":[["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgluOfvQUo9uKBrAQwZDiqAQ.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgmOOfvQUottrxygEwZDiqAQ.png"]]},{"name":"guard","pos":{"left":"6.5rem","top":"7.5rem"},"size":{"width":"3.75rem","height":"4.25rem"},"path":[["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgm_OfvQUopODPkgQwlgE4qgE.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgneOfvQUomO7S8AMwlgE4qgE.png"],["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgoOOfvQUo3LTb0AcwlgE4qgE.png"]]}]; function correct(list1,list2){ return list2.map(function(val2){ return list1.filter(function(val1){return val1.name === val2.name;})[0] || val2; }); } originMod = originMod ? correct(originMod,originDef) : originMod; origin = originMod ? correct(origin,originMod) : correct(origin,originDef); //将图片放进缓存数组内 for(var i=0;i < originDef.length;i++){ var path = origin[i].path; var pathDef = originMod ? originMod[i].path : originDef[i].path; if(pathDef){ if(!path){ origin[i].path = path = pathDef; }else if(!isArray(path[0]) && isArray(pathDef[0])){ origin[i].path = path = [].concat(pathDef).splice(0,1,path); } if(isArray(path[0])){ for(var j=0;j < pathDef.length;j++){ if(!path[j]) path[j] = pathDef[j]; if(!path[j][0]) path[j][0] = pathDef[j][0]; hg.assets.add(path[j][0].replace('*_resRoot*',_resRoot)); } }else{ if(!path[0]) path[0] = pathDef[0]; hg.assets.add(path[0].replace('*_resRoot*',_resRoot)); } } } if(false && origin[1].path[0] == _resRoot + "/image/tgcm/answer.png"){ origin[1].path[0] = [_resRoot + "/image/tgcm/drag.png"]; } hg.edit.origin = origin; hg.edit.originDef = originDef; hg.edit.originMod = originMod; })(hg); /*-----------------------资源loading-----------------------------*/ //存放所有loading好的image对象,src为key hg.assets.add([ "http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgoOKfvQUo2Jr4uQEwgAU4wAw.png", "http://11019180.h40.faiusr.com/2/1/ACgIABACGAAgl8K6vgUoroPGSjDXATjaAQ.jpg", "//hdg.faisys.com/image/ruleImg.png", "//hdg.faisys.com/image/success.png", "//hdg.faisys.com/image/light.png", "//hdg.faisys.com/image/bird.png", "//hdg.faisys.com/image/musicOff.png", "//hdg.faisys.com/image/musicOn.png", "//hdg.faisys.com/image/auBg.jpg", "http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0", "http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgqeKfvQUojYPwggQw2AQ43gI.png", "http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAg0eKfvQUopdWxiAQwhAI4bg.png", "http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgjuOfvQUon9SH2QYwgAU4wAw.png", "//hdg.faisys.com/image/lots1.png", "//hdg.faisys.com/image/lots2.png", '//hdg.faisys.com/image/faiImg.png?v=201509171041', ]); loadGamePreAssets(); hg.assets.loadPage();//开始loading页面 //全局变量 var g_config = { showSkillSup : true, //是否开启技术支持 showSlide : false, //是否开启底部轮播 showMenu : true, scoreType: true, //成绩为float或者int类型 sortType: 0, //成绩排序类型,顺序或者倒序 countsTimeType: 1, //计时类型,顺序或者倒序 drawLimitDef : 10, //游戏默认门槛 scoreSet : 15, style : 38, buy : false, scoreUnit : '秒', testCMD : 'null', isNewGame : false, ajaxUrl : '//hd.faisco.cn/ajax/', startTime : '2016-09-07 00:00', test : false, failSrcId : 5092,//srcId setGameTimeInterval : 10, //所有游戏计时时间间隔 isDoubleGame : false, //是否是双人游戏 awardList : [{"level":1,"amount":1,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"鄢陵西街桥东50米(中原银行对面)vivo专卖店","pot":0,"style":"一等奖","t_type":"DATE_TYPE_FIX_TERM","cbt":1473177600000,"cet":1473609599000,"cft":1,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券截屏后联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"0374-8599909","cashinfo":"中奖后,24小时到店领取奖品,过期无效。兑奖时需要中奖截图方可领取奖品","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg3N66vgUouP2s7QMwrgM4rgM.jpg","onlinect":1,"continfo":0,"name":"128元移动电源","onlinewxnum":"","pubopl":false},{"level":2,"amount":3,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"鄢陵西街桥东50米(中原银行对面)vivo专卖店","pot":0,"style":"二等奖","t_type":"DATE_TYPE_FIX_TERM","cbt":1473091200000,"cet":1473609599000,"cft":1,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券截屏后联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"0374-8599909","cashinfo":"中奖后,24小时到店领取奖品,过期无效。兑奖时需要中奖截图方可领取奖品","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg5N66vgUo2quQ3QQwrgM4rgM.jpg","onlinect":1,"continfo":0,"name":"58元6件套套杯","onlinewxnum":"","pubopl":false},{"level":3,"amount":24,"awardtype":2,"cashtype":2,"attention":3,"cashsite":"鄢陵西街桥东50米(中原银行对面)vivo专卖店","pot":0,"style":"三等奖","t_type":"DATE_TYPE_FIX_TERM","cbt":1473091200000,"cet":1473782399000,"cft":1,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":true,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券截屏后联系现场工作人员兑奖","btn":"关注我们","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg6966vgUo1cniiQYwrgM4rgM.jpg","onlinect":1,"continfo":0,"name":"10元万能手机壳","onlinewxnum":"","pubopl":false},{"level":4,"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"四等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1473091200000,"cet":1473782399000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"","onlinect":1,"continfo":0,"name":"价值5元小礼品","onlinewxnum":"","pubopl":false},{"level":5,"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"五等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1473091200000,"cet":1473782399000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"","onlinect":1,"continfo":0,"name":"价值5元小礼品","onlinewxnum":"","pubopl":false},{"level":6,"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"六等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1473091200000,"cet":1473782399000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"","onlinect":1,"continfo":0,"name":"价值5元小礼品","onlinewxnum":"","pubopl":false},{"level":7,"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"七等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1473091200000,"cet":1473782399000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"","onlinect":1,"continfo":0,"name":"价值5元小礼品","onlinewxnum":"","pubopl":false},{"level":8,"amount":0,"awardtype":2,"cashtype":2,"attention":1,"cashsite":"请填写您的兑奖地址或者门店地址","pot":0,"style":"八等奖","t_type":"DATE_TYPE_FIX_TIME_RANGE","cbt":1473091200000,"cet":1473782399000,"cft":30,"cfbt":0,"tlmt":"[8]","ocimg":false,"opqrc":true,"optx":false,"oct":false,"oplink":false,"genewxcard":false,"iscuscode":false,"stl":"","opti":"凭券联系现场工作人员兑奖","btn":"了解更多","btl":"","servicepho":"","cashinfo":"","aimg":"//hdg.faisys.com/image/gift.png?v=201601141500","aimgw":"6rem","aimgh":"6rem","attentionimg":"","onlinect":1,"continfo":0,"name":"价值5元小礼品","onlinewxnum":"","pubopl":false}], //奖项列表 award : null, //奖品 wxAward : null, // comfort : {"ca":"手机小支架","cas":"安慰奖","cc":110191801,"comAwardtype":2,"comcashtype":2,"conlinect":1,"comcashsite":"鄢陵西街桥东50米(中原银行对面)vivo专卖店","ccc":"","cttype":"DATE_TYPE_FIX_TERM","comcbt":1473091200000,"comcet":1473782399000,"comft":1,"comfbt":0,"ctlmt":"[8]","comstl":"","comopti":"凭券截屏后联系现场工作人员兑奖","comoci":false,"comOpqrc":true,"comoptx":false,"comoct":true,"comOplink":false,"comiscuscode":false,"combtn":"关注我们","combtl":"","comservicephone":"","comcashinfo":"","comimg":"//hdg.faisys.com/image/gift.png?v=201601141500","comimgw":"6rem","comimgh":"6rem","comattentionimg":"http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg8d66vgUouv3E9QYwrgM4rgM.jpg","comcontinfo":0,"comattention":3,"conlinewxnum":""}, //安慰奖 isRegUserName : false, //是否登记兑奖姓名 isRegPhone : false, //是否登记兑奖联系电话 isRegAddress : false, //是否登记兑奖联系地址 aid : 11019180, gameId : 1, openId : 'o1ueSjgKEaUisGxQIjgMLIuikb6U', awardInfoB : "", openAwardLinkNoDraw : false,//非即开型游戏是否开启联系兑奖 awardUsername : '', //联系兑奖的用户姓名 awardPhone : '', //联系兑奖的联系电话 status : 2, afterWxCard : true, haveAward : false, showHelpGuide : false, //是否显示助力引导页面 playerId :0, ipInfo: {"ip":"124.116.201.172","contry":"中国","provice":"陕西省","city":"宝鸡市","area":"西北","isp":"电信"} , //用户ip信息 contactNoDraw : "[-1]" //非抽奖派发类型的开启联系兑奖选项信息 }; </script> <script type="text/javascript" src="//hdg.faisys.com/js/comm/jquery/jquery-core.min.js?v=201607181759"></script> <script type="text/javascript" src="//hdg.faisys.com/js/hdgame.min.js?v=201609061952"></script> <script type="text/javascript" src="//hdg.faisys.com/js/hdUtil.min.js?v=201605161742"></script> <script type="text/javascript" src="//hdg.faisys.com/js/lufylegend.min.js?v=201607281400"></script> <script type="text/javascript"> function $$(selector){ if(!_manage){ return $('#__notfound__'); } return parent.$(selector); } HdGame.gameDomain = 'hd.faisco.cn'; if(false){ HdGame.gameDomain = 'hd.webportal.cc'; } HdGame.isReg = false; /*---------------游戏函数回调--------------------*/ HdGame.initCallBack(hg); hg.addCallBack(['startGame','startGamehead','home','again','jsFootEnd','hgLoadEnd','save','showResult','changeBottomBar','showPoup','hidePoup','setGameType']); hg.showGameBox = true; //是否在开始游戏时默认显示游戏页 /*----------------------------可编辑元素包装------------------------------------*/ //通过conf文件配置可编辑元素的属性 if(hg.edit){ HdGame.initEdit(hg.edit); } function parseRemToPx(rem){ if(rem.indexOf('rem') === -1){ return parseFloat(rem); } return parseFloat(rem)*g_rem; } /*----------------------------------计时------------------------------------*/ hg.time = null; (function(hg){ var initTime = 0; if(!g_config.countsTimeType && initTime === 0){ if(!_manage){ initTime = 99999; }else{ if(true){ initTime = 30; }else{ initTime = 0; } } $(function(){$('.timeBox').hide();}); } hg.time = HdGame.initTime(initTime); })(hg); /*----------------------------------计分------------------------------------*/ /*----------------------------------声音-----------------------------------*/ hg.sound = null; (function(hg){ var soundList = [{"path":"//hdg.faisys.com/image/dqgryhl/music/bgmusic04H.mp3","fileName":"背景音乐.mp3","optFlag":0},{"path":"//hdg.faisys.com/image/dqgryhl/music/err.mp3","fileName":"失败音效.mp3","optFlag":2}]; var soundListDef = [{"path":"*_resRoot*/image/dqgryhl/music/bgmusic04H.mp3","fileName":"背景音乐.mp3","optFlag":0},{"path":"*_resRoot*/image/dqgryhl/music/err.mp3","fileName":"失败音效.mp3","optFlag":2}]; var soundListMod = [{"path":"//hdg.faisys.com/image/dqgryhl/music/bgmusic04H.mp3","fileName":"背景音乐.mp3","optFlag":0},{"path":"//hdg.faisys.com/image/dqgryhl/music/err.mp3","fileName":"失败音效.mp3","optFlag":2}]; if(soundListMod){ $.each(soundListMod,function(index,sound) { soundListDef[index].path = sound.path; }); } soundListMod = null; if(soundList){ $.each(soundList,function(index,sound) { var soundDef = soundListDef[index]; if(index !== 0 && sound.optFlag === 1){ sound.optFlag = 2; } sound.path = HdGame.getSrc(sound.path); soundDef.path = HdGame.getSrc(soundDef.path); }); } hg.sound = HdGame.initSound(soundList,soundListDef); hg.sound.load("//hdg.faisys.com/image/button.mp3","startButton"); if(soundList){ $.each(soundList,function(index,sound) { var path = sound.path; if(index === 0 ){ hg.sound.load(path,index,false); }else{ hg.sound.load(path,index); } }); if(!_manage){ hg.sound.cache['0'].data.addEventListener('play',function(){ $(function(){ hg.assets.onReady(function(){ $('.soundIcon').removeClass("soundIconOff"); }); }); },false); hg.sound.cache['0'].data.addEventListener('pause',function(){ $(function(){ hg.assets.onReady(function(){ $('.soundIcon').addClass("soundIconOff"); }); }); },false); } } })(hg); </script> <script type="text/javascript"> HdGame.wxConfigArg = { url : 'https://hd.faisco.cn/11019180/1/load.html?style=38' }; (function(){ if(false){ return; } //判断该玩家是否已获取过礼物 var arr=['一','二','三','四','五','六','七','八']; var haveAward = false; if(haveAward){ var itemInfo = null; if(itemInfo.award.length > 0){ HdGame.currentAward=itemInfo.award; } var awardLevel = itemInfo.awardLevel; if( awardLevel != 900 && awardLevel > 0 ){ if(true && 9 >= awardLevel){ var nameList = ["一等奖","二等奖","三等奖","四等奖","五等奖","六等奖","七等奖","八等奖","安慰奖"]; HdGame.currentAwardStyle = nameList[awardLevel-1]; }else{ HdGame.currentAwardStyle = arr[awardLevel-1]; } }else{ HdGame.currentAwardStyle = 'null'; } } //判断该玩家是否已有过排行榜 var r = {}; HdGame.currentRank=r.rank; HdGame.currentScore=r.score; setWxShareByStatus(); })(); wx.config({ debug: false, appId: 'wx25367438c8ce0799', timestamp: 1473238288, nonceStr: '51e39730-0cb0-447a-81ad-18f0fdf1fde4', signature: '4313f6e844a2346e0bb3660f5498c4d059db4984', jsApiList: [ 'checkJsApi', 'onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'translateVoice', 'startRecord', 'stopRecord', 'onRecordEnd', 'playVoice', 'pauseVoice', 'stopVoice', 'uploadVoice', 'downloadVoice', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'getNetworkType', 'openLocation', 'getLocation', 'hideOptionMenu', 'showOptionMenu', 'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard' ] }); wx.ready(function(){ //添加卡券 $('#awardCollectionBtn').on('touchstart',function(){ var isAddCard = true; var award = g_config.wxAward; var generateWxcard = award.genewxcard; if(generateWxcard){ if(false){ HdGame.statusMsg('活动尚未发布','无法加入到微信卡券'); return; } var str = $('#awardDetailBox .codeBgTime').html().replace(/\./g,'/'); var targetTimeStamp = new Date(str).getTime(); if(targetTimeStamp > new Date().getTime()){ HdGame.statusMsg('未到兑奖时间'); return; } var cardId = award.wxcardid; var code = $('#awardDetailBox .codeLine .code').text(); var sysCode = $('#awardDetailBox .codeLine .code').attr('code'); var depositTime = g_config.award.depositTime; HdGame.tlog(cardId); HdGame.tlog(code); $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=getCardSign&cardTick=&cardId='+cardId+'&code='+code+'&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', error : function(){ if(m_debug){ alert( '服务繁忙,请稍候重试' ); } }, success : function(data){ HdGame.tlog('getCardSign',data); var result = $.parseJSON(data); var cardExt = "{\"timestamp\":\""+result.timestamp+"\",\"openid\":\"o1ueSjgKEaUisGxQIjgMLIuikb6U\",\"nonce_str\":\""+ result.nonce_str +"\",\"code\":\""+ code +"\",\"signature\":\""+result.sign+"\"}"; if(depositTime && depositTime < Date.parse(new Date())){ isAddCard = false; } HdGame.tlog("depositTime="+depositTime); if(isAddCard){ wx.addCard({ cardList: [ { cardId: cardId, cardExt: cardExt } ], success: function (res) { HdGame.tlog('addCard',res); //alert('已添加卡券:' + JSON.stringify(res.cardList)); var resItem = res.cardList[0]; isAddCard = false; $('#awardCollectionBtn').text("打开微信卡券"); if(resItem.isSuccess){ $.ajax({ type : 'get', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setCode&code='+sysCode, error : function(){ if(m_debug){ alert( '服务繁忙,请稍候重试' ); } }, success : function(data){ HdGame.tlog('setCode',data); var result = $.parseJSON(data); } }); } } }); }else{ wx.openCard({ cardList: [{ cardId: cardId, code: code }]// 需要打开的卡券列表 }); } } }); } }); }); wx.ready(function () { /* wx.hideMenuItems({ menuList: ['menuItem:copyUrl'] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮 });*/ wx.showAllNonBaseMenuItem(); try{ //是否显示朋友圈分享 //微信错误 wx.error(function(res){ if(m_debug){ alert($.toJSON(res)); } }); }catch(e){ alert(e.message); } }); function decodeHtml(html){ return html && html.replace ? (html.replace(/ /gi, " ").replace(/</gi, "<").replace(/>/g, ">") .replace(/\/gi, "\\").replace(/'/gi, "\'").replace(/"/gi, "\"").replace(/\<br\/\>/gi, "\n").replace(/&/gi, "&")) : html; }; function setWxShare(desc,url,callBack){ if(!_manage){ desc = desc.replace('红包',''); } desc = decodeHtml(desc); var pyqUrl = url; //分享多域名 //是否已经设置过动态分享链接,防止重复设置 /*if(!arguments.callee.isSetDynRoot){ pyqUrl = 'http://www.hdpyqb.com/' + url.replace('http://','').replace('https://',''); arguments.callee.isSetDynRoot = true; }*/ pyqUrl = 'http://www.hdpyqb.com/' + url.replace('http://','').replace('https://','') + '&fsl=b'; //分享链接统一加上自己的openid url = HdGame.setUrlArg(url,['otherplayer','o1ueSjgKEaUisGxQIjgMLIuikb6U']); pyqUrl = HdGame.setUrlArg(pyqUrl,['otherplayer','o1ueSjgKEaUisGxQIjgMLIuikb6U']); //如果4个设置项都和上次一样,就直接返回 if(url === HdGame.wxConfigArg.url && HdGame.wxConfigArg.desc === desc && HdGame.wxConfigArg.callBack === callBack && HdGame.wxConfigArg.pyqUrl === pyqUrl){ return; } wx.ready(function () { // 1 判断当前版本是否支持指定 JS 接口,支持批量判断 var wxConfigShareImg = 'http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgnfifvQUo_qONoAcwyAE4yAE!160x160.png'; //wxConfigShareImg = 'https://ss0.bdstatic.com/-0U0bnSm1A5BphGlnYG/tam-ogel/99405539aa1591b7461fc73a5a7f1a1f_259_194.jpg'; if(!/^http:/.test(wxConfigShareImg) && /^\/\//.test(wxConfigShareImg)){ wxConfigShareImg = 'http:' + wxConfigShareImg; } try{ //分享朋友设置 wx.onMenuShareAppMessage({ title: decodeHtml('vivo教师节来啦!!!'), // 分享标题 desc: desc, // 分享描述 link: url, // 分享链接 imgUrl: wxConfigShareImg, // 分享图标 type: 'link', // 分享类型,music、video或link,不填默认为link /* dataUrl: '',*/ // 如果type是music或video,则要提供数据链接,默认为空 success: function () { $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setShareNum&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', error : function(){ if(m_debug){ alert( '服务繁忙,请稍候重试' ); } }, success : function(data){ if(!m_debug){ //统计分享 HdGame.logDog(1000004,5092); HdGame.logObjDog(1000092, 2, 1); HdGame.logDog(1000055,0); } handleShareAward(data); callBack && callBack(data); } }); }, cancel: function () { // 用户取消分享后执行的回调函数 //alert(url); } }); //分享朋友圈设置 wx.onMenuShareTimeline({ title: desc, link: pyqUrl, imgUrl: wxConfigShareImg+"xxxxx", success: function (res) { $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setShareNum&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', error : function(){ if(m_debug){ alert( '服务繁忙,请稍候重试' ); } }, success : function(data){ if(!m_debug){ //统计分享 HdGame.logDog(1000004,5092); HdGame.logObjDog(1000092, 2, 1); HdGame.logDog(1000055,1); } //alert(wxConfigShareImg); handleShareAward(data); callBack && callBack(data); } }); }, cancel: function (res) { //$("#sharePanel").hide(); }/*, fail: function (res) { alert(JSON.stringify(res)); }*/ }); HdGame.tlog('当前分享朋友链接:',url); HdGame.tlog('当前分享朋友圈链接:',pyqUrl); }catch(e){ alert(e.message); } }); HdGame.wxConfigArg.desc = desc; HdGame.wxConfigArg.url = url; HdGame.wxConfigArg.callBack = callBack; HdGame.wxConfigArg.pyqUrl = pyqUrl; } function setWxShareUrlArg(){ var argsArray = Array.prototype.slice.call(arguments); argsArray.unshift(HdGame.wxConfigArg.url); setWxShare(HdGame.wxConfigArg.desc,HdGame.setUrlArg.apply(HdGame,argsArray),HdGame.wxConfigArg.callBack); } function removeWxShareUrlArg(){ var argsArray = Array.prototype.slice.call(arguments); argsArray.unshift(HdGame.wxConfigArg.url); setWxShare(HdGame.wxConfigArg.desc,HdGame.removeUrlArg.apply(HdGame,argsArray),HdGame.wxConfigArg.callBack); } function setShareText(text){ text = text.replace(/​/g,'').replace(/ /g,' ').replace(/</g, '<').replace(/>/g, '>'); return text.replace(/<span class=["']tag["'] contenteditable=["']?false["']?>(.+?)<\/span>/g,function(match,$1){ switch($1){ case '玩家名称': return "河边走"; case '游戏成绩': return HdGame.currentScore; case '游戏排名': return HdGame.currentRank; case '奖品名称': return HdGame.currentAward; case '奖项等级': return HdGame.currentAwardStyle; case '收集的字': return '"'+HdGame.ccndrmTitle+'"'; } }); } function setWxShareByStatus(url,callBack,noOtherplayer){ if(false){ return; } typeof url === 'undefined' && (url = HdGame.wxConfigArg.url); typeof callBack === 'undefined' && (callBack = HdGame.wxConfigArg.callBack); if(true){ if(HdGame.currentAward){ setWxShare(setShareText(HdGame.decodeHtml('<span class="tag" contenteditable="false">玩家名称</span>已经在活动里赢得<span class="tag" contenteditable="false">奖品名称</span>,你也快来玩游戏赢大奖吧!')),url,callBack); }else if(HdGame.currentRank){ //url = noOtherplayer ? url : HdGame.setUrlArg(url,['otherplayer','o1ueSjgKEaUisGxQIjgMLIuikb6U']);//在setWxShare中统一加上openid setWxShare(setShareText(HdGame.decodeHtml('<span class="tag" contenteditable="false">玩家名称</span>以<span class="tag" contenteditable="false">游戏成绩</span>的成绩傲视群雄,你敢来挑战Ta赢取丰厚奖品吗?')),url,callBack) }else{ setWxShare(setShareText(HdGame.decodeHtml('轻轻松松就能抽到大奖,积攒多年的人品终于有用了,你也赶紧来抽奖吧!!')),url,callBack); } } } function handleShareAward(data){ var result = $.parseJSON(data); HdGame.tlog("shareaward",result.shareaward); if(result && result.shareaward){ drawTimesLimit += 1; if(true){ HdGame.resulePoup.resuleArg.count += 1; } $(".dayDrawCount").text(drawTimesLimit-count<0 ? 0:(drawTimesLimit-count)); g_config.showHelpGuide = false; } $("#helpGuideBox").hide(); } </script> <script type="text/javascript"> var _gameOver = false; HdGame.isReg = false; var GameArg = { createTime : 0.8, first : true }; (function(){ function Guard(x,y){ if(!x){ var xy = GetRandom(0,LF.global.width + LF.global.height + this.data.width); if(xy < LF.global.height/2){ x = -this.data.width; y = xy; }else if(xy < LF.global.height/2 + LF.global.width + this.data.width){ y = -this.data.height; x = xy - LF.global.height/2; }else{ x = LF.global.width; y = xy - LF.global.height/2 - LF.global.width - this.data.width; } } LF.base(this,LF.bitmap,[this.data.img[0],x,y,this.data.width,this.data.height]); this.frameInc = 0; this.speed = [0,0,0]; } Guard.prototype.slide = function(target){ this.gtype = 'slide'; this.speed[0] *= 2; this.speed[1] *= 2; this.bitmapData = this.data.simg; this.fps *= 2.5; this.slideR = 0; this.rotate = Math.atan(this.speed[1]/this.speed[0])*180/Math.PI - 90; if(this.speed[0] < 0){ this.rotate += 180; } }; Guard.prototype.update = function(delta,target){ if(this.x < -this.width || this.x > LF.global.width || this.y < -this.height || this.y > LF.global.height){ this.remove(); return; } if(this.gtype === 'trace'){ this.frameInc += this.fps*delta; this.bitmapData = this.data.img[~~this.frameInc % this.data.img.length]; this.speed = trace(this,target,this.speedm); if(this.speed[3] < this.limit[1]){ this.slide(); } }else if(this.gtype === 'slide' && getObjDistance(this,target)[2] < this.limit[0]){ return false; } this.x += this.speed[0]*delta; this.y += this.speed[1]*delta; }; hg.assets.onReady(function(){ var guard = hg.edit.getImgInfo('guard'); var forward = hg.edit.getImgInfo('forward'); var speedm = $(window).width()/1800; guard.img = [new LF.bitmapData(hg.assets[guard.path[0]]),new LF.bitmapData(hg.assets[guard.path[1]])]; guard.simg = new LF.bitmapData(hg.assets[guard.path[2]]); Guard.prototype.data = guard; Guard.prototype.speedm = speedm; Guard.prototype.fps = 2*speedm/guard.width; Guard.prototype.gtype = 'trace'; var r1 = Math.min(forward.width,forward.height); var r2 = Math.min(guard.width,guard.height); Guard.prototype.limit = [r1/3+r2/3,r1/2+r2/2+3*g_rem]; }); function Soccer(){ LF.base(this,LF.sprite,[true]); this.bgImg = new LF.bitmapData(hg.assets["http://7020498.h40.faiusr.com/4/86/ACgIABAEGAAgjuOfvQUon9SH2QYwgAU4wAw.png"]); this.bgImg.w = 16*g_rem; this.bgImg.h = this.bgImg.height*16*g_rem/this.bgImg.width; this.bgNum = Math.ceil(LF.global.height / this.bgImg.h) + 1; this.bg = new LF.sprite(); this.addChild(this.bg); this.gLayer = new LF.sprite(); this.addChild(this.gLayer); this.tishi = new LF.sprite(); this.addChild(this.tishi); this.initTishi(); var forward = hg.edit.getImgInfo('forward'); this.speed = $(window).width()/1800; this.forward = new LF.animation([new LF.bitmapData(hg.assets[forward.path[0]]),new LF.bitmapData(hg.assets[forward.path[1]])],null,2*this.speed/forward.width,'loop',0,0,forward.width,forward.height); this.forward.width = forward.width; this.forward.height = forward.height; this.addChild(this.forward); this.moveCD = 0; this.Limit = [[-forward.width/2,LF.global.width - forward.width/2],[0,LF.global.height - forward.height]]; for(var i = 1;i <= this.bgNum;i++){ this.bg.addChild(new LF.bitmap(this.bgImg,0,LF.global.height-this.bgImg.h*i,this.bgImg.w,this.bgImg.h)); } this.addEventListener(LF.event.ENTER_FRAME,this.update.bind(this)); LF.global.canvasObj.addEventListener('touchmove',this.moveEvent.bind(this),false); LF.global.canvasObj.addEventListener('touchstart',this.tapEvent.bind(this),false); }; Soccer.prototype.moveEvent = function(e){ if(_gameOver || !this._running){ return; } this.moveCD++; if(this.moveCD === 5){ this.moveCD = 0; return; } this.tapEvent(e,true); } Soccer.prototype.tapEvent = function(e,isMove){ if(_gameOver || !this._running){ return; } var touches = e.touches[0]; if(!isMove && touches.pageX > LF.global.width - 75 && touches.pageY < 80) return; e.stopPropagation(); e.preventDefault(); this.touches.x = touches.pageX; this.touches.y = touches.pageY; } Soccer.prototype.update = function(){ if(_gameOver || !this._running) return; if(Soccer.locking){ hg.time.start(); Soccer.locking = false; }else{ clearTimeout(this.lockTimer); } var delta = LF.global.delta; for(var i = 0;i < this.gLayer.childList.length;i++){ var guard = this.gLayer.childList[i]; if(guard.update(delta,this.forward) === false){ this.stop(); clearTimeout(this._timer); hg.sound.play(1); endGame(); return; } } this.forward.speed = trace(this.forward,this.touches,this.speed*2,true); if(this.forward.speed[1] > 0){ this.forward.speed[0] *= 1.5; this.forward.speed[1] *= 1.5; } this.forward.x += this.forward.speed[0]*delta; this.forward.y += this.forward.speed[1]*delta; this.bg.y += this.speed*delta; if(this.bg.y > this.bgImg.h){ this.bg.y -= this.bgImg.h; } if(this.forward.x < this.Limit[0][0]){ this.forward.x = this.Limit[0][0]; }else if(this.forward.x > this.Limit[0][1]){ this.forward.x = this.Limit[0][1]; } if(this.forward.y < this.Limit[1][0]){ this.forward.y = this.Limit[1][0]; }else if(this.forward.y > this.Limit[1][1]){ this.forward.y = this.Limit[1][1]; } this.forward.fps = 2*(this.forward.speed[2] + this.speed)/this.forward.width; this.lockTimer = setTimeout(function(){ hg.time.pause(); Soccer.locking = true; },600); } Soccer.prototype.initTishi = function(){ var maskObj = new LF.bitmap(new LF.bitmapData("#000",0,0,LF.global.width,LF.global.height)); maskObj.alpha = 0.8; this.tishi.underGraphics = true; this.underGraphics = true; this.tishi.addChild(maskObj); LF.global.canvas.font = "bold " + 1*g_rem + "px Arial"; LF.global.canvas.textAlign = "center"; LF.global.canvas.fillStyle = "#fff"; this.tishi.graphics.add(function(){ LF.global.canvas.fillText("长按并拉动角色",LF.global.width/2,4*g_rem); LF.global.canvas.fillText("进行移动",LF.global.width/2,5.5*g_rem); }); this.tishi.visible = false; $('.gameBox .soundIcon').css('z-index',200); } Soccer.prototype.showTishi = function(){ var s = this; this.tishi.visible = true; $('#gameLayerBox').css('z-index',202); this.forward.bitmap.bitmapData = this.forward.bitmapList[0]; this.graphics.drawRoundRect(0.05*g_rem,"#fff", [5*g_rem, 16*g_rem, 6*g_rem, 2*g_rem,0.2*g_rem]); this.graphics.add(function(){ LF.global.canvas.fillText("我知道了",LF.global.width/2,17.3*g_rem); }); LF.global.canvasObj.addEventListener('touchstart',function(e){ var x = e.touches[0].pageX, y = e.touches[0].pageY; if(x >= 5*g_rem && x <= 11*g_rem && y >= 16*g_rem && y <= 18*g_rem){ s.tishi.visible = false; hg.time.start(); s.run(); s.difficulty(); setTimeout(s.play.bind(s),1000); s.graphics.clear(); $('#gameLayerBox').css('z-index',200); LF.global.canvasObj.removeEventListener('touchstart',arguments.callee); } },false); } Soccer.prototype.init = function(){ this.first = true; this.forward.x = LF.global.width/2 - this.forward.width/2; this.forward.y = 9.6*g_rem; this.touches = {width:0,height:0,x:LF.global.width/2,y:this.forward.y + this.forward.height/2}; this.forward.speed = [0,0,0]; this.gLayer.removeAllChild(); this._timerIndex = 0; clearTimeout(this._timer); clearTimeout(this.playTimer); if(!HdGame.isplaySucess){ this.showTishi(); this.stop(); }else{ hg.time.start(); this.run(); this.difficulty(); setTimeout(this.play.bind(this),1000); } } Soccer.prototype.difficulty = function(){ this.createTime = 4000; this.guardNum = ~~(3 + this._timerIndex*0.5); this.createTime = 4000 - 500*this._timerIndex; this._timerIndex++; this._timer = setTimeout(arguments.callee.bind(this),10000); } Soccer.prototype.run = function(){ this._running = true; this.forward.play(); } Soccer.prototype.stop = function(){ this._running = false; this.forward.stop(); clearTimeout(this._timer); clearTimeout(this.playTimer); } Soccer.prototype.addGuard = function(){ for (var i = 0; i < this.guardNum; i++) { if(this.gLayer.childList.length > Math.min(this.guardNum*2,16)){ return; } this.gLayer.addChild(new Guard()); } } Soccer.prototype.play = function(){ if(hg.time.isRunning()){ this.addGuard(); } this.playTimer = setTimeout(arguments.callee.bind(this),this.createTime); } function initCanvas(){ LF.global.notMouseEvent = true; LF.init(0,"gameLayerBox",0,0,initGame,LF.event.INIT); } function initGame(){ GameArg.soccer = new Soccer(); startGame(); GameArg.first = false; $('#gameBgBox').remove(); } function endGame(){ _gameOver = true; hg.time.end(); LF.tweenLite.removeAll(); LF.tweenLite.to(GameArg.soccer.forward,0.1,{alpha:0}) .to(GameArg.soccer.forward,0.1,{alpha:1}) .to(GameArg.soccer.forward,0.1,{alpha:0}) .to(GameArg.soccer.forward,0.1,{alpha:1}) .to(GameArg.soccer.forward,0.1,{alpha:0}) .to(GameArg.soccer.forward,0.1,{alpha:1}) .to(GameArg.soccer.forward,0.1,{alpha:0}) .to(GameArg.soccer.forward,0.1,{alpha:1, onComplete : function(){ LF.global.setPauseLoop(true);; gameOver(hg.time.val); } }); } function trace(self,target,speedm,flag){ var d = getObjDistance(self,target); if(d[2] < 10){ return [0,0,0]; } if(flag){ speedm *= d[2]/(5*g_rem) + 0.2; return [speedm*d[0]/d[2],speedm*d[1]/d[2],speedm]; }else{ return [speedm*d[0]/d[2],speedm*d[1]/d[2],speedm,d[2]]; } } function getObjDistance(self,target){ var dx = ~~(target.x + target.width/2 - self.x - self.width/2); var dy = ~~(target.y + target.height/2 - self.y - self.height/2); return [dx,dy,getDistance(dx,dy)]; } function getDistance(x,y){ return Math.sqrt(x*x + y*y); } function GetRandomNum(a,b){ return a+Math.round(Math.random()*(b-a)); } function GetRandom(a,b){ return a+Math.random()*(b-a); } $(function(){ gameInit(); if(!_manage){ $('#gameTopBar').css('pointer-events','none'); hg.showGameBox = false; hg.on('startGame',function(){ $('.gameBox').css('visibility','hidden').show(); if(typeof hg.sound.cache[0] !== 'undefined' && typeof hg.sound.cache[0].playing !== 'undefined' && !hg.sound.cache[0].playing){ hg.sound.readyPlay(0,0,'loop'); } if(GameArg.first){ initCanvas(); }else{ startGame(); } }); } $('.gameBox').on('touchmove',function(event){ event.preventDefault(); event.stopPropagation(); }); }); })(); function startGame(){ window.scrollTo(0,0); LF.global.setPauseLoop(false);; GameArg.soccer.init(); _gameOver = false; $('.gameBox').css('visibility','visible'); $('#ruleImg').hide(); $('.homeBtnBox').hide(); $('.footerBox').hide(); $('.home').hide(); } function gameInit() { hg.time.init(); $('.timeUpImg').hide(); } function home(){ $('#ruleImg').show(); $('.homeBtnBox').show(); $('.footerBox').show(); $('.gameBox').hide(); startBtnDelay(); $('.home').show(); $('#poupInfoBox').hide(); $('.resuleBox').hide(); gameInit(); hg.fire('home'); } function gameRestart() { $('.gameBox').show(); gameInit(); if(!_manage){ startGame(); } hg.fire('again'); } function showGamePage(){ $('#ruleImg').hide(); $('.homeBtnBox').hide(); $('.footerBox').hide(); $('.home').hide(); $('#poupInfoBox').hide(); $('.resuleBox').hide(); $('.gameBox').show(); } </script> <script type="text/javascript"> var drawTimesLimit = 1; var drawTotalLimit = 6; var totalCount = 0; var isLimitDraw = false; var otherPlayerInfo = {"score":"1.73","rank":15,"headImg":"http://wx.qlogo.cn/mmopen/6KGMqCkBqg4lJ8Im9Bd6XGiczIya7HXQh35zkFlwCEvTwXeo4RzE4vsEa61X7EDs3xibNt97LGxksrxoLLmb9RYKoOOxt0YIlQ/0","name":"我是007","award":"","aid":11019180,"gameId":1,"openId":"o1ueSjk8HBy5NRRap0tc_D3veg-E"}; var showAwardList = false; var informNum = 0; var playerAwardList = []; var count = 0; var skillSupportType = 2; var skillName = HdGame.decodeHtml('凡科互动'); var skillLink = HdGame.decodeUrl(HdGame.decodeHtml('http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMjM5MTk5MjI3OA%3D%3D%26mid%3D209854000%26idx%3D1%26sn%3D82241d924839270d3ea820ad2d56c01b%23wechat_redirect')); var gameType = 0; var userInfo = { headImg:'http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0', userName: "河边走", showStyle : 1 } var isPublish = false; var rankShowNum = 100; if(true){ isPublish = true; } initChangePoup(); //初始化弹出层参数 function initChangePoup(){ HdGame.initChangePoup({ rankUrl : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=getRankList&aid=11019180&gameId=1&style=38&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', awardUrl : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=getGiftList&aid=11019180&style=38', getRegAwardUrl : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=getRegAwardList&aid=11019180&gameId=1&style=38&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', openId : 'o1ueSjgKEaUisGxQIjgMLIuikb6U', gameId : 1, mhaveScore : (true && gameType != 3), informUrl : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setInformNum&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', hasReport : false, afterWxCard : true }); } HdGame.resulePoup.init({ drawType : 1, checkRegUrl:'//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=checkRegNum&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', regUrl : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setPlayerReg&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U&flag1=true', home : typeof home !== 'undefined' ? home : null, again : typeof gameRestart !== 'undefined' ? gameRestart : null, giftInit : luckDraw }); $(function(){ //根据setting初始化页面设置 HdGame.unPublishMsg(); if(true){ //奇葩BUG,魅蓝note如果不加未发布条玩游戏会一直抖, $('.unPublish').css('top',-2 + 'rem'); //目前找不到原因,只能发布之后也出现未发布条, } //然后将top设为负数使其隐藏 var hostName = HdGame.decodeHtml('鄢陵vivo专卖店'); var hostLink = HdGame.decodeHtml('http://www.鄢陵vivo专卖店.com').replace('http://',''); //统一去掉,在地址栏统一拼接 var menuLink = HdGame.decodeHtml('http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg58W6vgUoy-W51wIwrgM4rgM.jpg').replace('http://',''); var menuName = $('.menuName'); if(false){ $("#resulte-gift-showMyAward").data("openCode",'null'); showAwardDetail4Draw(); } $('#showRankNum').text(rankShowNum); $('.hostName').text(hostName); $('#phoneInput,#nameInput').on("input",function(){ var name = $.trim( $('#nameInput').val() ); var phone = $('#phoneInput').val(); var userSubmitBtn = $('#userSubmitBtn'); /*if(name.length == 0 || name.length > 10 || phone.length == 0 || /[^\d]/.test(phone)){ userSubmitBtn.removeClass('submit'); }else if(!userSubmitBtn.hasClass('submit')){ userSubmitBtn.addClass('submit'); }*/ }).click(function(){ $('#spxdPage').addClass('spxdPageHide'); }); $('#userSubmitBtn').on('touchstart',function(){ if(!$(this).hasClass('submit')){ return; } var name = $.trim( $('#nameInput').val() ); var phone = $('#phoneInput').val().replace(/\s/g,""); //var phone = $('#phoneInput').val(); var address = $.trim( $('#addressInput').val() ); if( $('#nameInput').is(":visible")){ if(name.length == 0){ HdGame.showMsgToast("请输入姓名",2000,'msg-toastBig'); return; } if(HdGame.checkCharacterLen(10,$('#nameInput'))){ HdGame.showMsgToast("姓名不能超过5个中文或10个英文字母",2000,'msg-toastBig'); return; } g_config.isRegUserName = true; } if( $('#phoneInput').is(":visible")){ var reg = /^[0-9]*$/; if(phone.length == 0){ HdGame.showMsgToast("请输入联系电话",2000,'msg-toastBig'); return; } if(phone.length > 11 || !reg.test(phone)){ HdGame.showMsgToast("请输入正确的号码",2000,'msg-toastBig'); return; } g_config.isRegPhone = true; } if( $('#addressInput').is(":visible")){ if(address.length == 0){ HdGame.showMsgToast("请输入联系地址",2000,'msg-toastBig'); return; } if(HdGame.checkCharacterLen(200,$('#addressInput'))){ HdGame.showMsgToast("联系地址不能超过100个中文或200个英文字母",2000,'msg-toastBig'); return; } g_config.isRegAddress = true; } name = name ? name : ''; phone = phone ? phone : ''; address = address ? address : ''; g_config.awardUsername = name; g_config.awardPhone = phone; g_config.awardAddress = address; //排名型游戏因为设置成绩前db里还没有玩家纪录,故把联系信息在提交成绩时一起设 if(gameType == 3){ HdGame.aUserInfo.hide(); return; } $('.ajaxLoadBg').show(); $('.ajaxLoadBar').addClass('ajaxLoad'); $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setPhone&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U&phone='+phone+'&ausername='+name+'&address='+address, error : function(){ HdGame.otherAjaxComplete(); $('#spxdPage').removeClass('spxdPageHide'); }, success : function(data){ $('#spxdPage').removeClass('spxdPageHide'); var result = $.parseJSON(data); HdGame.otherAjaxComplete(); $('#awardUserInfoBg').hide(); if(result.success){ if(true){ HdGame.aUserInfo.hide(); } } } }); }); $('#userCancelBtn').on('touchstart',function(){ event.preventDefault(); event.stopPropagation(); $('#awardUserInfoBg').hide(); $('#spxdPage').removeClass('spxdPageHide'); $('.safetyBg').hide(); if(gameType == 3){ home(); } }); $('.resule-status-send').on('touchstart',function(){ if(_manage){ return; } if(g_config.haveAward){//已经中奖 HdGame.changePoup(3); }else{ luckDraw(); } }); $('#helpGuideBox').on('touchend',function(){ $('#helpGuideBox').hide(); }); //礼品弹出层初始化 $('#awardInfo').on('click','.codeInfoBox',HdGame.openAwardDetail); $('#resulte-gift-showMyAward').on('touchstart',showAwardDetail4Draw); $('.awardCloseIcon').on('touchstart',function(){ removeWxShareUrlArg('fromFav'); $('#awardDetailBox').hide(); $('#resule-gift-box,resule-status-box').hide(); $('.gameBox').add('.home').removeClass('overflow-y-hidden'); true && $('.bottomSkill').show(); }); $('.codeImg').on('click',function(){ $('.codeDetailImgBox').show(); }); $('.codeDetailImgBox').click(function(){ $(this).hide(); }); $('.awardCusText').on('touchstart',function(){ if(true){ $('#ticketDetailBox').show(); }else{ var awardCusTextInfo = $('#awardCusTextInfo'); if(awardCusTextInfo.css('display') == 'block'){ $(this).find('.awardDeailIcon').removeClass('awardIncoSlideDown'); $(this).find('.awardDeailIcon').addClass('awardIncoSlideUp'); }else{ $(this).find('.awardDeailIcon').removeClass('awardIncoSlideUp'); $(this).find('.awardDeailIcon').addClass('awardIncoSlideDown'); } awardCusTextInfo.slideToggle(); } }); $('.ticketitle .closeBtn').on('touchstart',function(){ $('#ticketDetailBox').hide(); }) if(true){ $('.resule-fxts').hide(); } true && g_config.showSkillSup && HdGame.logDog(1000028,0); if(false && g_config.showSkillSup){ HdGame.logDog(1000062,2); }else if(false && g_config.showSkillSup){ HdGame.logDog(1000067,2); } if(false){ $('.home,.showBottomSkillPage').append('<div class="bottomSkill skillInfo">本游戏由 <span class="yySkill" style="text-decoration:underline;">凡科互动</span> 提供</div>'); $('.yySkill').click(function(){ $('#yyAttentionMask').show(); }); }else{ if(false){ $('.home,.showBottomSkillPage').append('<div class="bottomSkill skillInfo">游戏技术由 <a href="http://mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#rd">凡科互动</a> 提供</div>'); }else if(true){ $('.home,.showBottomSkillPage').append('<div class="bottomSkill skillInfo">游戏技术由 凡科互动 提供</div>'); } } _manage && $('a').on('click',function(){ return false; }); $('.homePoupMask').on('touchend',function(event){ event.preventDefault(); event.stopPropagation(); if(_manage){ return; } if($(event.target).hasClass('homePoupMask')){ $(this).hide(); } }); $('.menuBtnBox').on('touchend',function(){ HdGame.logDog(1000012); }); if(true){ $('#joinNumLine').show(); }else{ $('#joinNumLine').hide(); } if(false){ $('#Award_Round_Dot').css('display','inline-block'); } if(false){ $('#Mingdan_Round_Dot').css('display','inline-block'); } if(false){ $('#myAwardBtn').show(); } if(false){ $('#selfAwardLine').show(); $('#awardLineBox').hide(); }else{ $('#awardLineBox').show(); $('#selfAwardLine').hide(); } if(!true){ $('.skillInfo').hide(); } if(false){ $('.menuBtnBox').hide(); }else if(false){ if($.trim(menuLink).length == 0){ menuName.css('text-decoration','none'); //menuName.attr('href','#'); }else{ menuName.attr('href',HdGame.decodeHtml('http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg58W6vgUoy-W51wIwrgM4rgM.jpg')); } }else if(true){ (function(){ var attentionMask = $('#attentionMask'); if(HdGame.decodeHtml('http://11019180.h40.faiusr.com/2/1/ACgIABACGAAg58W6vgUoy-W51wIwrgM4rgM.jpg') === ''){ $('#QRImg').remove(); } $('.menuBtnBox').on('touchend',function(){ attentionMask.show(); }); })(); } if($.trim(hostLink).length == 0){ $('.hostName').css('text-decoration','none'); $('a.hostName').attr('href','#'); } //总抽奖次数显示逻辑 if(true){ $('.totalDraw').hide(); }else{ $('.totalDraw').show(); $('.dayDraw').hide(); if(true){ $('.dayDraw4Total').show(); } } if($('#awardExplain').text().length == 0){ $('#awardExplain_h').hide(); } $('a.hostName').click(function(){ HdGame.logDog(1000013); }); if(skillSupportType == 1){ $('.skillLine').css('padding','0'); $('.skillCont').hide(); }else if(skillSupportType == 3){ $('.skillName').text(skillName); $('.skillName').attr('href',skillLink); } if(skillSupportType != 3 || skillLink.indexOf('mp.weixin.qq.com/s?__biz=MjM5MTk5MjI3OA==&mid=209854000&idx=1&sn=82241d924839270d3ea820ad2d56c01b#wechat_redirect') >= 0 ){ $('.skillName').click(function(){ if(_manage) return; HdGame.logDog(1000013); if(!g_config.buy){ HdGame.logDog(1000070,1); }else{ HdGame.logDog(1000070,3); } $('#skillSupMask').show(); return false; }); } $('.skillInfo a').click(function(){ if(_manage){ return; } HdGame.logDog(1000005,0); if(!g_config.buy){ HdGame.logDog(1000070,0); }else{ HdGame.logDog(1000070,2); } if(false){ $('#yyAttentionMask').show(); return false; }else if(true){ $('#skillSupMask').show(); return false; } }); //音乐图标插入游戏位置 $('.home').add('.gameBgBox').append('<div class="soundIconOff soundIcon" style="z-index:90"></div>'); $('.home .soundIcon:not(".soundIconPlay")').css({ "left":'0.75rem', "top":'1rem' }); $('.home .soundIcon').hide(); (function(){ $('.gameBgBox .soundIcon').css('z-index','100'); $('.soundIcon').addClass('soundIconPlay'); //音乐图标点击事件 var soundPauseCord = 'soundPause|11019180|1|o1ueSjgKEaUisGxQIjgMLIuikb6U'; $('.soundIcon').on('touchstart',function(){ var self = $('.soundIcon'); if(!self.hasClass('soundIconOff')){ //关闭音乐 hg.sound.allowPlay = false; hg.sound.pauseAll(); HdGame.setLocalStorage(soundPauseCord,'-'); }else{ hg.sound.allowPlay = true; hg.sound.readyPlay(0,0,'loop'); HdGame.setLocalStorage(soundPauseCord,''); } }); if(HdGame.getLocalStorage(soundPauseCord)){ hg.sound.allowPlay = false; hg.sound.pauseAll(); } $('#ruleImg').addClass('ruleImgAnimate'); $('#startBtnImg,.startBtnImg').on('touchend',function(event){ if(false){ HdGame.statusMsg('你有疑似作弊行为,已被列入黑名单',''); return; } hg.sound.play("startButton"); if(typeof hg.sound.cache[0] !== 'undefined' && typeof hg.sound.cache[0].playing !== 'undefined' && !hg.sound.cache[0].playing){ hg.sound.readyPlay(0,0,'loop'); } startBtnAjax.call(this,event); }); })(); }); //标题与开始按钮动画 function startBtnDelay(){ $('.titleImg').removeClass('titleDown').addClass('titleDown'); $('#startBtnImg').removeClass('startTada'); hg.sound.pauseAll(); setTimeout(function(){ $('#startBtnImg').addClass('startTada'); },1000); //HdGame.tlog("nowIPInfo",{"ip":"124.116.201.172","contry":"中国","provice":"陕西省","city":"宝鸡市","area":"西北","isp":"电信"}); } $(function(){ if(_manage){ startBtnDelay(); }else{ hg.assets.onload(startBtnDelay); } }) /*----------------PK环节--------------------*/ function createPK(){ $(".one").hide().siblings().show(); $("#resule-status-box").show(); $("#resule-status-head p").show(); $(".resuleBox").show(); $(".resule-bgLight").hide(); $("#resule-status-ribbon").hide(); $(".little-PK").show().siblings().hide(); $(".resule-status-again").hide(); $(".resule-status-home").hide(); $(".resule-status-rightNow").show().siblings().hide(); $(".resule-status-firstPage").show(); } function finishPK(){ $("#resule-status-box").hide(); $("#resule-status-head p").hide(); $(".resuleBox").hide(); $(".resule-bgLight").show(); $("#resule-status-ribbon").show(); $(".little-PK").hide().siblings().show(); $(".resule-status-again").show(); $(".resule-status-home").show(); $(".resule-status-rightNow").hide().siblings().show(); $(".one").show().siblings().hide(); $("#resule-status-ribbon").show(); $(".resule-status-firstPage").hide(); } $(function(){ $(".one").show(); $(".resule-status-firstPage").hide(); if(true && !_manage && otherPlayerInfo && typeof otherPlayerInfo.headImg !== "undefined" && typeof otherPlayerInfo.name !== "undefined" && typeof otherPlayerInfo.score !== "undefined" && typeof otherPlayerInfo.rank !== "undefined" && typeof otherPlayerInfo.award !== "undefined"){ var crrPkrecord = 'PKrecord|' + otherPlayerInfo.aid + '|' + otherPlayerInfo.gameId + '|' + otherPlayerInfo.openId; if(!HdGame.getLocalStorage(crrPkrecord)){ if(otherPlayerInfo.award != ""){ $(".WhetherAward").text("获得"+otherPlayerInfo.award).show(); } $(".PKner-A img").attr("src",otherPlayerInfo.headImg); $(".userA-name").text(otherPlayerInfo.name); $(".fighter-B").text(otherPlayerInfo.name); $(".othergrade .resuleArg").text(otherPlayerInfo.score); $("#rankB .resuleArg").text(otherPlayerInfo.rank); createPK(); //每次进入PK页面都会设置cookie HdGame.setLocalStorage(crrPkrecord,'-'); } } $(".winAWard a").on("touchend",function(){ showRule(); }); $(".resule-status-rightNow").on("touchend",function(){ hg.on('startGame',function(){ finishPK(); hg.off('startGame',arguments.callee); }); $("#startBtnImg").trigger("touchstart"); $("#startBtnImg").trigger("touchend"); }); $(".resule-status-firstPage").on("touchend",function(){ finishPK(); }); }); //礼品轮播 function setStartBtnHeight(flag1,flag2){ var windowH = $(window).height(); if(windowH === 0){ console.log('window高度为零!'); setTimeout(function(){ setStartBtnHeight(flag1,flag2); },20); return; } typeof flag1 === 'undefined' && (flag1 = false); typeof flag2 === 'undefined' && (flag2 = true); var slideStatus = flag1?1:0; var skillStatus = flag2?1:0; var bottomFixed = $('.bottomSkill').outerHeight()*skillStatus + $('.showAwardBox').outerHeight()*slideStatus; var startBtnImg = $('#startBtnImg').parent(); var ruleImg = $('#ruleImg'); var joinNumLine = $('#joinNumLine'); var drawInfo = $('#drawInfo'); var homeBtnBox = $('.homeBtnBox'); var gameTips = $('#gameTips'); //铁人三项玩法提示 var eleTop = parseInt(startBtnImg.css('top')) + startBtnImg.outerHeight(); var eleTop1 = parseInt(joinNumLine.css('top')) + joinNumLine.outerHeight(); var eleTop2 = parseInt(drawInfo.css('top')) + drawInfo.outerHeight(); var eleTop3 = parseInt(ruleImg.css('top')) + ruleImg.outerHeight(); var eleTop4 = parseInt(gameTips.css('top')) + gameTips.outerHeight(); if(startBtnImg.length > 0 && eleTop > windowH - bottomFixed){ startBtnImg.css('top',(windowH - bottomFixed - startBtnImg.outerHeight() - 5)/g_rem + 'rem'); } if(ruleImg.length > 0 && eleTop3 > windowH - bottomFixed){ ruleImg.css('top',(windowH - bottomFixed - ruleImg.outerHeight() - 5)/g_rem + 'rem'); } if(joinNumLine.length > 0 && eleTop1 > windowH - bottomFixed){ joinNumLine.css('top',(windowH - bottomFixed - joinNumLine.outerHeight() - 5)/g_rem + 'rem'); } if(drawInfo.length > 0 && eleTop2 > windowH - bottomFixed){ drawInfo.css('top',(windowH - bottomFixed - drawInfo.outerHeight() - 5)/g_rem + 'rem'); } if(homeBtnBox.length > 0){ homeBtnBox.css('bottom', (bottomFixed + 8)/g_rem + 'rem'); } if(gameTips.length > 0 && eleTop4 > windowH - bottomFixed){ gameTips.css('top',(windowH - bottomFixed - gameTips.outerHeight() - 5)/g_rem + 'rem'); } $('#limitRange').css('height',($(window).height()-bottomFixed)/g_rem + 'rem'); } $(function(){ function sortBy(name){ //给数组里的对象按某个key的值排序 return function(o, p){ var firstItem, secondItem; if (typeof o === "object" && typeof p === "object" && o && p){ firstItem = o[name]; secondItem = p[name]; if (firstItem === secondItem) {return 0;} if (typeof firstItem === typeof secondItem) { return firstItem < secondItem ? -1 : 1;} return typeof firstItem < typeof secondItem ? -1 : 1; } } } if(_manage){ $('.home,.showAwardBoxPage').append('<div class="showAwardBox"><ul class="awardInfoList"><li>'+ '<div><img src="http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0"><span class="winner">范女神<span>获得了<span class="award">100元优惠券</span></div>'+ '<div><img src=""><span class="winner">小星儿<span>获得了<span class="award">50元优惠券</span></div>'+ '<div><img src=""><span class="winner">LVYD<span>获得了<span class="award">30元优惠券</span></div>'+ '<div><img src=""><span class="winner">萌妹子<span>获得了<span class="award">10元优惠券</span></div>'+ '</li></ul></div>'); $('#skillLine').css('min-height','1rem'); }else if(!_manage && playerAwardList.length > 3){ playerAwardList.sort(sortBy("awardLevel")); $('.home,.showAwardBoxPage').append('<div class="showAwardBox"><ul class="awardInfoList"><li></li></ul></div>'); var awardList = ''; $.each(playerAwardList,function(index,value){ awardList += '<div><img src="'+ JSON.parse(this.info).headImg +'"><span class="winner">'+this.name+'<span>获得了<span class="award">'+this.award+'</span></div>'; }); $('.awardInfoList li').append(awardList); } if(!_manage){ $('.showAwardBox').awardSlide({'margin_right':'0.8rem','speed': 15 }); if(1 == 0){ if(false){ var bottomSkill = $('.bottomSkill'); var flag = $(window).height()/$(window).width() < 1.575; var bgHeight = flag ? $(window).width()*1.575 : $(window).height(); $('.home').html(''); $('.home').append(bottomSkill); $('.home').append('<p style="font-size:0.9rem; color:#e7e7e7; text-align: center; padding-top:10rem; line-height: 1.3rem">活动已结束<br>请期待下次活动</p>'); $('.home').css({'height':bgHeight,'background':'#424242','width':'100%'}); document.title = '活动已结束'; $('.gameInfoBox').hide(); $('.showAwardBox').hide(); hg.sound.allowPlay = false; hg.sound.pauseAll(); } } } setTimeout(function(){ var flag = $(window).height()/$(window).width() < 1.575; var bgHeight = flag ? $(window).width()*1.575 : $(window).height(); var skillStatu = true?1:0; if(_manage){ $('.showAwardBox').css("top",(bgHeight - $('.bottomSkill').outerHeight()*skillStatu-$('.showAwardBox').outerHeight()-2)/g_rem + 'rem'); }else{ $('.showAwardBox').css("top",(bgHeight - $('.bottomSkill').outerHeight()*skillStatu-$('.showAwardBox').outerHeight())/g_rem + 'rem'); } if(true){ $('.showAwardBox').css("top",(bgHeight - $('.bottomSkill').outerHeight()*skillStatu-$('.showAwardBox').outerHeight()-2)/g_rem + 'rem'); } },50); if(!false){ $('.showAwardBox').hide(); }else if(!_manage){ $('.showAwardBox').addClass('footerBox'); } }); //公共函数 /* $('#jv_share_btn').click(function(){ $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setShareNum&aid=11019180&gameId=1&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', error : function(){ if(m_debug){ alert( '服务繁忙,请稍候重试' ); } }, success : function(data){ if(!m_debug){ //统计分享 HdGame.logDog(1000004,5092); HdGame.logDog(1000055,1); } } }); }); */ //抽奖结果页或收藏卡劵的显示兑奖详细页 function showAwardDetail4Draw(){ home(); HdGame.changePoup(3); } function setAwardImgHeight(){ $('#resule-gift-foot').css("margin-top",($('#resule-gift-sucImg').height()+35)/g_rem + 'rem'); } function showRank(){ HdGame.changePoup(1); $('#awardDetailBox').hide(); } function showRule(){ if(false){ HdGame.changePoup(3); }else{ HdGame.changePoup(2); } $('#awardDetailBox').hide(); } function startBtnAjax(event){ if(false){ HdGame.statusMsg(2); hg.sound.allowPlay = false; hg.sound.pauseAll(); return; } //限制参与地区逻辑 /*if(false && g_config.ipInfo){ var areaLimit_province = '-1'.split(':'); var areaLimit_city = '-1'.split(':'); var now_province = g_config.ipInfo.province; var now_city = g_config.ipInfo.city; if( areaLimit_province[0] != "-1" && now_province){ if( areaLimit_city[0] != "-1" && now_city ){ if( now_city.indexOf(areaLimit_city) == -1 ){ HdGame.statusMsg("该活动限制地区",'该活动仅限'+areaLimit_city[1]+'地区的用户参与'); } }else{ if( now_province.indexOf(areaLimit_province) == -1 ){ HdGame.statusMsg("该活动限制地区",'该活动仅限'+areaLimit_province[1]+'地区的用户参与'); } } return; } }*/ var that = this; if(!hg.fireWith('startGamehead',that,[event])){ return; } if(false){ HdGame.statusMsg("活动尚未发布",'最多测试人数为100人!'); if(typeof startStatus !== 'undefined'){ startStatus = true; } return; } if(true){ if(hg.showGameBox){ $('.homeBtnBox').hide(); $('.footerBox').hide(); $('.home,#ruleImg').hide(); $('.gameBox').show(); if(typeof hg.sound.cache[0] !== 'undefined' && typeof hg.sound.cache[0].playing !== 'undefined' && !hg.sound.cache[0].playing){ hg.sound.readyPlay(0,0,'loop'); } } HdGame.logDog(1000002, 5092); HdGame.logObjDog(1000092, 1, 1); hg.fireWith('startGame',that,[false,event]); }else{ HdGame.statusMsg("该游戏已超过最大参与人数!"); } } function gameOver(_gameScore,callBack,option){ if(_gameScore === 'fail'){ setTimeout(function(){ HdGame.resulePoup.show({ isSuc:false, gameScore:"fail",//闯关失败 minScore:15, bestScore:'无', isReg:HdGame.isReg, //是否报名 gameType:gameType, rank:0, count:drawTimesLimit-count<0 ? 0:(drawTimesLimit-count), isLimitDrawTotal:false, totalCount: drawTotalLimit - totalCount < 0 ? 0 : (drawTotalLimit - totalCount) }); },900); return; } if(isNaN(_gameScore) || _gameScore < 0){ _gameScore = 0; } if(gameType == 3 && g_config.openAwardLinkNoDraw && !g_config.isRegUserName && !g_config.isRegPhone && !g_config.isRegAddress){ HdGame.aUserInfo.show(arguments,this); if(g_config.contactNoDraw && $.parseJSON(g_config.contactNoDraw)[0] != -1){ $('#awardUserInfoBox .contactInput').hide(); $.each(g_config.contactNoDraw,function(index,value){ $('#awardUserInfoBox .contactInput').eq(value).show(); }) }else{ $('#addressInput').hide(); } return; } $('.ajaxLoadBg').show(); $('.ajaxLoadBar').addClass('ajaxLoad'); var _gameScoreStr = _gameScore + ''; if(true){ _gameScoreStr = changeTwoDecimal_f(_gameScore); } var info = {headImg : "http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0"}; g_config.awardUsername && (info.ausername = g_config.awardUsername); g_config.awardPhone && (info.aphone = g_config.awardPhone); g_config.awardAddress && (info.aadress = g_config.awardAddress); var params = {}; params.gameId = 1; params.style = 38; params.achieve = HdGame.encodeBase64('"'+_gameScoreStr+'"') + $.md5(11019180); params.openId = "o1ueSjgKEaUisGxQIjgMLIuikb6U"; params.name = "河边走"; params.info = $.toJSON(info); params.awardInfoB = g_config.awardInfoB; $.extend(params,option); $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=setAchieve&aid=11019180&playerId='+g_config.playerId, data : params, error : function(){ HdGame.otherAjaxComplete(); $('#timeUpImg,.timeUpImg').removeClass('tada'); callBack && callBack({ rt:-999, msg:"ajax返回错误" }); HdGame.tlog($.toJSON(arguments)); }, success : function(data){ HdGame.tlog(data); var r = $.parseJSON(data); var isShowPoup = true; HdGame.otherAjaxComplete(); if(r.rt == 0){ var arg={ isSuc:r.isSuc, gameScore:_gameScoreStr, minScore:15, bestScore:r.score, isReg:HdGame.isReg, //是否报名 gameType:gameType, rank:r.rank, beat:r.beat, count:drawTimesLimit-count<0 ? 0:(drawTimesLimit-count), isLimitDrawTotal:false, totalCount: drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount), isEqualDraw:false }; setTimeout(function(){ var callBackArg = {rt:r.rt,msg:r.msg,arg:arg,pId:r.playerId} g_config.playerId = r.playerId; if(false){ callBackArg.infoList = r.infoList; callBackArg.arg = arg; } callBack && (isShowPoup = callBack(callBackArg)); $('#timeUpImg,.timeUpImg').removeClass('tada'); isShowPoup !== false && HdGame.resulePoup.show(arg); },900); }else if(r.rt == 11){ alert("已被检测到有作弊行为,再次被检测将永久禁止参与本游戏!"); }else if(r.rt == 12){ alert("由于作弊行为,该微信号已永久禁止参与本游戏!"); }else if(r.rt == 23){ HdGame.statusMsg("游戏已结束。"); }else{ callBack && (isShowPoup = callBack({rt:r.rt,msg:r.msg})); isShowPoup !== false && HdGame.resulePoup.show(); return; } if(r.rt !== 0){ callBack && callBack({rt:r.rt,msg:r.msg}); } } }); params = info = option = null; function changeTwoDecimal_f(x) { var f_x = parseFloat(x); if (isNaN(f_x)) { alert('function:changeTwoDecimal arguments error'); return x; } var f_x = Math.round(x * 100) / 100; var s_x = f_x.toString(); var pos_decimal = s_x.indexOf('.'); if (pos_decimal < 0) { pos_decimal = s_x.length; s_x += '.'; } while (s_x.length <= pos_decimal + 2) { s_x += '0'; } return s_x; } } var drawStatusLuckDraw = true; function luckDraw(fn,option){ if(!drawStatusLuckDraw){ return; } drawStatusLuckDraw=false; $('.ajaxLoadBg').show(); $('.ajaxLoadBar').addClass('ajaxLoad'); var params = {}; params.gameId = 1; params.style = 38; params.userName = "河边走"; params.isPub = $.trim(''); params.headImg = 'http://wx.qlogo.cn/mmopen/6KGMqCkBqg5IkciboVxiaDC3AaEqvMR8TL4Z0Ne1WhRYdmZ8YQZq3aS20vfjibj0QYchQ3nKzJlNYbG4ibiag1LLOibic6C4Clfqmnc/0'; $.extend(params,option); $.ajax({ type : 'post', url : '//hd.faisco.cn/ajax/hdgame_h.jsp?cmd=getResult&aid=11019180&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U', data : params, error : function(){ alert( '服务繁忙,请稍候重试!' ); HdGame.otherAjaxComplete(); drawStatusLuckDraw=true; if(gameType != 4){ count++; totalCount++; } }, success : function(data){ HdGame.tlog(data); HdGame.otherAjaxComplete(); drawStatusLuckDraw=true; var result = $.parseJSON(data); if(result.success){ if(gameType != 4){ count++; $(".dayDrawCount").text(drawTimesLimit-count<0 ? 0:(drawTimesLimit-count)); totalCount++; $(".totalDrawCount").text(drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount)); } $('#resule-gift-box').attr('_level',result.awardIndex); g_config.haveAward = true; $('.resule-status-send').html("查看我的奖品"); }else{ if(result.rt === 27){ $('.resuleBox').hide(); HdGame.showLotsWait(5,function(){ $('.resuleBox').show(); //HdGame.resulePoup.startStatus = true; //开启摇一摇抽奖 luckDraw(fn,option); }); return; }else if (result.rt === 1) { count = drawTimesLimit; $(".dayDrawCount").text(0); HdGame.statusMsg(4); if(!g_config.showHelpGuide){ $('#resule-gift-box').hide(); home('luckDraw'); } return; }else if (result.rt === 13) { HdGame.statusMsg(6); count = drawTimesLimit; totalCount = drawTotalLimit; $(".dayDrawCount").text(0); $(".totalDrawCount").text(0); $('#resule-gift-box').hide(); home('luckDraw'); return; }else if( result.rt === -3 ){ HdGame.statusMsg("活动不存在。"); return; }else{ if(result.rt === -2){ HdGame.tlog("参数错误。"); }else if(result.rt === -1){ HdGame.tlog("系统错误,请刷新再试。"); } count++; $(".dayDrawCount").text(drawTimesLimit-count<0 ? 0:(drawTimesLimit-count)); totalCount++; $(".totalDrawCount").text(drawTotalLimit-totalCount<0 ? 0:(drawTotalLimit-totalCount)); } } var arg={ isSuc:result.success, giftStyle:result.awardStyle, giftName:result.awardName, giftCode:result.awardCode, awardTypeNum:result.awardTypeNum, giftImage:result.awardImage, awardImageW:result.awardImageW, awardImageH:result.awardImageH, awardIndex:result.awardIndex, }; if(HdGame.getType(fn) === 'function'){ fn(arg,result); }else{ HdGame.resulePoup.showGift(arg); } } }); } $(function(){ hg.fire('jsFootEnd'); }) </script> <script type="text/javascript"> $.ajaxSettings.errorCall.push(function(callbackContext, status, error){ if(/logAjaxErr_h\.jsp/.test(callbackContext.url) && /cmd=hdajaxErr/.test(callbackContext.url)){ return; } var faiAjax = top._faiAjax || Fai.top._faiAjax || $; if( faiAjax ){ faiAjax.ajax({ type : "post", url : "//hd.faisco.cn/ajax/logAjaxErr_h.jsp?cmd=hdajaxErr&error="+error+"&status="+status+"&openId=o1ueSjgKEaUisGxQIjgMLIuikb6U&aid=11019180&gameId=1", data : 'msg=' + HdGame.encodeHtml('ajaxUrl='+HdGame.encodeUrl(callbackContext.url)+';refer='+HdGame.encodeUrl(top.location.href)) }); } }); </script> </body> </html>



科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行