feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -0,0 +1,32 @@
package response
import (
"encoding/json"
)
const (
NeedLogin = "6018" // 登陆过期
)
type Response struct {
Code string
Result interface{}
Msg string
}
func Fail(msg string) BaseResponse {
response := BaseResponse{Code: ErrorCode, Msg: msg}
return response
}
func Invalid() string {
response := BaseResponse{Code: NeedLogin, Msg: "用户身份已过期,请重新登录!"}
str, _ := json.Marshal(response)
return string(str)
}
func Success(Result interface{}) BaseResponse {
response := BaseResponse{Code: SuccessCode, Result: Result}
return response
}