Test1 - 001.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Learn cc.Class:
  2. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/class.html
  3. // Learn Attribute:
  4. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
  5. // Learn life-cycle callbacks:
  6. // - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
  7. cc.Class({
  8. extends: cc.Component,
  9. properties: {
  10. // foo: {
  11. // // ATTRIBUTES:
  12. // default: null, // The default value will be used only when the component attaching
  13. // // to a node for the first time
  14. // type: cc.SpriteFrame, // optional, default is typeof default
  15. // serializable: true, // optional, default is true
  16. // },
  17. // bar: {
  18. // get () {
  19. // return this._bar;
  20. // },
  21. // set (value) {
  22. // this._bar = value;
  23. // }
  24. // },
  25. },
  26. // LIFE-CYCLE CALLBACKS:
  27. // onLoad () {},
  28. start () {
  29. },
  30. gift(){
  31. var cMD_GP_GIFT = new CMD_GP_GIFT();
  32. cMD_GP_GIFT.dwUserID = g_GlobalUserInfo.GetGlobalUserData().dwUserID;
  33. cMD_GP_GIFT.dwPlatformId = 0;
  34. cMD_GP_GIFT.dwShopGiftId = 1;
  35. cMD_GP_GIFT.dwNum = 1;//数量
  36. cMD_GP_GIFT.dwType = 1;//1购买gift 2 赠送 3兑换
  37. var LoginMission = new CGPLoginMission(this, MDM_GP_USER_SERVICE, SUB_GP_GIFT_OPERATION, cMD_GP_GIFT);
  38. }
  39. // update (dt) {},
  40. });