forked from free-lancers/electricity_bill_calc_service
		
	feat(response):增加新的用于表示用户未获得授权的响应方法。
This commit is contained in:
		| @@ -42,6 +42,14 @@ func (r *Result) Error(code int, msg string) { | ||||
| 	r.Ctx.JSON(http.StatusOK, res) | ||||
| } | ||||
|  | ||||
| // 用户未获得授权)响应 | ||||
| func (r *Result) Unauthorized(msg string) { | ||||
| 	res := BaseResponse{} | ||||
| 	res.Code = http.StatusUnauthorized | ||||
| 	res.Message = msg | ||||
| 	r.Ctx.JSON(http.StatusOK, res) | ||||
| } | ||||
|  | ||||
| // 简易操作成功信息 | ||||
| func (r *Result) Success(msg string) { | ||||
| 	res := BaseResponse{} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user