// 测试 '[js]' => [ ':id' => ['test/test/js', ['method' => 'get'], ['id' => '\d+']], ':id/info' => ['test/test/info', ['method' => 'get'], ['id' => '\d+']], ],
Routing rule this line ': id' => [ ' test / test / js', [ 'method' => 'get'], [ 'id' => '\ d +']] will block the rules the next line, the next line of the route leading to never take effect
, such as: www.test.com/54 works correctly
www.test.com/54/info not take effect, and the effect is the same www.test.com/54
You can change position to
// 测试 '[js]' => [ ':id/info' => ['test/test/info', ['method' => 'get'], ['id' => '\d+']], ':id' => ['test/test/js', ['method' => 'get'], ['id' => '\d+']], ],
Routing is matched line by line