/user/info接口ok
This commit is contained in:
parent
2328d6bc29
commit
b39352dda4
@ -40,7 +40,24 @@ func (this *UserMgr) _userLogin(w *http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (this *UserMgr) _userInfo(w *http.ResponseWriter, r *http.Request) {
|
||||
token := q5.Request(r, "token").GetString()
|
||||
|
||||
url := "https://mp.kingsome.cn/api/user/info"
|
||||
params := q5.NewMxoObject()
|
||||
respStr, err := q5.HttpGetEx(url,
|
||||
params.AsXObject(),
|
||||
func (setOpt func(int32, *q5.XValue, *q5.XValue)) {
|
||||
setOpt(q5.HTTP_OPT_ADD_HEADER,
|
||||
q5.NewXString("authorization"),
|
||||
q5.NewXString("Bearer " + token))
|
||||
})
|
||||
if err == nil {
|
||||
f5.SysLog().Debug("respStr:%s", respStr)
|
||||
q5.Response(w, respStr)
|
||||
} else {
|
||||
f5.SysLog().Debug("respStr:%s", err)
|
||||
q5.ResponseOk(w)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *UserMgr) _userLogout(w *http.ResponseWriter, r *http.Request) {
|
||||
|
2
third_party/q5
vendored
2
third_party/q5
vendored
@ -1 +1 @@
|
||||
Subproject commit c832144308869ebe389104a1e36392c3abc9f875
|
||||
Subproject commit 03ffea28fe8ea799b2ae9fc04e438b44a9253faf
|
Loading…
x
Reference in New Issue
Block a user