| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016 | 
							- <!DOCTYPE html>
 
- <html lang="en">
 
-     <head>
 
-         <meta charset="utf-8">
 
-         <meta name="page-view-size" content="1280*720" />
 
-         <link rel="stylesheet" type="text/css" href="./css/page.css?v=201909"/>
 
-         <title>移动-明侦盲盒活动</title>
 
-     </head>
 
-     <body>
 
-         <div id="content">
 
-             <div class="gameNum"><span id="times">0</span></div>
 
-             <div class="pageLeft fl">
 
-                 <div class="myBox_btn"></div>
 
-             </div>
 
-             <ul id="boxUl" class="boxGroup fl">
 
-                 <li class="box box_1"></li>
 
-                 <li class="box box_2"></li>
 
-                 <li class="box box_3"></li>
 
-                 <li class="box box_4"></li>
 
-                 <li class="box box_5"></li>
 
-                 <li class="box box_6"></li>
 
-                 <li class="box box_7"></li>
 
-             </ul>
 
-             <div id="btnDiv" class="btnGroup fl">
 
-                 <div class="page_btn pb_1"></div>
 
-                 <div class="page_btn pb_2"></div>
 
-                 <div class="page_btn pb_3"></div>
 
-                 <div class="order_btn ob_1" id="oursP"></div>
 
-                 <div class="order_btn ob_2" id="othersP"></div>
 
-             </div>
 
-             <div id="rulesPopup" class="popup">
 
-                 <div class="rulesBtn"></div>
 
-             </div>
 
-             <div id="myBoxPopup" class="popup">
 
-                 <ul class="toyGroup">
 
-                     <li class="toyLi0"><img src="img/toy_bxk.png" height="133" width="117" alt=""/><span id="toy_0">0</span><i id="txt_0"></i></li>
 
-                     <li class="toyLi1"><img src="img/toy_dgw.png" height="133" width="117" alt=""/><span id="toy_1">0</span><i id="txt_1"></i></li>
 
-                     <li class="toyLi2"><img src="img/toy_hmn.png" height="133" width="117" alt=""/><span id="toy_2">0</span><i id="txt_2"></i></li>
 
-                     <li class="toyLi3"><img src="img/toy_lcd.png" height="133" width="117" alt=""/><span id="toy_3">0</span><i id="txt_3"></i></li>
 
-                     <li class="toyLi4"><img src="img/toy_stt.png" height="133" width="117" alt=""/><span id="toy_4">0</span><i id="txt_4"></i></li>
 
-                     <li class="toyLi5"><img src="img/toy_wgz.png" height="133" width="117" alt=""/><span id="toy_5">0</span><i id="txt_5"></i></li>
 
-                     <li class="toyLi6"><img src="img/toy_zys.png" height="133" width="117" alt=""/><span id="toy_6">0</span><i id="txt_6"></i></li>
 
-                 </ul>
 
-                 <div class="myBoxBtn"></div>
 
-             </div>
 
-             <div id="exchangePopup" class="popup">
 
-                 <img id="myPrize" src="" alt="" />
 
-                 <div id="phone"></div>
 
-                 <ul id="keyBoard">
 
-                     <li class="phoneNum">1</li>
 
-                     <li class="phoneNum">2</li>
 
-                     <li class="phoneNum">3</li>
 
-                     <li class="phoneNum">4</li>
 
-                     <li class="phoneNum">5</li>
 
-                     <li class="phoneNum">6</li>
 
-                     <li class="phoneNum">7</li>
 
-                     <li class="phoneNum">8</li>
 
-                     <li class="phoneNum">9</li>
 
-                     <li class="phoneNum">0</li>
 
-                     <li class="phoneNum otherBtn">删除</li>
 
-                     <li class="phoneNum otherBtn">清空</li>
 
-                 </ul>
 
-                 <div class="exchangeBtn confirm"></div>
 
-                 <div class="exchangeBtn cancel"></div>
 
-             </div>
 
-             <div id="unExchangePopup" class="popup">
 
-                 <div class="unExchangeBtn"></div>
 
-             </div>
 
-             
 
-             <div id="winToyPopup" class="popup">
 
-                 <img id="toyImg" src="" height="264" width="172" alt="" />
 
-                 <div class="winToyBtn myBox"></div>
 
-                 <div class="winToyBtn confirm"></div>
 
-             </div>
 
-             <div id="unWinToyPopup" class="popup">
 
-                 <div id="oursProduct" class="unWinToyBtn"></div>
 
-                 <div id="othersProduct" class="unWinToyBtn"></div>
 
-                 <div class="unWinToyBtn confirm"></div>
 
-             </div>
 
-             <div id="unWinToyVipPopup" class="popup">
 
