|
|
@@ -14,12 +14,12 @@ import (
|
|
|
|
|
|
// Login 账户登录
|
|
|
// @Summary 账户登录
|
|
|
-// @accept application/json
|
|
|
-// @Produce application/json
|
|
|
+// @accept application/json
|
|
|
+// @Produce application/json
|
|
|
// @Param data body request.LoginReq true "登录入参"
|
|
|
// @Success 200 {object} response.Response{data=accountRsp.LoginRsp,msg=string} "返回包括用户信息,token,过期时间"
|
|
|
// @Router /Account/Login [post]
|
|
|
-// @Tags 账户服务
|
|
|
+// @Tags 账户服务
|
|
|
func Login(c *gin.Context) {
|
|
|
g := utils.GinUtils{C: c}
|
|
|
r := request.LoginReq{}
|
|
|
@@ -37,3 +37,15 @@ func Login(c *gin.Context) {
|
|
|
response.FailWithMessage(err.Error(), c)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// TokenCheck Token校验
|
|
|
+// @Summary Token校验
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @accept application/json
|
|
|
+// @Produce application/json
|
|
|
+// @Success 200 {object} response.Response{msg=string} "操作成功"
|
|
|
+// @Router /Account/TokenCheck [get]
|
|
|
+// @Tags 账户服务
|
|
|
+func TokenCheck(c *gin.Context) {
|
|
|
+ response.Ok(c)
|
|
|
+}
|