|
@@ -202,7 +202,7 @@ type WxCheckContentJson struct {
|
|
|
Scope string `json:"scope"`
|
|
|
Errcode int `json:"errcode"`
|
|
|
Errmsg string `json:"errmsg"`
|
|
|
- Detail WxCheckContentJsonDetail `json:"det"`
|
|
|
+ Detail []WxCheckContentJsonDetail `json:"det"`
|
|
|
}
|
|
|
|
|
|
type WxCheckContentJsonDetail struct {
|
|
@@ -213,7 +213,7 @@ type WxCheckContentJsonDetail struct {
|
|
|
Errcode int
|
|
|
}
|
|
|
|
|
|
-func WxCheckContent(content string) (detail WxCheckContentJsonDetail) {
|
|
|
+func WxCheckContent(content string) (errCode int, keyWord string) {
|
|
|
accessToken, err := GetWxAccessToken()
|
|
|
if err != nil {
|
|
|
utils.FileLog.Info("GetWxAccessToken Err:%s", err.Error())
|
|
@@ -233,6 +233,11 @@ func WxCheckContent(content string) (detail WxCheckContentJsonDetail) {
|
|
|
fmt.Println("Unmarshal Err:", err.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if len(item.Detail) > 0{
|
|
|
+ for _, v := range item.Detail {
|
|
|
+ keyWord += v.KeyWord
|
|
|
+ }
|
|
|
+ }
|
|
|
fmt.Println(result)
|
|
|
- return item.Detail
|
|
|
+ return
|
|
|
}
|