ADLog.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { _decorator, Component, Node } from 'cc';
  2. import { Http } from './core/net/Http';
  3. import { g } from './Data/g';
  4. const { ccclass, property } = _decorator;
  5. @ccclass('ADLog')
  6. export class ADLog extends Component {
  7. @property({ type: Http })
  8. public http: Http;
  9. update() {
  10. // if (g.adData.interstitalADShow) {
  11. // g.adData.ad_type = 2;
  12. // g.adData.interstitalADShow = false;
  13. // //视频上报
  14. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  15. // }
  16. // if (g.adData.nativeExpressADShow) {
  17. // g.adData.ad_type = 3;
  18. // g.adData.nativeExpressADShow = false;
  19. // //视频上报
  20. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  21. // }
  22. // if (g.adData.fullScreenADComplete) {
  23. // g.adData.ad_type = 8;
  24. // g.adData.fullScreenADComplete = false;
  25. // //视频上报
  26. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  27. // }
  28. // if (g.adData.fullScreenADShow) {
  29. // g.adData.ad_type = 9;
  30. // g.adData.fullScreenADShow = false;
  31. // //视频上报
  32. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  33. // }
  34. // if (g.adData.fullScreenADError) {
  35. // g.adData.ad_type = 10;
  36. // g.adData.fullScreenADError = false;
  37. // //视频上报
  38. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  39. // }
  40. // if (g.adData.interstitalADError) {
  41. // g.adData.ad_type = 11;
  42. // g.adData.interstitalADError = false;
  43. // //视频上报
  44. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  45. // }
  46. // if (g.adData.nativeExpressADError) {
  47. // g.adData.ad_type = 12;
  48. // g.adData.nativeExpressADError = false;
  49. // //视频上报
  50. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  51. // }
  52. // if(g.adData.splashADShow ){
  53. // g.adData.ad_type = 6;
  54. // g.adData.splashADShow = false;
  55. // //视频上报
  56. // this.http.send("/api/ad/videoLog", { adData: g.adData });
  57. // }
  58. }
  59. }