广告平台(媒体使用)
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

adunit_enum.go 1.4 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package enum
  2. type AdunitType string //广告单元类型
  3. const (
  4. AdunitTypeForBanner = "SLOT_ID_WEAPP_BANNER"
  5. AdunitTypeForRewardVideo = "SLOT_ID_WEAPP_REWARD_VIDEO"
  6. AdunitTypeForInterstitial = "SLOT_ID_WEAPP_INTERSTITIAL"
  7. AdunitTypeForVideoFeeds = "SLOT_ID_WEAPP_VIDEO_FEEDS"
  8. AdunitTypeForVideoBegin = "SLOT_ID_WEAPP_VIDEO_BEGIN"
  9. )
  10. func (gt AdunitType) String() string {
  11. switch gt {
  12. case AdunitTypeForBanner:
  13. return "小程序banner"
  14. case AdunitTypeForRewardVideo:
  15. return "小程序激励视频"
  16. case AdunitTypeForInterstitial:
  17. return "小程序插屏广告"
  18. case AdunitTypeForVideoFeeds:
  19. return "小程序视频广告"
  20. case AdunitTypeForVideoBegin:
  21. return "小程序视频贴片广告"
  22. default:
  23. return "未知"
  24. }
  25. }
  26. type AdunitStatus string //广告单元开关状态
  27. const (
  28. AdunitStatusForOn = "AD_UNIT_STATUS_ON"
  29. AdunitStatusForOff = "AD_UNIT_STATUS_OFF"
  30. )
  31. func (gt AdunitStatus) String() string {
  32. switch gt {
  33. case AdunitStatusForOn:
  34. return "开通"
  35. case AdunitStatusForOff:
  36. return "关闭"
  37. default:
  38. return "未知"
  39. }
  40. }
  41. type SetCoverAdposStatus int32 //广告单元开关状态
  42. const (
  43. SetCoverAdposStatusForOn = 1
  44. SetCoverAdposStatusForOff = 4
  45. )
  46. func (gt SetCoverAdposStatus) String() string {
  47. switch gt {
  48. case SetCoverAdposStatusForOn:
  49. return "开通"
  50. case SetCoverAdposStatusForOff:
  51. return "关闭"
  52. default:
  53. return "未知"
  54. }
  55. }