-                 <div class="pmodel pmodel_1"></div>
 
-                 <div class="pmodel pmodel_2"></div>
 
-                 <div class="pmodel pmodel_3"></div>
 
-                 <div class="poster poster_1"></div>
 
-                 <div class="poster poster_2"></div>
 
-                 <div class="poster poster_3"></div>
 
-                 <div class="unWinToyVipBtn"></div>
 
-             </div>
 
-             <!-- <div id="noChancePopup" class="popup">
 
-                 <div class="noChanceBtn"></div>
 
-             </div>
 
-             <div id="noChanceVipPopup" class="popup">
 
-                 <div class="noChanceVipBtn"></div>
 
-             </div> -->
 
-             <div id="CollectedSuccessPopup" class="popup">
 
-                 <div class="CollectedSuccessBtn"></div>
 
-             </div>
 
-             <div id="openBoxPopup" class="popup">
 
-                 <img id="bigPrize" src="" alt="" />
 
-                 <div class="openBoxBtn oBbtn_1"></div>
 
-                 <div class="openBoxBtn oBbtn_2"></div>
 
-             </div>
 
-             <div id="markDownPopup" class="popup">
 
-                 <div class="markDownBtn"></div>
 
-             </div>
 
-             <div id="runOutPopup" class="popup">
 
-                 <div class="runOutBtn"></div>
 
-             </div>
 
-             <div id="submittedPopup" class="popup">
 
-                 <div class="submittedBtn"></div>
 
-             </div>
 
-         </div>
 
-         <script src="./js/webview.js" type="text/javascript"></script>
 
-         <script src="js/tvSysBtnBind.v2.js" type="text/javascript"></script>
 
-         <script src="js/comm.js?v=11" type="text/javascript"></script>
 
-         <script src="js/api.js?v=11" type="text/javascript"></script>
 
-         <script type="text/javascript">
 
-             var pageConf = {
 
-                 focusIdx:1,
 
-                 focusItem:"box",
 
-             }
 
-             var click = true;
 
-             var heguiItem = "box";
 
-             var init = {
 
-                 prize:0,
 
-                 act_id:1,
 
-                 gameNum:0,
 
-                 canPrize:0,
 
-                 oursProduct_isVip:0,
 
-                 othersProduct_isVip:0,
 
-                 contentcode:"00000001000000000018000000431421",//内容标识
 
-                 contentcode1:"00000001000000000029000000278889",
 
-             }
 
-             var pageItem = ["box","myBox_btn","page_btn","order_btn"];
 
-             // var popupItem = ["rulesBtn","myBoxBtn","unExchangeBtn","unExchangeBtn","exchangeBtn","phoneNum","markDownBtn","unWinToyBtn","unWinToyVipBtn","poster","winToyBtn"]
 
-             var webUrl = 'http://111.23.13.123:8091/';
 
-             try{
 
-                 var uid = Webview.readSystemProp('user.id');
 
-                 var usertoken = Webview.readSystemProp('user.token');//令牌
 
-                 var mac = Webview.readSystemProp('device.mac');//机顶盒mac地址
 
-                 var version = Webview.readSystemProp('app.version');//APK版本号
 
-             } catch(e) {
 
-                 var uid = getStr("uid") || '0100834547692768574';
 
-                 var usertoken = "CB89C105577A4E5344E7EC39F993A4B6"
 
-                 var mac = 'OC-49-33-BF-10-A6'
 
-                 var version = "YYS.5.7.7.Y3.4.HNYD.0.0_Beta"
 
-             }
 
-             var backUrl = webUrl+'h5v2/yd20191203/index.html';
 
-             var data = new Object();
 
