...
|
...
|
@@ -336,7 +336,7 @@ func CenterCompanys(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
rsp.ImToken = imInfo.ImToken
|
|
|
rsp.Accid, _ = strconv.Atoi(imInfo.ImId)
|
|
|
rsp.Phone = request.Phone
|
|
|
rsp.Credentials, _ = utils.GenerateToken(int64(phoneId), request.Phone, 60*time.Second)
|
|
|
rsp.Credentials, _ = utils.GenerateToken(int64(phoneId), request.Phone, protocol.RefreshTokenExipre*time.Second)
|
|
|
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
v = map[string]interface{}{"center": rsp}
|
...
|
...
|
@@ -358,7 +358,7 @@ func Companys(header *protocol.RequestHeader, request *protocolx.CompanysRequest |
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if claim, err = utils.ParseJWTToken(request.Credentials); err != nil {
|
|
|
err = protocol.NewErrWithMessage(4139, err)
|
|
|
err = protocol.NewErrWithMessage(4140, err)
|
|
|
return
|
|
|
}
|
|
|
loginSvr.Init(claim.Phone)
|
...
|
...
|
|