liuxiaolong
2019-07-05 610736e3e12fec98f34910bad1b9f8fe9a980054
controllers/user.go
@@ -2,7 +2,6 @@
import (
   "basic.com/dbapi.git"
   "encoding/json"
   "fmt"
   "github.com/gin-gonic/gin"
   "time"
@@ -42,12 +41,9 @@
   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",