mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 21:02:25 +08:00
Update menu.go (#271)
* Update menu.go
json: cannot unmarshal string into Go struct field MatchRule.conditionalmenu.matchrule.group_id of type int32
接口返回是字符串
"matchrule": {
"group_id": "2"
}
结构体定义
//MatchRule 个性化菜单规则
type MatchRule struct {
GroupID int32 json:"group_id,omitempty"
...
}
* matchrule字段均是字符串
"matchrule": {
"tag_id": "2",
"sex": "1",
"country": "中国",
"province": "广东",
"city": "广州",
"client_platform_type": "2",
"language": "zh_CN"
}
This commit is contained in:
@@ -102,12 +102,12 @@ type ButtonNew struct {
|
||||
|
||||
//MatchRule 个性化菜单规则
|
||||
type MatchRule struct {
|
||||
GroupID int32 `json:"group_id,omitempty"`
|
||||
Sex int32 `json:"sex,omitempty"`
|
||||
GroupID string `json:"group_id,omitempty"`
|
||||
Sex string `json:"sex,omitempty"`
|
||||
Country string `json:"country,omitempty"`
|
||||
Province string `json:"province,omitempty"`
|
||||
City string `json:"city,omitempty"`
|
||||
ClientPlatformType int32 `json:"client_platform_type,omitempty"`
|
||||
ClientPlatformType string `json:"client_platform_type,omitempty"`
|
||||
Language string `json:"language,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user