mirror of
https://gitee.com/luojinyi/likeadmin_go.git
synced 2025-12-24 08:12:57 +08:00
Merge branch 'develop' into feat-v1.1
This commit is contained in:
@@ -155,7 +155,11 @@ func IsFailWithResp(c *gin.Context, err error) bool {
|
||||
switch v := err.(type) {
|
||||
// 自定义类型
|
||||
case RespType:
|
||||
Fail(c, v)
|
||||
data := v.Data()
|
||||
if data == nil {
|
||||
data = []string{}
|
||||
}
|
||||
FailWithData(c, v, data)
|
||||
// 其他类型
|
||||
default:
|
||||
Fail(c, SystemError)
|
||||
|
||||
Reference in New Issue
Block a user