1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-22 21:32:25 +08:00

feat: optimized-error-handling

This commit is contained in:
markwang
2024-03-15 16:23:48 +08:00
parent 6053598a03
commit ea684369a9
7 changed files with 93 additions and 0 deletions

View File

@@ -21,6 +21,13 @@ const (
customerServiceTypingURL = "https://api.weixin.qq.com/cgi-bin/message/custom/typing"
)
const (
// Typing 表示正在输入状态
Typing TypingStatus = "Typing"
// CancelTyping 表示取消正在输入状态
CancelTyping TypingStatus = "CancelTyping"
)
// Manager 客服管理者,可以管理客服
type Manager struct {
*context.Context

View File

@@ -11,6 +11,31 @@ import (
// AdSlot 广告位类型
type AdSlot string
const (
// SlotIDBizBottom 公众号底部广告
SlotIDBizBottom AdSlot = "SLOT_ID_BIZ_BOTTOM"
// SlotIDBizMidContext 公众号文中广告
SlotIDBizMidContext AdSlot = "SLOT_ID_BIZ_MID_CONTEXT"
// SlotIDBizVideoEnd 公众号视频后贴
SlotIDBizVideoEnd AdSlot = "SLOT_ID_BIZ_VIDEO_END"
// SlotIDBizSponsor 公众号互选广告
SlotIDBizSponsor AdSlot = "SLOT_ID_BIZ_SPONSOR"
// SlotIDBizCps 公众号返佣商品
SlotIDBizCps AdSlot = "SLOT_ID_BIZ_CPS"
// SlotIDWeappBanner 小程序banner
SlotIDWeappBanner AdSlot = "SLOT_ID_WEAPP_BANNER"
// SlotIDWeappRewardVideo 小程序激励视频
SlotIDWeappRewardVideo AdSlot = "SLOT_ID_WEAPP_REWARD_VIDEO"
// SlotIDWeappInterstitial 小程序插屏广告
SlotIDWeappInterstitial AdSlot = "SLOT_ID_WEAPP_INTERSTITIAL"
// SlotIDWeappVideoFeeds 小程序视频广告
SlotIDWeappVideoFeeds AdSlot = "SLOT_ID_WEAPP_VIDEO_FEEDS"
// SlotIDWeappVideoBegin 小程序视频前贴
SlotIDWeappVideoBegin AdSlot = "SLOT_ID_WEAPP_VIDEO_BEGIN"
// SlotIDWeappBox 小程序格子广告
SlotIDWeappBox AdSlot = "SLOT_ID_WEAPP_BOX"
)
const (
publisherURL = "https://api.weixin.qq.com/publisher/stat"
)

View File

@@ -18,6 +18,23 @@ const (
// PublishStatus 发布状态
type PublishStatus uint
const (
// PublishStatusSuccess 0:成功
PublishStatusSuccess PublishStatus = iota
// PublishStatusPublishing 1:发布中
PublishStatusPublishing
// PublishStatusOriginalFail 2:原创失败
PublishStatusOriginalFail
// PublishStatusFail 3:常规失败
PublishStatusFail
// PublishStatusAuditRefused 4:平台审核不通过
PublishStatusAuditRefused
// PublishStatusUserDeleted 5:成功后用户删除所有文章
PublishStatusUserDeleted
// PublishStatusSystemBanned 6:成功后系统封禁所有文章
PublishStatusSystemBanned
)
// FreePublish 发布能力
type FreePublish struct {
*context.Context