package public import ( "net/http" "strings" ) //判断是否是微信访问 func CheckWxBrowser(Request *http.Request) bool { if strings.Index(Request.UserAgent(), "MicroMessenger") > -1 || strings.Index(Request.UserAgent(), "Wechat") > -1 { return true } else { return false } }