import { ryw_Event } from "../../FrameWork/Event/EventEnum"; import EventMgr from "../../FrameWork/Event/EventMgr"; import User from "../../FrameWork/User/User"; import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager"; import BagManager from "../Manager/BagManager"; import InterfaceManager from "../Manager/InterfaceManager"; import { GameType } from "../PrefabManager/PrefabManage"; const {ccclass, property} = cc._decorator; @ccclass export default class CurGameJinHuoDesc extends cc.Component { @property(cc.Node) jianTouXia: cc.Node = null; @property(cc.Node) descView: cc.Node = null; @property(cc.Node) itemNode: cc.Node = null; @property(cc.Node) jianTouShang: cc.Node = null; @property([cc.String]) curGameName:string[] = [] // LIFE-CYCLE CALLBACKS: // onLoad () {} start () { this.refreshView() EventMgr.onEvent_custom(ryw_Event.RefreshCurJinHuoDesc,()=>{ this.refreshView() },this) } refreshView(){ this.descView.removeAllChildren() let isHaveKaiye = true//InterfaceManager.getHaveKaiye(GameType.GDaoYeShouGou) let daoyeGoodList = User.getDaoyeGoodList() let mainTaskInfo:any = TaskManager.getCurUnLockMainTaskInfo() let mainId = mainTaskInfo.Id // if(this.curGameName == '小卖部' && MainTaskIdEnum.MainTask_109 == mainId){ // //1434,1435,1430,1432 // daoyeGoodList = [ // {goodId:1434}, // {goodId:1432}, // {goodId:1435}, // {goodId:1430}, // ] // } let isHaveData = false for(let i=0;i=buyNum){ numLab.string = ''+buyNum+'/'+buyNum+'' }else{ numLab.string = ''+haveNum+'/'+buyNum+'' } } }