functionOpenHandler.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var FunctionOpenHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. FunctionOpenHandler.prototype.getFunctionListRequest = async(function(){
  12. return await(this.socket.requestAsync('area.functionOpenHandler.getFunctionListRequest',{}));
  13. });
  14. FunctionOpenHandler.prototype.setFunctionPlayedRequest = async(function(functionId){
  15. return await(this.socket.requestAsync('area.functionOpenHandler.setFunctionPlayedRequest',{functionId:functionId}));
  16. });
  17. FunctionOpenHandler.prototype.receiveFunctionAwardRequest = async(function(guide_id){
  18. return await(this.socket.requestAsync('area.functionOpenHandler.receiveFunctionAwardRequest',{guide_id:guide_id}));
  19. });
  20. FunctionOpenHandler.prototype.onFunctionOpenListPush = function(cb){
  21. this.socket.on('area.functionOpenPush.functionOpenListPush',cb);
  22. }
  23. FunctionOpenHandler.prototype.onFunctionAwardListPush = function(cb){
  24. this.socket.on('area.functionOpenPush.functionAwardListPush',cb);
  25. }
  26. module.exports = FunctionOpenHandler;