1
This commit is contained in:
parent
5a972be601
commit
efcfe08c97
@ -61,8 +61,18 @@ func (this *UserMgr) auth(c *f5.Context) {
|
||||
func (this *UserMgr) _userLogin(c *f5.Context) {
|
||||
url := "https://mp.kingsome.cn/api/user/login"
|
||||
content := q5.NewMxoObject()
|
||||
content.SetXValue("username", c.Request("username"))
|
||||
content.SetXValue("password", c.Request("password"))
|
||||
reqObj := struct {
|
||||
UserName string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}{}
|
||||
postBody := c.GetBody().GetString()
|
||||
if err := json.Unmarshal([]byte(postBody), &reqObj); err != nil{
|
||||
c.ResponseErr(500, "服务器内部错误")
|
||||
return
|
||||
}
|
||||
f5.SysLog().Debug("boyd:%s", postBody)
|
||||
content.SetXValue("username", q5.NewXString(reqObj.UserName))
|
||||
content.SetXValue("password", q5.NewXString(reqObj.Password))
|
||||
respStr := ""
|
||||
if err := q5.HttpPostContent(url,
|
||||
"application/json;charset=utf-8",
|
||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
||||
Subproject commit 089d415abc524ea3af32952ea34ff437da56f8ff
|
||||
Subproject commit b4b8898e1192b286b00ba04628f1f28f7e0b4f13
|
Loading…
x
Reference in New Issue
Block a user