import AppPlatform from "../../FrameWork/Util/AppPlatform"; import Common5 from "../../Platform/th/Common5"; let AllConfig = [ {idTag:1,successStr:'发小安若若发来微信信息!',successBtnStr:'确认', failStr:'',failADBtnStr:'',failContinueBtnStr:''}, {idTag:2,selectContentStr:'眼光太差投资人很不高兴,哄不好了',selectLeftBtnStr:'重新试穿',selectRightBtnStr:'最美衣服'}, {idTag:3,successStr:'投资人心情不错,再接再厉',successBtnStr:'确认', failStr:'',failADBtnStr:'',failContinueBtnStr:''}, {idTag:4,successStr:'钱已赚够可前往卖货郎买药',successBtnStr:'确认', failStr:'',failADBtnStr:'',failContinueBtnStr:''}, {idTag:5,successStr:'老婆夏芸发来微信消息!',successBtnStr:'查看', failStr:'',failADBtnStr:'',failContinueBtnStr:''}, ] // export interface TaskResultInfo{ // id:number, // isSuccess?:boolean, // isNeedSelectView:boolean, // selectLeftFunc:any, // selectRightFunc: // } const {ccclass, property} = cc._decorator; @ccclass export default class TaskResult extends cc.Component { @property(cc.Node) selelctNode: cc.Node = null; @property(cc.Node) selelctNode2: cc.Node = null; // @property(cc.Node) // selectNode3: cc.Node = null; @property(cc.Node) successNode: cc.Node = null; // @property(cc.Node) // successNode3: cc.Node = null; // @property([cc.SpriteFrame]) // successTittleSp:cc.SpriteFrame[] = [] @property(cc.Node) failNode: cc.Node = null; // @property([cc.SpriteFrame]) // failTittleSp:cc.SpriteFrame[] = [] continueBtnFunc = null adBtnFunc = null successBtnFunc = null // resultInfo = null isLeftBtnRight = false successNode2:cc.Node = null start () { } //直接成功失败,不需要选择 initView1(id,isSuccess,continueBtnFunc,adBtnFunc?){ this.continueBtnFunc = continueBtnFunc this.adBtnFunc = adBtnFunc let selectConfig = null for(let i=0;i{ if (finish) { // Common5.ReportDY("inLevel", '任务文字剧情-AD-失败'); this.adBtnFunc && this.adBtnFunc() this.node.removeFromParent() this.node.destroy() } else{ Common5.showTips_custom("广告未观看完"); } },onFailed:()=>{ } } AppPlatform.playVideo_custom(tab) } onBtnContinue(){ this.continueBtnFunc && this.continueBtnFunc() this.node.removeFromParent() this.node.destroy() } onLeftBtnClick(){ if(this.isLeftBtnRight){ this.successBtnFunc && this.successBtnFunc() this.node.removeFromParent() this.node.destroy() }else{ this.failNode.active = true this.selelctNode.active = false } } onRightBtnClick(){ if(this.isLeftBtnRight){ this.failNode.active = true this.selelctNode.active = false }else{ this.successBtnFunc && this.successBtnFunc() this.node.removeFromParent() this.node.destroy() } } onLeftBtnClick2(){ this.continueBtnFunc && this.continueBtnFunc() this.node.removeFromParent() this.node.destroy() } onRightBtnClick2(){ let tab = { onClose: (finish)=>{ if (finish) { this.adBtnFunc && this.adBtnFunc() this.node.removeFromParent() this.node.destroy() } else{ Common5.showTips_custom("广告未观看完"); } },onFailed:()=>{ } } AppPlatform.playVideo_custom(tab) } onSuccessClick3(){ this.successBtnFunc && this.successBtnFunc() this.node.removeFromParent() this.node.destroy() } // onLeftBtnClick3(){ // this.selectNode3.active = false // this.successNode3.active = true // } // onRightBtnClick3(){ // this.selectNode3.active = false // this.failNode.active = true // } }