AppData.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * @description 应用数据
  3. * @author 邹勇
  4. */
  5. export class AppData {
  6. /** 错误日志游戏名标志,尽量短 */
  7. public appNameBugly: string = '3xiao';
  8. public appVersion: string = '';
  9. /** 投放渠道号 */
  10. public tfChannel: string = '';
  11. /** api版本 */
  12. public version: string = '1.0.0';
  13. /** 李杨/悍国服的appId */
  14. // public appId: string = 'wxcf31f0e54f7fefda';
  15. /** 测试服/正式服的appId */
  16. public appId: string = 'wxcf31f0e54f7fefda';
  17. /** 友盟渠道 */
  18. public umengChannel:string = '';
  19. /** 设备型号 */
  20. public deviceType:string = '';
  21. /** 安卓版本号 */
  22. public androidVersion:string = '';
  23. public mac: string = 'c9:05:e2:1c:b2:23,f6:60:e4:1a:b7:27';
  24. /** 设备信息 */
  25. public machineInfo = {
  26. "android_id": "",
  27. "idfa": "",
  28. "imei": "",
  29. "mac": "",
  30. "oaid": "",
  31. "umid": ""
  32. };
  33. /**
  34. * 更新设备信息
  35. * @description 自定义功能 JavaToCocos
  36. * @param info info(Java返回)
  37. */
  38. public updateDeviceInfo(info) {
  39. let arr = info.split('#')
  40. this.machineInfo.android_id = arr[0];
  41. this.machineInfo.idfa = arr[1];
  42. this.machineInfo.imei = arr[2];
  43. this.machineInfo.mac = this.mac = arr[3];
  44. this.machineInfo.oaid = arr[4];
  45. this.machineInfo.umid = arr[5];
  46. this.tfChannel = arr[6];
  47. this.appVersion = arr[7];
  48. /** 友盟渠道 */
  49. this.umengChannel = arr[8];
  50. /** 设备型号 */
  51. this.deviceType = arr[9];
  52. /** 安卓版本号 */
  53. this.androidVersion = arr[10];
  54. }
  55. public init() {
  56. }
  57. }