DataSystem.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import JsbSystem from "./JsbSystem";
  2. /**
  3. * @description 数据管理类
  4. * @author 邹勇
  5. */
  6. export default class DataSystem {
  7. constructor() {
  8. }
  9. /**
  10. * 数数打点
  11. * @param eventId 事件Id
  12. * @param des 事件内容
  13. */
  14. public sendDataEvent(eventId: string, des: string) {
  15. console.log("===[DataSystem", eventId, des);
  16. if (eventId && des) {
  17. JsbSystem.sendEvent(eventId, des);
  18. }
  19. }
  20. /**
  21. * 星云打点
  22. */
  23. public sendXYEvent(eventId: string, des: string) {
  24. if (eventId && des) {
  25. let data = {
  26. "uin": gData.loginData.uin,
  27. "isFirstDay": gData.gameData.gameData.loginDays == 1 ? 1 : 0,
  28. "umengChannel": gData.appData.umengChannel,
  29. "deviceType": gData.appData.deviceType,
  30. "androidVerison": gData.appData.androidVersion,
  31. "version": gData.appData.appVersion,
  32. "point": eventId,
  33. "description": des,
  34. "tfChannel": gData.appData.tfChannel
  35. }
  36. mk.http.sendData('cp', data);
  37. }
  38. }
  39. }