|
- package enum
-
- import "applet/app/md"
-
- type AdunitType string //广告单元类型
- var AdTypeList = []md.SelectData{
- {Name: "banner", Value: AdunitTypeForBanner},
- {Name: "激励视频", Value: AdunitTypeForRewardVideo},
- {Name: "插屏广告", Value: AdunitTypeForInterstitial},
- {Name: "视频广告", Value: AdunitTypeForVideoFeeds},
- //{Name: "视频贴片广告", Value: "5"},
- }
-
- const (
- AdunitTypeForBanner = "SLOT_ID_WEAPP_BANNER"
- AdunitTypeForRewardVideo = "SLOT_ID_WEAPP_REWARD_VIDEO"
- AdunitTypeForInterstitial = "SLOT_ID_WEAPP_INTERSTITIAL"
- AdunitTypeForVideoFeeds = "SLOT_ID_WEAPP_VIDEO_FEEDS"
- AdunitTypeForVideoBegin = "SLOT_ID_WEAPP_VIDEO_BEGIN"
- )
-
- func (gt AdunitType) String() string {
- switch gt {
- case AdunitTypeForBanner:
- return "小程序banner"
- case AdunitTypeForRewardVideo:
- return "小程序激励视频"
- case AdunitTypeForInterstitial:
- return "小程序插屏广告"
- case AdunitTypeForVideoFeeds:
- return "小程序视频广告"
- case AdunitTypeForVideoBegin:
- return "小程序视频贴片广告"
- default:
- return "未知"
- }
- }
-
- type AdunitStatus string //广告单元开关状态
-
- const (
- AdunitStatusForOn = "AD_UNIT_STATUS_ON"
- AdunitStatusForOff = "AD_UNIT_STATUS_OFF"
- )
-
- func (gt AdunitStatus) String() string {
- switch gt {
- case AdunitStatusForOn:
- return "开通"
- case AdunitStatusForOff:
- return "关闭"
- default:
- return "未知"
- }
- }
-
- type SetCoverAdposStatus int32 //广告单元开关状态
-
- const (
- SetCoverAdposStatusForOn = 1
- SetCoverAdposStatusForOff = 4
- )
-
- func (gt SetCoverAdposStatus) String() string {
- switch gt {
- case SetCoverAdposStatusForOn:
- return "开通"
- case SetCoverAdposStatusForOff:
- return "关闭"
- default:
- return "未知"
- }
- }
|