| | |
| | | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "encoding/json" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | | "time" |
| | |
| | | if flag { |
| | | authDriver := auth.GenerateAuthDriver() |
| | | loginedM := util.Struct2Map(data) |
| | | b, _ := json.Marshal(loginedM["data"]) |
| | | uMap :=make(map[string]interface{},0) |
| | | json.Unmarshal(b,uMap) |
| | | tokenStr := (*authDriver).Login(c.Request, c.Writer, uMap) |
| | | tokenStr := (*authDriver).Login(c.Request, c.Writer, loginedM) |
| | | c.JSON(200,map[string]interface{}{ |
| | | "userInfo":uMap, |
| | | "userInfo":loginedM, |
| | | "access_token":tokenStr, |
| | | "refresh_token":tokenStr, |
| | | "scope":"app", |