添加对应 php注册登录的token 验证逻辑
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"github.com/iapologizewhenimwrong/Vestmore_GO/utils/log"
|
||||
)
|
||||
|
||||
var respLog = log.New(0)
|
||||
|
||||
// 全局返回的结构体
|
||||
type Response struct {
|
||||
Data interface{} `json:"data"`
|
||||
@@ -25,7 +27,7 @@ func (resp *Response) Error(errcode *ErrorCode, Data ...interface{}) *Response {
|
||||
resp.ErrorText = errcode.Message
|
||||
resp.IsSuccess = false
|
||||
resp.setData(Data)
|
||||
log.Error(resp.ErrorText)
|
||||
respLog.Error(resp.ErrorText)
|
||||
return resp
|
||||
}
|
||||
|
||||
@@ -38,7 +40,7 @@ func (resp *Response) ErrorErr(Code int, err error, Data ...interface{}) *Respon
|
||||
resp.IsSuccess = false
|
||||
resp.setData(Data)
|
||||
|
||||
log.Error(resp.ErrorText)
|
||||
respLog.Error(resp.ErrorText)
|
||||
return resp
|
||||
}
|
||||
|
||||
@@ -50,7 +52,7 @@ func (resp *Response) ErrorMsg(Code int, Message string, Data ...interface{}) *R
|
||||
resp.ErrorText = Message
|
||||
resp.IsSuccess = false
|
||||
resp.setData(Data)
|
||||
log.Error(resp.ErrorText)
|
||||
respLog.Error(resp.ErrorText)
|
||||
return resp
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user