This commit is contained in:
ZxwyWebSite 2023-12-19 03:13:41 +08:00
parent 8e9359e6df
commit e800fb62b2
2 changed files with 1 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,6 @@
package resp package resp
import ( import (
_ "embed"
"net/http" "net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@ -37,9 +36,6 @@ var statusMap = map[int]int{
6: http.StatusBadRequest, // 参数错误 6: http.StatusBadRequest, // 参数错误
} }
//go:embed error.base64
var errormp3 string
// 返回请求 // 返回请求
/* /*
Code不为0时调用c.Abort()终止Handler Code不为0时调用c.Abort()终止Handler
@ -51,7 +47,7 @@ func (o *Resp) Execute(c *gin.Context) {
} }
if o.Code != 0 { if o.Code != 0 {
if o.Code == 2 /*&& o.Data == ``*/ { if o.Code == 2 /*&& o.Data == ``*/ {
o.Data = errormp3 o.Data = `https://r2eu.zw-cdn.tk/gh/lx-source/static/error.mp3`
} }
c.Abort() c.Abort()
} }