修改tpl的参数传入问题
This commit is contained in:
@@ -25,7 +25,7 @@ func {{.HandlerName}}(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
{{if .HasResp}}resp{{end}} := l.{{.Call}}({{if .HasRequest}}&req, {{end}}userinfo)
|
||||
|
||||
if !basic.AfterLogic(w, r, resp, rl) {
|
||||
if !basic.AfterLogic(w, r, rl) {
|
||||
basic.NormalAfterLogic(w, r, resp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func New{{.logic}}(ctx context.Context, svcCtx *svc.ServiceContext) *{{.logic}}
|
||||
// }
|
||||
|
||||
// 处理逻辑后 w,r 如:重定向
|
||||
// func (l *{{.logic}}) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// func (l *{{.logic}}) AfterLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// }
|
||||
|
||||
func (l *{{.logic}}) {{.function}}({{.request}}, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
|
||||
Reference in New Issue
Block a user