From d89d43b04fbb40a5ebe82f69d8abb6255251ed71 Mon Sep 17 00:00:00 2001 From: iyear Date: Sat, 28 Mar 2020 14:58:17 +0800 Subject: [PATCH] Fix ReadMails --- outlook.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/outlook.go b/outlook.go index 0affc0e..8c75fdf 100644 --- a/outlook.go +++ b/outlook.go @@ -126,7 +126,10 @@ func OutLookGetMails(accesstoken string) bool { resp, _ := client.Do(req) defer resp.Body.Close() content, _ := ioutil.ReadAll(resp.Body) - if gjson.Get(string(content), "@odata.context").String() != "" { + fmt.Println(string(content)) + + //这里的.需要转义,否则会按路径的方式解析 + if gjson.Get(string(content), "@odata\\.context").String() != "" { return true } return false