mirror of
https://github.com/astaxie/beego.git
synced 2025-07-04 09:20:18 +00:00
fix autorouter params
This commit is contained in:
@ -634,6 +634,14 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
runrouter = controllerType
|
||||
runMethod = mName
|
||||
findrouter = true
|
||||
//parse params
|
||||
otherurl := requestPath[len("/"+cName+"/"+strings.ToLower(mName)):]
|
||||
if len(otherurl) > 1 {
|
||||
plist := strings.Split(otherurl, "/")
|
||||
for k, v := range plist[1:] {
|
||||
context.Input.Params[strconv.Itoa(k)] = v
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user