🔥 改为前后端分离形式
This commit is contained in:
16
common/response/success.go
Normal file
16
common/response/success.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package response
|
||||
|
||||
// Success
|
||||
// @description: 成功响应
|
||||
// @receiver r
|
||||
// @param data
|
||||
// @return err
|
||||
func (r *Response) Success() {
|
||||
if r.msg == "" {
|
||||
r.msg = "success"
|
||||
}
|
||||
if r.code == 0 {
|
||||
r.code = success
|
||||
}
|
||||
r.Result()
|
||||
}
|
||||
Reference in New Issue
Block a user