feat: 新增账号编码和HTTP连接功能

This commit is contained in:
2026-04-11 18:22:52 +08:00
parent 2f5c4f7e54
commit f8927afa9c
94 changed files with 1213 additions and 10230 deletions

View File

@@ -6,6 +6,11 @@ var (
PlatformXHS = newPlatform(gconv.PtrString("xiaohongshu"), "小红书")
PlatformDY = newPlatform(gconv.PtrString("douyin"), "抖音")
PlatformKS = newPlatform(gconv.PtrString("kuaishou"), "快手")
platformMap = map[Platform]platform{
gconv.PtrString("xiaohongshu"): PlatformXHS,
gconv.PtrString("douyin"): PlatformDY,
gconv.PtrString("kuaishou"): PlatformKS,
}
)
type Platform *string
@@ -25,3 +30,10 @@ func (s platform) Desc() string {
func newPlatform(code Platform, desc string) platform {
return platform{code: code, desc: desc}
}
func GetDescByCode(code Platform) string {
if p, ok := platformMap[code]; ok {
return p.Desc()
}
return "未知平台"
}