修改tpl的参数传入问题

This commit is contained in:
eson
2023-07-21 11:24:26 +08:00
parent bfa1872595
commit 44a3666d68
9 changed files with 15 additions and 11 deletions

View File

@@ -27,11 +27,11 @@ func BeforeLogic(w http.ResponseWriter, r *http.Request, l reflect.Value) (isNex
return true
}
func AfterLogic(w http.ResponseWriter, r *http.Request, resp *Response, l reflect.Value) bool {
func AfterLogic(w http.ResponseWriter, r *http.Request, l reflect.Value) bool {
m := l.MethodByName("AfterLogic")
if m.IsValid() {
m.Call([]reflect.Value{reflect.ValueOf(w), reflect.ValueOf(r), reflect.ValueOf(resp)})
m.Call([]reflect.Value{reflect.ValueOf(w), reflect.ValueOf(r)})
return true
}
return false