const ChatHelp = require('chat_help'); cc.Class({ extends: cc.Component, properties: { }, // LIFE-CYCLE CALLBACKS: editor: { // 允许当前组件在编辑器模式下运行 executeInEditMode: false, // requireComponent 参数用来指定当前组件的依赖组件 requireComponent: cc.RichText, // 当本组件添加到节点上后,禁止同类型(含子类)的组件再添加到同一个节点,防止逻辑发生冲突 disallowMultiple: true, }, handler:function(event,hash){ let params = hash.split("|"); if(params.length > 0){ if(params[0] == "jump"){ nx.bridge.jumper.jump2Window( parseInt( params[1] ) ); }else{ let link_type = params[0] ChatHelp.getInstance().onChatTouched(link_type, hash, null); } } }, // onLoad () {}, start () { }, // update (dt) {}, });