广告平台(站长使用)
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

adunit_enum.go 1.7 KiB

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