Browse Source

feat:验证

wangshan 3 years ago
parent
commit
cd2ff9ffd9
1 changed files with 4 additions and 2 deletions
  1. 4 2
      common/mgosl.go

+ 4 - 2
common/mgosl.go

@@ -6,7 +6,7 @@ package common
 
 import (
 	"app.yhyue.com/moapp/jybase/mongodb"
-	"encoding/json"
+	"io/ioutil"
 	"log"
 	"net/http"
 	"regexp"
@@ -31,8 +31,10 @@ func AddMgoLogs(mgoLog mongodb.MongodbSim, r *http.Request, tableName string, Ex
 	agent := r.Header.Get("user-agent")
 	ref := r.Referer()
 	s_url := r.RequestURI
-	md, _ := json.Marshal(r.Form)
+	md, _ := ioutil.ReadAll(r.Body)
+	//md, _ := json.Marshal(r.Form)
 	str := string(md)
+	log.Println("str:", str)
 	logs := map[string]interface{}{
 		"date":      timeNow.Unix(),
 		"ip":        GetIp(r),