-             data.rules = {
 
-                 box:{
 
-                     0:[["myBox_btn",0],0,1,3],
 
-                     1:[-1,0,1,3],
 
-                     2:[-1,0,["page_btn",2],3],
 
-                     3:[["myBox_btn",0],-3,1,0],
 
-                     4:[-1,-3,1,0],
 
-                     5:[-1,-3,1,0],
 
-                     6:[-1,-4,0,0],
 
-                     "onEnterPress":openBox,
 
-                     onPress:function(){
 
-                         if((this.event.keyCode == 39 || this.event.keyCode == "RIGHT") && this.prevIndex == 6){
 
-                             if(init.othersProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",0);
 
-                             }else if(init.othersProduct_isVip == 1 && init.oursProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",1);
 
-                             }
 
-                         }
 
-                     },
 
-                 },
 
-                 myBox_btn:{
 
-                     line:1,
 
-                     right:["box"],
 
-                     onEnterPress:function(){
 
-                         heguiItem = "myBox_btn";
 
-                         myBoxGroup();
 
-                     }
 
-                 },
 
-                 page_btn:{
 
-                     line:1,
 
-                     left:["box",2],
 
-                     "onEnterPress":openPopups,
 
-                     onPress:function(){
 
-                         if((this.event.keyCode == 40 || this.event.keyCode == "DOWN")&& this.prevIndex == 2){
 
-                             if(init.othersProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",0);
 
-                             }else if(init.othersProduct_isVip == 1 && init.oursProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",1);
 
-                             }
 
-                         }
 
-                     },
 
-                 },
 
-                 order_btn:{
 
-                     0:[["box",7],["page_btn",2],0,0],
 
-                     1:[["box",7],0,0,0],
 
-                     onEnterPress:function(){
 
-                         order(this.currentIndex);
 
-                     },
 
-                     onPress:function(){
 
-                         if((this.event.keyCode == 40 || this.event.keyCode == "DOWN") && this.currentIndex == 0){
 
-                             if(init.oursProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",1);
 
-                             }
 
-                         }else if((this.event.keyCode == 38 || this.event.keyCode == "UP")&& this.currentIndex == 1){
 
-                             if(init.othersProduct_isVip == 0){
 
-                                 this.reSetClass("order_btn",0);
 
-                             }else{
 
-                                 this.reSetClass("page_btn",2);
 
-                             }
 
-                         }
 
-                     },
 
-                 },
 
-                 rulesBtn:{
 
-                     line:1,
 
-                     onEnterPress:function(){
 
-                         H("rulesPopup");
 
-                         this.reSetClass("page_btn",1);
 
-                     },
 
-                     onBack:function(){
 
-                         H("rulesPopup");
 
-                         this.reSetClass("page_btn",1);
 
-                     },
 
-                 },
 
-                 myBoxBtn:{
 
-                     line:1, 
 
-                     onEnterPress:function(){
 
-                         H("myBoxPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("myBoxPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 },
 
-                 unExchangeBtn:{
 
-                     line:1, 
 
-                     onEnterPress:function(){
 
-                         H("unExchangePopup");
 
-                         this.reSetClass("page_btn",2);
 
-                     },
 
-                     onBack:function(){
 
-                         H("unExchangePopup");
 
-                         this.reSetClass("page_btn",2);
 
-                     },
 
-                 },
 
-                 exchangeBtn:{
 
-                     // 0:[0,0,0,["phoneNum",0]],
 
-                     0:[0,["phoneNum",6],1,0],
 
-                     1:[-1,["phoneNum",8],0,0],
 
-                     "onEnterPress":exchangePopups,
 
-                     onPress:cellphoneNum,
 
-                     onBack:function(){
 
-                         H("exchangePopup");
 
-                         G("phone").innerHTML = "";
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 },
 
-                 phoneNum:{
 
-                     line:6,
 
-                     down:["exchangeBtn",1],
 
-                     onEnterPress:function(){
 
-                         try{
 
-                             alert('phoneNum'+this.currentIndex+this.className+G("phone").innerHTML.length);
 
-                             if(this.currentIndex<=9){
 
-                                 if(G("phone").innerHTML.length>10) return;
 
-                                 if(this.currentIndex == 9){
 
-                                     G("phone").innerHTML += 0;
 
-                                 }else{
 
-                                     G("phone").innerHTML += this.currentIndex*1+1;   
 
-                                 }  
 
-                             }else if(this.currentIndex == 10){
 
-                                 if(G("phone").innerHTML.length>0)
 
-                                 G("phone").innerHTML = G("phone").innerHTML.slice(0,-1);
 
-                             }else if(this.currentIndex == 11){
 
-                                 if(G("phone").innerHTML.length>0)
 
-                                 G("phone").innerHTML = "";
 
-                             }
 
-                         }catch(e){
 
-                             alert(e)
 
-                         }
 
-                     },
 
-                     onPress:cellphoneNum,
 
-                     onBack:function(){
 
-                         if(G("phone").innerHTML.length>0){
 
-                             G("phone").innerHTML = G("phone").innerHTML.slice(0,-1);
 
-                         }else{
 
-                             H("exchangePopup");
 
-                             G("phone").innerHTML = "";
 
-                             this.reSetClass(heguiItem);
 
-                         }
 
-                     },
 
-                 },
 
-                 markDownBtn:{
 
-                     line:1,
 
-                     onEnterPress:function(){
 
-                         H("markDownPopup");
 
-                         this.reSetClass("page_btn",2);
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("markDownPopup");
 
-                         this.reSetClass("page_btn",2);
 
-                     },
 
-                 },
 
-                 runOutBtn:{
 
-                     line:1,
 
-                     onEnterPress:function(){
 
-                         H("runOutPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("runOutPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 },
 
-                 unWinToyBtn:{
 
-                     0:[0,0,0,2],
 
-                     1:[0,0,0,1],
 
-                     2:[0,0,0,0],
 
-                     onEnterPress:function(){
 
-                         if(this.currentIndex==2){
 
-                             H("unWinToyPopup");
 
-                             this.reSetClass("box");
 
-                         }else{
 
-                             setCookie("unWinToy","unWinToyPopup");
 
-                             order(this.currentIndex);
 
-                         }
 
-                     },
 
-                     onPress:function(){
 
-                         if(this.currentIndex == 0){
 
-                             if(this.event.keyCode == 39 || this.event.keyCode == "RIGHT"){
 
-                                 if(init.oursProduct_isVip == 0){
 
-                                     this.reSetClass("unWinToyBtn",1);
 
-                                 }
 
-                             }
 
-                         }else if(this.currentIndex == 1){
 
-                             if(this.event.keyCode == 37 || this.event.keyCode == "LEFT"){
 
-                                 if(init.othersProduct_isVip == 0){
 
-                                     this.reSetClass("unWinToyBtn",0);
 
-                                 }
 
-                             }
 
-                         }else if(this.currentIndex == 2){
 
-                             if(this.event.keyCode == 38 || this.event.keyCode == "UP"){
 
-                                 if(init.othersProduct_isVip == 0){
 
-                                     this.reSetClass("unWinToyBtn",0);
 
-                                 }else if(init.oursProduct_isVip == 0){
 
-                                     this.reSetClass("unWinToyBtn",1);
 
-                                 }
 
-                             }
 
-                         }
 
-                     },
 
-                     onBack:function(){
 
-                         H("unWinToyPopup");
 
-                         this.reSetClass("box");
 
-                     },
 
-                 },
 
-                 unWinToyVipBtn:{
 
-                     line:1,
 
-                     up:["poster"],
 
-                     onEnterPress:function(){
 
-                         H("unWinToyVipPopup");
 
-                         this.reSetClass("box");
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("unWinToyVipPopup");
 
-                         this.reSetClass("box");
 
-                     },
 
-                 },
 
-                 poster:{
 
-                     line:3,
 
-                     down:["unWinToyVipBtn"],
 
-                     onEnterPress:function(){
 
-                         var url = '',index=this.currentIndex;
 
-                         setCookie("videoIdx",index);
 
-                         if(index==0){
 
-                             fullscreenPlay("00000001000000000002000000120684")
 
-                         }else if(index==1){
 
-                             fullscreenPlay("00000001000000000014000000387305")
 
-                         }else if(index==2){
 
-                             fullscreenPlay("00000001000000000029000000278889")
 
-                         }
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("unWinToyVipPopup");
 
-                         this.reSetClass("box");
 
-                     },
 
-                 },
 
-                 winToyBtn:{
 
-                     line:2,
 
-                     onEnterPress:function(){
 
-                         H("winToyPopup");
 
-                         if(this.currentIndex == 0){
 
-                             myBoxGroup();
 
-                             // S("myBoxPopup");
 
-                             // this.reSetClass("myBoxBtn");
 
-                         }else{
 
-                             this.reSetClass(heguiItem);
 
-                         }
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("winToyPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 },
 
-                 CollectedSuccessBtn:{
 
-                     line:1,
 
-                     onEnterPress:function(){
 
-                         prize(uid,init.act_id,init.othersProduct_isVip+init.oursProduct_isVip,function(res){
 
-                             if (res.code == 0) {
 
-                                 if(res.data.yes.prize_status == "real"){//中奖
 
-                                     G("bigPrize").src = res.data.yes.prize_img;
 
-                                     H("myBoxPopup");
 
-                                     H("CollectedSuccessPopup");
 
-                                     S("openBoxPopup");
 
-                                     main.reSetClass("openBoxBtn");
 
-                                 }else{
 
-                                     S("runOutPopup");
 
-                                     main.reSetClass("runOutBtn");
 
-                                 }
 
-                             }else{
 
-                                 tips(res.msg);
 
-                             }
 
-                         })
 
-                     },
 
-                     onBack:function(){
 
-                         H("myBoxPopup");
 
-                         H("CollectedSuccessPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     }, 
 
-                 },
 
-                 openBoxBtn:{
 
-                     line:2,
 
-                     onEnterPress:function(){
 
-                         if(this.currentIndex == 0){
 
-                             userPrizelog(uid,init.act_id,init.oursProduct_isVip+init.othersProduct_isVip,function(res){
 
-                                 if(res.code == 0){
 
-                                     if(res.data.my_prizes[0]){
 
-                                         if(res.data.user_phone.phone_status !=1){
 
-                                             G('myPrize').src = res.data.my_prizes[0].show_image;
 
-                                             H("openBoxPopup");
 
-                                             S("exchangePopup");
 
-                                             main.reSetClass("phoneNum",0);
 
-                                         }else{
 
-                                             H("openBoxPopup");
 
-                                             S("submittedPopup");
 
-                                             main.reSetClass("submittedBtn");
 
-                                         }
 
-                                     }else{
 
-                                         //未中奖
 
-                                     }
 
-                                 }else{
 
-                                     tips(res.msg)
 
-                                 }
 
-                             });
 
-                         }else{
 
-                             H("openBoxPopup");
 
-                             this.reSetClass(heguiItem);
 
-                         }
 
-                     }, 
 
-                     onBack:function(){
 
-                         H("openBoxPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 },
 
-                 submittedBtn:{
 
-                     line:1,
 
-                      onEnterPress:function(){
 
-                         H("submittedPopup");
 
-                         this.reSetClass(heguiItem);
 
-                      },
 
-                     onBack:function(){
 
-                         H("submittedPopup");
 
-                         this.reSetClass(heguiItem);
 
-                     },
 
-                 }
 
-             }
 
-             // var btnConfig = {
 
-             //     className: pageConf.focusItem,
 
-             //     currentIndex: pageConf.focusIdx,
 
-             //     rules: data.rules,
 
-             //     onBack:onBack,
 
-             // }
 
-             function order(idx){
 
-                 var pid = "8801000079";
 
-                 var mark = "oursBag";
 
-                 if(idx == 1){
 
-                     pid = "8801000077";
 
-                     mark = "othersBag";
 
-                 }
 
-                 var orderBack = backUrl+'?'+mark+'='+uid;
 
-                 if(version.indexOf("5a.7") || version.indexOf("5a.8")){
 
-                     var product_list={
 
-                         "product_id":pid,
 
-                         "video_name":"",
 
-                         "video_type":"",
 
-                         "product_type":"2",
 
-                         "cat_id":"",
 
-                         "channel_id":"",
 
-                     }
 
-                     window.location.href = "https://hnydorder.yys.mgtv.com:8080/order/index.html?product_list="+JSON.stringify(product_list)+"&exitStr="+escape(orderBack);
 
-                 }else{
 
-                     var playIntent = {
 
-                         package: "com.hunantv.operator",
 
-                         action: "mangotv://com.hunantv.operator/order",
 
-                         data: "",
 
-                         extras: {
 
-                             product: {
 
-                                 "id": pid,
 
-                                 "time": "",
 
-                                 "price": "",
 
-                                 "type": "",
 
-                                 "name": "",
 
-                                 "bag": "",
 
-                                 "back_url":orderBack,
 
-                             }
 
-                         },
 
-                         flags: []
 
-                     };
 
-                     Webview.sendIntent("startActivity", playIntent); 
 
-                 }
 
-             } 
 
-             function fullscreenPlay(mid) {
 
-                 var playIntent = {
 
-                     package : "com.hunantv.operator",
 
-                     action: "mangotv://com.hunantv.operator/player/vod", 
 
-                     data:"",
 
-                     extras: {
 
-                         "video_index": 0,
 
-                         "media_asset_id": mid, //媒资包
 
-                     },
 
-                     flags: []
 
-                 };
 
-                 Webview.sendIntent("startActivity", playIntent);     
 
-             };
 
-             function openBox(){
 
-                 if(click){
 
-                     click = false;
 
-                     if(init.gameNum){
 
-                         if(init.othersProduct_isVip || init.oursProduct_isVip){
 
-                             G("unWinToyVipPopup").style.background = "url('./img/page_06.png') no-repeat center";
 
-                         }else{
 
-                             G("unWinToyPopup").style.background = "url('./img/page_05.png') no-repeat center";
 
-                         }
 
-                         goCollect(uid,init.act_id,init.othersProduct_isVip+init.oursProduct_isVip,function(res){
 
-                             if(res.code==0){
 
-                                 init.gameNum -= 1;
 
-                                 G("times").innerHTML = init.gameNum;
 
-                                 if(res.data.collect_status=='yes'){
 
-                                     G("toyImg").src=res.data.collect_list[0].collect_img;
 
-                                     S("winToyPopup");
 
-                                     heguiItem = "box";
 
-                                     main.reSetClass("winToyBtn");
 
-                                 }else{
 
-                                     if(init.othersProduct_isVip || init.oursProduct_isVip){
 
-                                         S("unWinToyVipPopup");
 
-                                         main.reSetClass("unWinToyVipBtn");
 
-                                     }else{
 
-                                         S("unWinToyPopup");
 
-                                         main.reSetClass("unWinToyBtn");
 
-                                     }
 
-                                 }
 
-                             }
 
-                             click = true;
 
-                         })
 
-                         
 
-                     }else{
 
-                         if(init.othersProduct_isVip || init.oursProduct_isVip){
 
-                             G("unWinToyVipPopup").style.background = "url('./img/page_08.png') no-repeat center";
 
-                             S("unWinToyVipPopup");
 
-                             this.reSetClass("poster");
 
-                         }else{
 
-                             G("unWinToyPopup").style.background = "url('./img/page_07.png') no-repeat center";
 
-                             S("unWinToyPopup");
 
-                             this.reSetClass("unWinToyBtn");
 
-                         }
 
-                         click = true;
 
-                     }
 
-                 }
 
-             }
 
-             function openPopups(){
 
-                 if(this.currentIndex==0){
 
-                      Webview.closeBrwoser("返回");//退出
 
-                 }else if(this.currentIndex==1){
 
-                     S("rulesPopup");
 
-                     this.reSetClass("rulesBtn");
 
-                 }else if(this.currentIndex==2){
 
-                     heguiItem = "page_btn";
 
-                     userPrizelog(uid,init.act_id,init.oursProduct_isVip+init.othersProduct_isVip,function(res){
 
-                         if(res.code == 0){
 
-                             if(res.data.my_prizes[0]){
 
-                                 if(res.data.user_phone.phone_status !=1){
 
-                                     G('myPrize').src = res.data.my_prizes[0].show_image;
 
-                                     S("exchangePopup");
 
-                                     main.reSetClass("phoneNum",0);
 
-                                 }else{
 
-                                     H("exchangePopup");
 
-                                     S("submittedPopup");
 
-                                     main.reSetClass("submittedBtn");
 
-                                 }
 
-                             }else{
 
-                                 
 
-                             }
 
-                         }else{
 
-                             myBoxGroup("mark");
 
-                         }
 
-                     });
 
-                 }
 
-             }
 
-             function myBoxGroup(mark){
 
-                 getUserCollects(uid,init.act_id,init.othersProduct_isVip+init.oursProduct_isVip,function(res){
 
-                     if(res.code == 0){
 
-                         for(var i=0;i<res.data.collect.length;i++){
 
-                             G("toy_"+i).innerHTML = res.data.collect[i].num;
 
-                             G("txt_"+i).innerHTML = res.data.collect[i].collect_name;
 
-                         }
 
-                         if(res.data.complate && res.data.complate[0].exchange_id>=1){
 
-                             init.canPrize = 1;
 
-                             if(!mark){
 
-                                 S("myBoxPopup");   
 
-                             }
 
-                             S("CollectedSuccessPopup");
 
-                             main.reSetClass("CollectedSuccessBtn");
 
-                         }else{
 
-                             if(mark){
 
-                                 S("unExchangePopup");
 
-                                 main.reSetClass("unExchangeBtn");
 
-                             }else{
 
-                                 S("myBoxPopup");
 
-                                 main.reSetClass("myBoxBtn");
 
-                             }
 
-                         }
 
-                     }else{
 
-                         if(!mark){
 
-                             S("myBoxPopup");
 
-                             main.reSetClass("myBoxBtn");
 
-                         }
 
-                     }
 
-                 })
 
-             }
 
-             function exchangePopups(){
 
-                 try{
 
-                     alert('exchangePopups'+this.currentIndex+this.className);
 
-                     if(this.currentIndex==1){
 
-                         H("exchangePopup");
 
-                         G("phone").innerHTML = "";
 
-                         this.reSetClass(heguiItem);
 
-                     }else if(this.currentIndex==0){
 
-                         var phone = G("phone").innerText;
 
-                         var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
 
-                         if(!myreg.test(phone)){
 
-                             tips('手机号码格式有误!');
 
-                         }else{
 
-                             ajax({
 
-                                 url: webUrl + "index.php?m=Home&c=Activityv2&a=setUserInfo",
 
-                                 data: {
 
-                                     uid: uid,
 
-                                     act_id: init.act_id,
 
-                                     is_vip: init.oursProduct_isVip+init.othersProduct_isVip,
 
-                                     phone: phone
 
-                                 },
 
-                                 success: function (res) {
 
-                                     if(res.code == 0){
 
-                                         H("exchangePopup");
 
-                                         G("phone").innerHTML = "";
 
-                                         S("markDownPopup");
 
-                                         main.reSetClass("markDownBtn");
 
-                                     }else{
 
-                                         tips(res.msg);
 
-                                     }
 
-                                     
 
-                                 }
 
-                             })
 
-                         }
 
-                     }
 
-                     
 
-                 }catch(e){
 
-                     alert(e);
 
-                 }
 
-             }
 
-             function cellphoneNum(){
 
-                 if(G("phone").innerHTML.length>10) return;
 
-                 var key = this.event.keyCode;
 
-                 try {
 
-                     Webview.setInputTypeTextFlag("true");
 
-                     if (key >= 0 && key <= 9) {
 
-                         G("phone").innerText += key;
 
-                     }
 
-                 } catch (e) {
 
-                     if (key > 47 && key < 58) {
 
-                         G("phone").innerText += (key - 48);
 
-                     }
 
-                 }
 
-             }
 
-             function onBack(){
 
-                 if(pageItem.indexOf(main.className)>-1){
 
-                     // window.location.href = webUrl+"/h5v2/special/dx20191126/index.html"
 
-                     Webview.closeBrwoser("返回");  
 
-                 }else{
 
-                 }
 
-             }
 
-             function payResult(is_vip,uid,product_id){
 
-                 if(is_vip == 1){
 
-                     ajax({
 
-                         url:webUrl+"index.php?m=Home&c=DuduApi&a=payResult",
 
-                         data:{
 
-                             uid: uid, 
 
-                             product_id:product_id,
 
-                             pay_result:0
 
-                         },
 
-                         success: function (res) {
 
-                         },
 
-                         error: function () {
 
-                         }
 
-                     })
 
-                 }
 
-             }
 
-             function addUser(fn) {
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=DuduApi&a=addUser",
 
-                     data:{
 
-                         uid: uid, 
 
-                         UserToken: usertoken
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                     }
 
-                 })
 
-             }
 
-             function addData(fn) {
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=ThemeData&a=addData",
 
-                     data:{
 
-                         uid: uid, 
 
-                         theme_id: 1
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                     }
 
-                 })
 
-             }
 
-             function addUser(fn) {
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=DuduApi&a=addUser",
 
-                     data:{
 
-                         uid: uid, 
 
-                         UserToken: usertoken
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                     }
 
-                 })
 
-             }
 
-             function authorization(contentcode,uid,usertoken,mac,version,fn) {
 
-                ajax({
 
-                     url:webUrl+"index.php?m=Home&c=order&a=contentCTCAuth",
 
-                     data:{
 
-                         contentcode:contentcode,
 
-                         uid:uid, //2.0
 
-                         usertoken:usertoken,
 
-                         mac:mac,
 
-                         version:version,
 
-                         fromsource:15
 
-                     },
 
-                     type: "post",
 
-                     dataType: "json",
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function (e) {
 
-                         fn && fn(e);
 
-                     }
 
-                 })
 
-             }
 
-             //游戏次数
 
-             function getPrizeNum(uid,act_id,is_vip,fn) {
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=Activityv2&a=getPrizeNum",
 
-                     data: {
 
-                         uid: uid, 
 
-                         act_id: act_id,
 
-                         is_vip: is_vip//is_vip1+is_vip2
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                         fn && fn();
 
-                     }
 
-                 })
 
-             }
 
-             function goCollect(uid,act_id,is_vip,fn) {//开盒抽卡
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=Activityv2&a=collect",
 
-                     data: {
 
-                         uid: uid, 
 
-                         act_id: act_id,
 
-                         is_vip: is_vip,//is_vip1+is_vip2
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                         fn && fn();
 
-                     }
 
-                 })
 
-             }
 
-             function getUserCollects(uid,act_id,is_vip,fn) {
 
-                 ajax({
 
-                     url:webUrl+"index.php?m=Home&c=Activityv2&a=getUserCollects",
 
-                     data: {
 
-                         uid: uid, 
 
-                         act_id: act_id,
 
-                         is_vip: is_vip//is_vip1+is_vip2
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                         fn && fn();
 
-                     }
 
-                 })
 
-             }
 
-             function prize(uid,act_id,is_vip,fn) {
 
-                 ajax({
 
-                     url: webUrl + "index.php?m=Home&c=Activityv2&a=prize",
 
-                     data: {
 
-                         uid: uid,
 
-                         act_id: act_id,
 
-                         is_vip: is_vip,//is_vip1+is_vip2
 
-                         run: 'complate',
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     }
 
-                 })
 
-             }
 
-             function userPrizelog(uid,act_id,is_vip,fn) {
 
-                 ajax({
 
-                     url: webUrl + "index.php?m=Home&c=Activityv2&a=userPrizelog",
 
-                     data: {
 
-                         uid: uid,
 
-                         act_id: act_id,
 
-                         is_vip: is_vip
 
-                     },
 
-                     success: function (res) {
 
-                         fn && fn(res);
 
-                     },
 
-                     error: function () {
 
-                         fn && fn();
 
-                     }
 
-                 })
 
-             }
 
-             function pageInit(){
 
-                 if(!getStr("oursBag") && !getStr("othersBag") && !getStr("for")){
 
-                     addUser();
 
-                     addData();
 
-                 }
 
-                 
 
-                 authorization(init.contentcode,uid,usertoken,mac,version,function(res){
 
-                     if(res.code == 0){
 
-                         if(res.data.result==0){
 
-                             init.oursProduct_isVip = 1;
 
-                             addClass(G("oursP"),'hasOrder');
 
-                             addClass(G("oursProduct"),'hasOrder');
 
-                             if(!!getStr("oursBag")){
 
-                                 payResult(init.oursProduct_isVip,uid,"8801000077");
 
-                             }
 
-                         }else{
 
-                             init.oursProduct_isVip = 0;
 
-                             if(!!getStr("oursBag")){
 
-                                 if(!!getCookie("unWinToy")){
 
-                                     pageConf.focusItem = "unWinToyBtn";
 
-                                     S("unWinToyPopup")
 
-                                     setCookie("unWinToy",'');
 
-                                 }else{
 
-                                     pageConf.focusItem = "order_btn";
 
-                                 }
 
-                                 pageConf.focusIdx = 0;
 
-                             }
 
-                         }
 
-                         authorization(init.contentcode1,uid,usertoken,mac,version,function(res){
 
-                             if(res.code == 0){
 
-                                 if(res.data.result==0){
 
-                                     init.othersProduct_isVip = 1;
 
-                                     addClass(G("othersP"),'hasOrder');
 
-                                     addClass(G("othersProduct"),'hasOrder');
 
-                                     if(!!getStr("othersBag")){
 
-                                         payResult(init.othersProduct_isVip,uid,"8801000079")   
 
-                                     }
 
-                                 }else{
 
-                                     othersProduct_isVip = 0;
 
-                                     if(!!getStr("othersBag")){
 
-                                         if(!!getCookie("unWinToy")){
 
-                                             pageConf.focusItem = "unWinToyBtn";
 
-                                             S("unWinToyPopup")
 
-                                             setCookie("unWinToy",'');
 
-                                         }else{
 
-                                             pageConf.focusItem = "order_btn";
 
-                                         }
 
-                                         pageConf.focusIdx = 1;
 
-                                     }
 
-                                 }
 
-                                 var vv = init.oursProduct_isVip+init.othersProduct_isVip;
 
-                                 
 
-                                 getPrizeNum(uid,init.act_id,vv,function(res){
 
-                                     if(res.code == 0){
 
-                                         init.gameNum = res.data;  
 
-                                         G("times").innerHTML = res.data; 
 
-                                         if(!!getCookie("videoIdx")){
 
-                                             if(res.data == 0){
 
-                                                 G("unWinToyVipPopup").style.background = "url('./img/page_08.png') no-repeat center";
 
-                                             }else{
 
-                                                 G("unWinToyVipPopup").style.background = "url('./img/page_06.png') no-repeat center";
 
-                                             }
 
-                                             S("unWinToyVipPopup");
 
-                                             pageConf.focusItem = "poster";
 
-                                             pageConf.focusIdx = getCookie("videoIdx");
 
-                                             setCookie("videoIdx","");
 
-                                         }
 
-                                         btnInit();
 
-                                     }else{
 
-                                         btnInit();
 
-                                     }
 
-                                 })
 
-                                 // var btnConfig = {
 
-                                 //     className: pageConf.focusItem,
 
-                                 //     currentIndex: pageConf.focusIdx,
 
-                                 //     rules: data.rules,
 
-                                 //     onBack:onBack,
 
-                                 // }
 
-                                 // window.main = new tvSysBtnBind(btnConfig);
 
-                                 // main.reLoad();
 
-                                 
 
-                             }
 
-                             else{
 
-                                 btnInit();
 
-                             }
 
-                         });
 
-                     }else{
 
-                         btnInit();
 
-                     }
 
-                     
 
-                 });
 
-             }
 
-             function btnInit(){
 
-                 var btnConfig = {
 
-                     className: pageConf.focusItem,
 
-                     currentIndex: pageConf.focusIdx,
 
-                     rules: data.rules,
 
-                     onBack:onBack,
 
-                 }
 
-                 window.main = new tvSysBtnBind(btnConfig);
 
-                 main.reLoad();
 
-             }
 
-             function G(id){
 
-                 return document.getElementById(id)
 
-             }
 
-             function S(id){
 
-                 G(id).style.visibility = "visible";
 
-             }
 
-             function H(id){
 
-                 G(id).style.visibility = "hidden";
 
-             }
 
-             pageInit();
 
-         </script>
 
-     </body>
 
- </html>
 
 
  |