1 |
- window.__require=function t(e,o,n){function r(c,a){if(!o[c]){if(!e[c]){var s=c.split("/");if(s=s[s.length-1],!e[s]){var l="function"==typeof __require&&__require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+c+"'")}c=s}var p=o[c]={exports:{}};e[c][0].call(p.exports,function(t){return r(e[c][1][t]||t)},p,p.exports,t,e,o,n)}return o[c].exports}for(var i="function"==typeof __require&&__require,c=0;c<n.length;c++)r(n[c]);return r}({AnimInAndOut:[function(t,e,o){"use strict";cc._RF.push(e,"e426d8qHqlKD4qX7oY73Glm","AnimInAndOut");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.adjustPopNodeScale=1,e.isDestroying=!1,e}return r(e,t),e.prototype.onLoad=function(){},e.prototype.onEnable=function(){this.popNode.opacity=0,this.popNode.setScale(.1);var t=cc.fadeIn(.2),e=cc.scaleTo(.2,this.adjustPopNodeScale);this.popNode.runAction(cc.spawn(t,e))},e.prototype.onQuit=function(){this.animateAndDestroy()},e.prototype.animateAndDestroy=function(t){var e=this;if(void 0===t&&(t=null),!this.isDestroying){this.isDestroying=!0,this.popNode.setScale(this.adjustPopNodeScale);var o=cc.fadeOut(.2),n=cc.scaleTo(.2,0),r=cc.callFunc(function(){e.node&&e.node.destroy(),t&&t()});this.popNode.runAction(cc.sequence(cc.spawn(o,n),r))}},e.prototype.animateAndDisable=function(){var t=this;if(!this.isDestroying){this.isDestroying=!0;var e=cc.fadeOut(.2),o=cc.scaleTo(.2,0),n=cc.callFunc(function(){t.node.active=!1});this.node.runAction(cc.sequence(cc.spawn(e,o),n))}},i([s(cc.Node)],e.prototype,"popNode",void 0),i([s],e.prototype,"adjustPopNodeScale",void 0),i([a],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],DateExt:[function(t,e){"use strict";cc._RF.push(e,"408db7IOdRP04V1UkDDFiel","DateExt"),Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var o in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[o]:("00"+e[o]).substr((""+e[o]).length)));return t},cc._RF.pop()},{}],InputQuestionItem:[function(t,e,o){"use strict";cc._RF.push(e,"75348+lbslBN5SKtdsWEXw0","InputQuestionItem");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelIndex=null,e.labelQuestion=null,e.customInput=null,e.questionID=0,e}return r(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){},e.prototype.loadData=function(t,e){this.questionID=Number(e.id),this.labelIndex.string=""+t,this.labelQuestion.string=e.question},e.prototype.getResult=function(){return{id:this.questionID,input:this.customInput.string}},e.prototype.reset=function(){this.customInput.string=""},i([s(cc.Label)],e.prototype,"labelIndex",void 0),i([s(cc.Label)],e.prototype,"labelQuestion",void 0),i([s(cc.EditBox)],e.prototype,"customInput",void 0),i([a],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],LotteryItem:[function(t,e,o){"use strict";cc._RF.push(e,"7a13cgCyohOnKv6JU05fryQ","LotteryItem");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=(c.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelNormal=null,e.labelBottom=null,e.labelPrize=null,e}return r(e,t),e.prototype.onLoad=function(){},e.prototype.loadData=function(t,e){this.labelNormal=this.node.getChildByName("labelNormal").getComponent(cc.Label),this.labelBottom=this.node.getChildByName("labelBottom").getComponent(cc.Label),this.labelPrize=this.node.getChildByName("labelPrize").getComponent(cc.Label),this.labelNormal.string=t,this.labelBottom.string=t+"\u5956",this.labelPrize.string=e},e.prototype.start=function(){},e.prototype.showNormal=function(){this.labelNormal.node.active=!0,this.labelBottom.node.active=!1,this.labelPrize.node.active=!1},e.prototype.showResult=function(){var t=this;this.node.scaleX=1,this.node.runAction(cc.sequence(cc.scaleTo(.2,0,1),cc.callFunc(function(){t.labelNormal.node.active=!1,t.labelBottom.node.active=!0,t.labelPrize.node.active=!0}),cc.scaleTo(.2,1,1)))},e.prototype.setHL=function(){this.node.color=new cc.Color(255,255,51,255),this.labelNormal.node.color=new cc.Color(239,51,51,255)},e.prototype.reset=function(){this.node.color=new cc.Color(255,255,255,255),this.labelNormal.node.color=new cc.Color(51,51,51,255)},i([a],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],Main:[function(t,e,o){"use strict";cc._RF.push(e,"709664rU85FcrntOVntXgP3","Main");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=t("./PanelPrize"),a=t("./NetManager"),s=t("./PanelRecord"),l=cc._decorator,p=l.ccclass,u=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.questionPanel=null,e.lotteryPanel=null,e.questionNode=null,e.btnRoll=null,e.btnPrev=null,e.btnNext=null,e.btnUpload=null,e.bgm=null,e.musicBtnNode=null,e.popNode=null,e.labelTitle=null,e.rewardType=[],e.wheel=null,e.preload=[],e.customImageSp=[],e.optQuestionItem=null,e.inputQuestionItem=null,e.questionCompArr=[],e.isUploading=!1,e.curQNumber=1,e.curPageIndex=-1,e.bgmAudioID=-1,e.answerResult={},e.isRolling=!1,e.isMuted=!1,e.isPlayingPage=!1,e.MAX_QUESTION_NUM=0,e}return r(e,t),e.prototype.onLoad=function(){this.customImageSp.push(cc.find("bg",this.questionPanel).getComponent(cc.Sprite)),this.customImageSp.push(cc.find("bg",this.lotteryPanel).getComponent(cc.Sprite)),this.customImageSp.push(cc.find("title",this.lotteryPanel).getComponent(cc.Sprite));for(var t=1;t<=8;++t)this.customImageSp.push(cc.find("prize"+t,this.wheel).getComponent(cc.Sprite));this.questionPanel.active=!1,this.lotteryPanel.active=!1,this.isPlayingPage=!1,this.questionNode.removeAllChildren(),cc.log(this.customImageSp.length)},e.prototype.start=function(){var t=this;a.NetManager.getInst().initNet(function(){t.setupCustomImage(),t.initUI(),t.playBGM(!0),a.NetManager.getInst().status>0&&t.changeLotteryPanel()})},e.prototype.setupCustomImage=function(){var t=a.NetManager.getInst().preloadImg.bg,e=a.NetManager.getInst().preloadImg.title;t&&(this.customImageSp[0].spriteFrame=t,this.customImageSp[1].spriteFrame=t),e&&(this.customImageSp[2].spriteFrame=e);for(var o=3;o<this.customImageSp.length;++o){var n=o-2,r=a.NetManager.getInst().preloadImg["item"+n];r&&(this.customImageSp[o].spriteFrame=r)}},e.prototype.initUI=function(){this.questionPanel.active=!1,this.lotteryPanel.active=!0,this.labelTitle.string=a.NetManager.getInst().activityName;var t=a.NetManager.getInst().lotteryItems,e=0;for(var o in t)this.rewardType[e++].string=t[o]},e.prototype.reset=function(){this.questionPanel.active=!0,this.lotteryPanel.active=!1,this.answerResult={},this.curPageIndex=-1;for(var t=0;t<this.questionCompArr.length;++t)this.questionCompArr[t].reset();var e=cc.visibleRect;for(t=0;t<this.questionCompArr.length;++t){var o=this.questionCompArr[t].node.getComponent(cc.Widget);o.updateAlignment(),o.enabled=!1,this.questionCompArr[t].node.x=e.width+50}this.showQuestion(1)},e.prototype.showQuestion=function(t){var e=this;if(void 0===t&&(t=1),t=(t=t>=this.MAX_QUESTION_NUM?this.MAX_QUESTION_NUM:t)<=0?1:t,this.curPageIndex!=t){var o=t-1,n=t>this.curPageIndex;this.curQNumber=t,this.curPageIndex=t,this.isPlayingPage=!0;var r=cc.visibleRect,i=n?this.questionCompArr[o].node:this.questionCompArr[o+1].node,c=i.y;n?(i.x=r.width+50,i.y=r.height,i.angle=-60,cc.tween(i).sequence(cc.tween().to(.3,{x:0,y:c,angle:0}),cc.callFunc(function(){i.x=0,i.y=c,i.angle=0,e.isPlayingPage=!1})).start()):cc.tween(i).sequence(cc.tween().to(.3,{x:r.width+50,y:-r.height,angle:30}),cc.callFunc(function(){i.x=r.width+50,i.y=c,i.angle=0,e.isPlayingPage=!1})).start(),this.btnPrev.active=!1,this.btnNext.active=!1,this.btnUpload.active=!1,this.curQNumber==this.MAX_QUESTION_NUM?(this.btnPrev.active=1!=this.curQNumber,this.btnUpload.active=!0):1==this.curQNumber?this.btnNext.active=!0:(this.btnPrev.active=!0,this.btnNext.active=!0)}},e.prototype.onClickNext=function(){if(!this.isPlayingPage){this.updateAnswerResult(),this.showQuestion(++this.curQNumber);var t=this.musicBtnNode.getComponent(cc.Animation);-1!=this.bgmAudioID||this.isMuted||(this.bgmAudioID=cc.audioEngine.play(this.bgm,!0,.5),t.play())}},e.prototype.onClickPrev=function(){this.isPlayingPage||(this.updateAnswerResult(),this.showQuestion(--this.curQNumber))},e.prototype.onClickUpload=function(){var t=this;this.isUploading||(this.isUploading=!0,this.updateAnswerResult(),a.NetManager.getInst().submitAnswer(this.answerResult,function(e){t.isUploading=!1,200==e.code&&(e.data.lottery?t.loadPopUp("panelSuccess"):t.loadPopUp("panelFailed",function(t){cc.find("btnAgain/label",t).getComponent(cc.Label).string="\u672c\u8f6e\u4ec5\u7b54\u5bf9"+e.data.rightCount+"\u9053\u9898"}))}))},e.prototype.onClickBGM=function(t){t.isChecked?(this.playBGM(!1),this.isMuted=!0):(this.playBGM(!0),this.isMuted=!1)},e.prototype.playBGM=function(t){var e=this.musicBtnNode.getComponent(cc.Animation);this.bgmAudioID>=0&&(cc.audioEngine.stop(this.bgmAudioID),this.bgmAudioID=-1),t?(-1==this.bgmAudioID&&(this.bgmAudioID=cc.audioEngine.play(this.bgm,!0,.5)),e.play()):(this.musicBtnNode.angle=0,e.stop())},e.prototype.updateAnswerResult=function(){this.answerResult[this.curQNumber]||(this.answerResult[this.curQNumber]={}),this.answerResult[this.curQNumber]=this.questionCompArr[this.curQNumber-1].getResult()},e.prototype.loadPopUp=function(t,e){var o=this;void 0===e&&(e=null),cc.resources.load("prefabs/"+t,cc.Prefab,function(t,n){if(!t){var r=cc.instantiate(n);o.popNode.addChild(r),e&&e(r)}})},e.prototype.changeLotteryPanel=function(){this.questionPanel.active=!1,this.lotteryPanel.active=!0,this.btnRoll.interactable=!0,a.NetManager.getInst().status>0&&(this.btnRoll.interactable=!1)},e.prototype.randomNum=function(t,e){var o=e-t,n=Math.random();return 0==Math.round(n*o)?t+1:Math.round(n*e)==e?e-1:t+Math.round(n*o)-1},e.prototype.getSpinAngle=function(t){var e=0;switch(t){case 8:e=this.randomNum(320,355);break;case 7:e=this.randomNum(275,310);break;case 6:e=this.randomNum(230,265);break;case 5:e=this.randomNum(185,220);break;case 4:e=this.randomNum(140,175);break;case 3:e=this.randomNum(95,130);break;case 2:e=this.randomNum(50,80);break;case 1:e=this.randomNum(5,40)}return e},e.prototype.onClickLottery=function(){var t=this;this.isRolling||(this.btnRoll.interactable=!1,a.NetManager.getInst().rollItem(function(e,o){if(e>0){t.wheel.angle=0,t.isRolling=!0,a.NetManager.getInst().prize=e,a.NetManager.getInst().recordTime=(new Date).Format("yyyy-MM-dd hh:mm:ss");var n=-t.getSpinAngle(e);cc.log("id = ",e," angle = ",n," name = ",o);var r=n+3600;cc.Tween.stopAll(),cc.tween(t.wheel).sequence(cc.tween().to(1.8,{angle:-r},{easing:"cubicOut"}),cc.tween().delay(.3),cc.callFunc(function(){t.onShowRollResult()})).start()}else t.btnRoll.interactable=!0,t.isRolling=!1}))},e.prototype.onShowRollResult=function(){var t=this,e=a.NetManager.getInst().prize;setTimeout(function(){"\u8c22\u8c22\u53c2\u4e0e"==a.NetManager.getInst().lotteryPrize[e]?t.loadPopUp("panelSorry"):t.loadPopUp("panelPrize",function(t){var o=t.getComponent(c.default);o.labelReward.string="\u62bd\u4e2d\u4e86\u3010"+a.NetManager.getInst().lotteryItems[e]+"\u3011";var n=a.NetManager.getInst().lotteryPrize[e];n=n.replace(/[\r\n]/g,""),o.labelPrize.string="\u300c"+n+"\u300d"})},300)},e.prototype.onClickRecord=function(){var t=a.NetManager.getInst().prize;"\u8c22\u8c22\u53c2\u4e0e"!=a.NetManager.getInst().lotteryPrize[t]?this.loadPopUp("panelRecord",function(e){var o=e.getComponent(s.default);if(t>0){o.labelEmpty.node.active=!1,o.recordInfoNode.active=!0,o.labelPrize.string=a.NetManager.getInst().lotteryItems[t];var n=a.NetManager.getInst().lotteryPrize[t];n=n.replace(/[\r\n]/g,""),o.labelReward.string=n,o.labelTime.string=a.NetManager.getInst().recordTime}else o.labelEmpty.node.active=!0,o.recordInfoNode.active=!1}):this.loadPopUp("panelSorry")},e.prototype.onClickBack=function(){window.aladdin&&window.aladdin.navigator.back()},i([u(cc.Node)],e.prototype,"questionPanel",void 0),i([u(cc.Node)],e.prototype,"lotteryPanel",void 0),i([u(cc.Node)],e.prototype,"questionNode",void 0),i([u(cc.Button)],e.prototype,"btnRoll",void 0),i([u(cc.Node)],e.prototype,"btnPrev",void 0),i([u(cc.Node)],e.prototype,"btnNext",void 0),i([u(cc.Node)],e.prototype,"btnUpload",void 0),i([u({type:cc.AudioClip,displayName:"\u80cc\u666f\u97f3\u4e50"})],e.prototype,"bgm",void 0),i([u(cc.Node)],e.prototype,"musicBtnNode",void 0),i([u(cc.Node)],e.prototype,"popNode",void 0),i([u(cc.Label)],e.prototype,"labelTitle",void 0),i([u(cc.Label)],e.prototype,"rewardType",void 0),i([u(cc.Node)],e.prototype,"wheel",void 0),i([u(cc.Prefab)],e.prototype,"preload",void 0),i([u(cc.Prefab)],e.prototype,"optQuestionItem",void 0),i([u(cc.Prefab)],e.prototype,"inputQuestionItem",void 0),i([p],e)}(cc.Component);o.default=d,cc._RF.pop()},{"./NetManager":"NetManager","./PanelPrize":"PanelPrize","./PanelRecord":"PanelRecord"}],NetManager:[function(t,e,o){"use strict";cc._RF.push(e,"abdb4AZLm5JWp1aRhQHvo2R","NetManager"),Object.defineProperty(o,"__esModule",{value:!0}),o.NetManager=void 0;var n="https://lottery.superdesk.cn/pingan_h5/pingan_webapi",r=function(){function t(){this.apiServerHost=n,this.appToken="",this.activityID=0,this.session="",this.userId="",this.status=0,this.prize=0,this.recordTime="",this.labelTips="",this.activityName="",this.lotteryItems=[],this.lotteryPrize=[],this.questions=[],this.preloadImg=new Map}return t.getInst=function(){return t.instance},t.prototype.initNet=function(t){var e=this,o=this.URLParse();this.appToken=o.token,this.activityID=o.activityID,window.WEB_API&&(this.apiServerHost=window.WEB_API),this.sendHttpPostRequest("/getUserInfo.php",{appToken:this.appToken,activityID:this.activityID},function(o){if(200==o.code){e.userId=o.data.user_id,e.session=o.data.token,e.questions=o.data.questions,e.status=o.data.status,e.prize=o.data.prize,e.lotteryItems=o.data.lotteryItems,e.lotteryPrize=o.data.lotteryPrize,e.labelTips=o.data.tips,e.activityName=o.data.activityName,e.recordTime=o.data.update_time;var n=[];for(var r in n.push(["bg",o.data.bg_img]),n.push(["title",o.data.title_img]),o.data.lotteryImgs)n.push(["item"+r,o.data.lotteryImgs[r]]);e.preloadRemoteImg(n,t)}else o.msg&&alert(o.msg)})},t.prototype.preloadRemoteImg=function(t,e){for(var o=this,n=0,r=t.length,i=function(i){var c=t[i][0],a=t[i][1];if(null==a||0==a.length)return"continue";cc.assetManager.loadRemote(a,function(t,i){t||(o.preloadImg[c]=new cc.SpriteFrame(i)),++n==r&&e&&e()})},c=0;c<t.length;++c)i(c)},t.prototype.submitAnswer=function(t,e){this.sendHttpPostRequest("/submitAnswer.php",{userId:this.userId,activityID:this.activityID,answers:JSON.stringify(t)},function(t){e&&e(t)})},t.prototype.rollItem=function(t){this.sendHttpPostRequest("/getLottery.php",{activityID:this.activityID},function(e){e&&200==e.code?t&&t(e.data.id,e.data.name):t&&t(-1)})},t.prototype.sendHttpPostRequest=function(t,e,o){void 0===o&&(o=null);var n=new XMLHttpRequest;n.timeout=1e4;var r=this.apiServerHost+t;e.token=this.session,n.open("POST",r,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),cc.log("http post:"+JSON.stringify(e)),n.onreadystatechange=function(){if(4===n.readyState&&n.status>=200&&n.status<300){var t=null;cc.log("http recv:"+n.responseText);try{t=JSON.parse(n.responseText)}catch(e){cc.log("err:"+e)}o&&o(t)}};var i="";for(var c in e)"?"!=i&&(i+="&"),i+=c+"="+e[c];n.send(i)},t.prototype.URLParse=function(){var t={};if(null==window.location)return t;for(var e="",o="",n=window.location.href,r=n.indexOf("?"),i=(n=n.substr(r+1)).split("&"),c=0;c<i.length;++c)(r=i[c].indexOf("="))>0&&(e=i[c].substring(0,r),o=i[c].substr(r+1),t[e]=decodeURIComponent(o));return t},t.instance=new t,t}();o.NetManager=r,cc._RF.pop()},{}],OptQuestionItem:[function(t,e,o){"use strict";cc._RF.push(e,"64147pmVnpNzpKrbtl3KC1N","OptQuestionItem");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=cc._decorator,a=c.ccclass,s=c.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelIndex=null,e.labelQuestion=null,e.optionNodes=[],e.questionID=0,e.isMultiOpt=!1,e}return r(e,t),e.prototype.onLoad=function(){this.optionNodes=[];for(var t=1;t<=8;++t){var e=cc.find("content/opt"+t,this.node);e.getComponent(cc.Toggle).uncheck(),this.optionNodes.push(e)}},e.prototype.start=function(){},e.prototype.loadData=function(t,e){this.questionID=Number(e.id),this.labelIndex.string=""+t,this.labelQuestion.string=e.question,this.isMultiOpt=2==Number(e.type);for(var o=e.options,n=0;n<this.optionNodes.length;++n){var r=this.optionNodes[n];n<o.length?(r.active=!0,r.getComponent(cc.Label).string=o[n]):r.active=!1}},e.prototype.reset=function(){for(var t=0;t<this.optionNodes.length;++t)this.optionNodes[t].getComponent(cc.Toggle).uncheck()},e.prototype.onOptionSelect=function(t){if(!this.isMultiOpt)for(var e=0;e<this.optionNodes.length;++e){var o=this.optionNodes[e].getComponent(cc.Toggle);o!=t&&o.uncheck()}},e.prototype.onClickRadioButton=function(t){var e=t.currentTarget.parent.getComponent(cc.Toggle);e.isChecked?e.uncheck():e.check()},e.prototype.getResult=function(){for(var t=[],e=0;e<this.optionNodes.length;++e)this.optionNodes[e].getComponent(cc.Toggle).isChecked&&t.push(e+1);return{id:this.questionID,options:t}},i([s(cc.Label)],e.prototype,"labelIndex",void 0),i([s(cc.Label)],e.prototype,"labelQuestion",void 0),i([a],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],PanelFailed:[function(t,e,o){"use strict";cc._RF.push(e,"0065612aiBIDqlpN+TXjUot","PanelFailed");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=t("./AnimInAndOut"),a=t("./Main"),s=cc._decorator,l=s.ccclass,p=(s.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.start=function(){},e.prototype.onClickRestart=function(){cc.Canvas.instance.node.getComponent(a.default).reset(!0),this.getComponent(c.default).animateAndDestroy()},i([l],e)}(cc.Component));o.default=p,cc._RF.pop()},{"./AnimInAndOut":"AnimInAndOut","./Main":"Main"}],PanelPrize:[function(t,e,o){"use strict";cc._RF.push(e,"924c1X+3xhOyK9bPVtkm4fX","PanelPrize");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=t("./NetManager"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelReward=null,e.labelPrize=null,e.labelTips=null,e}return r(e,t),e.prototype.start=function(){this.labelTips.string=c.NetManager.getInst().labelTips},i([l(cc.Label)],e.prototype,"labelReward",void 0),i([l(cc.Label)],e.prototype,"labelPrize",void 0),i([l(cc.Label)],e.prototype,"labelTips",void 0),i([s],e)}(cc.Component);o.default=p,cc._RF.pop()},{"./NetManager":"NetManager"}],PanelRecord:[function(t,e,o){"use strict";cc._RF.push(e,"29a73Ue8U1AsZFqQz5oyfvU","PanelRecord");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=t("./NetManager"),a=cc._decorator,s=a.ccclass,l=a.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelReward=null,e.labelPrize=null,e.labelTime=null,e.recordInfoNode=null,e.labelEmpty=null,e.labelTips=null,e}return r(e,t),e.prototype.start=function(){this.labelTips.string=c.NetManager.getInst().labelTips},i([l(cc.Label)],e.prototype,"labelReward",void 0),i([l(cc.Label)],e.prototype,"labelPrize",void 0),i([l(cc.Label)],e.prototype,"labelTime",void 0),i([l(cc.Node)],e.prototype,"recordInfoNode",void 0),i([l(cc.Label)],e.prototype,"labelEmpty",void 0),i([l(cc.Label)],e.prototype,"labelTips",void 0),i([s],e)}(cc.Component);o.default=p,cc._RF.pop()},{"./NetManager":"NetManager"}],PanelSuccess:[function(t,e,o){"use strict";cc._RF.push(e,"bf459X46WhOm6cu2UsRWRit","PanelSuccess");var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(o,"__esModule",{value:!0});var c=t("./AnimInAndOut"),a=t("./Main"),s=cc._decorator,l=s.ccclass,p=(s.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.start=function(){},e.prototype.onClickLottery=function(){cc.Canvas.instance.node.getComponent(a.default).changeLotteryPanel(),this.getComponent(c.default).animateAndDestroy()},i([l],e)}(cc.Component));o.default=p,cc._RF.pop()},{"./AnimInAndOut":"AnimInAndOut","./Main":"Main"}]},{},["AnimInAndOut","DateExt","InputQuestionItem","LotteryItem","Main","NetManager","OptQuestionItem","PanelFailed","PanelPrize","PanelRecord","PanelSuccess"]);
|