From 288d78f66ecd1b628e8d1df7a3da99fc5e6880ec Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 08 十二月 2023 14:13:37 +0800
Subject: [PATCH] debug

---
 pkg/contextx/contextx.go |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/pkg/contextx/contextx.go b/pkg/contextx/contextx.go
index 5531fe7..1cd5c40 100644
--- a/pkg/contextx/contextx.go
+++ b/pkg/contextx/contextx.go
@@ -81,6 +81,7 @@
 	slf.ctx.JSON(http.StatusOK, ResponseList{
 		Data:  data,
 		Total: total,
+		Code:  ecode.OK,
 	})
 }
 
@@ -96,6 +97,10 @@
 	slf.Result(errCode, map[string]interface{}{}, ecode.GetMsg(errCode))
 }
 
+func (slf *Context) FailWithMsg(errCode int, msg string) {
+	slf.Result(errCode, map[string]interface{}{}, msg)
+}
+
 func (slf *Context) FailWithDetailed(errCode int, data interface{}) {
 	slf.Result(errCode, data, ecode.GetMsg(errCode))
 }

--
Gitblit v1.8.0