$value) { Route::rule($value, 'index/singlepage/detail?id=' . $key . '&view=' . $value, 'get', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']); } Route::group('product', [ 'detail/:id/[:color]' => ['index/product/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+', 'color' => '[0-9a-zA-Z_-]+']], 'category/:id' => ['index/product/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'subcategory/:id' => ['index/product/subcatelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['index/product/lists', ['ext' => 'html']], ]); Route::group('uk/product', [ 'detail/:id/[:color]' => ['uk/product/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+', 'color' => '[0-9a-zA-Z_-]+']], 'category/:id' => ['uk/product/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'subcategory/:id' => ['uk/product/subcatelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['uk/product/lists', ['ext' => 'html']], ]); Route::group('article', [ 'detail/:id' => ['index/article/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['index/article/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['index/article/catelists?id=1', ['ext' => 'html']], ]); Route::group('uk/article', [ 'detail/:id' => ['uk/article/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['uk/article/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['uk/article/catelists?id=1', ['ext' => 'html']], ]); Route::group('video', [ 'detail/:id' => ['index/video/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['index/video/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['index/video/lists', ['ext' => 'html']], ]); Route::group('uk/video', [ 'detail/:id' => ['uk/video/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['uk/video/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['uk/video/lists', ['ext' => 'html']], ]); Route::group('download', [ 'detail/:id' => ['index/download/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['index/download/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '/$' => ['index/download/catelists?id=1', ['ext' => 'html']], ]); Route::group('uk/download', [ 'detail/:id' => ['uk/download/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'category/:id' => ['uk/download/catelists', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], '$' => ['uk/download/catelists?id=1', ['ext' => 'html']], ]); Route::rule([ 'ad_js/:id' => ['index/ad/index', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'ad_tp/:id' => ['index/ad/adtp', ['method' => 'get', 'ext' => 'html'], ['id' => '[0-9a-zA-Z_-]+']], 'ad_tag/:tags/[:num]' => ['index/ad/tags', ['method' => 'get', 'ext' => 'html'], ['tags' => '[0-9a-zA-Z_-]+', 'num' => '\d+']], 'ad_tagli/:tags/[:num]' => ['index/ad/tagsli', ['method' => 'get', 'ext' => 'html'], ['tags' => '[0-9a-zA-Z_-]+', 'num' => '\d+']], 'ad_cat/:id/[:num]' => ['index/ad/cat', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+', 'num' => '\d+']], 'singlepage/:id' => ['index/singlepage/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'search$' => ['index/search/index', ['ext' => 'html']], 'dlsearch$' => ['index/download/search?id=1', ['ext' => 'html']], 'dl/:id/[:bit]$' => ['index/download/download', ['ext' => 'html'], ['id' => '\d+', 'bit' => '[0-9]+']], 'prodl/:id$' => ['index/download/prodownload', ['ext' => 'html'], ['id' => '\d+']], 'pinglunadd$' => ['index/pinglun/add', ['method' => 'post'], ['id' => '\d+']], 'pinglun/[:type]/[:cid]$' => ['index/pinglun/lists', [], ['type' => '[0-9a-zA-Z_-]+', 'cid' => '\d+']], //英国 'uk/ad_js/:id' => ['uk/ad/index', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'uk/ad_tp/:id' => ['uk/ad/adtp', ['method' => 'get', 'ext' => 'html'], ['id' => '[0-9a-zA-Z_-]+']], 'uk/ad_tag/:tags/[:num]' => ['uk/ad/tags', ['method' => 'get', 'ext' => 'html'], ['tags' => '[0-9a-zA-Z_-]+', 'num' => '\d+']], 'uk/ad_tagli/:tags/[:num]' => ['uk/ad/tagsli', ['method' => 'get', 'ext' => 'html'], ['tags' => '[0-9a-zA-Z_-]+', 'num' => '\d+']], 'uk/ad_cat/:id/[:num]' => ['uk/ad/cat', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+', 'num' => '\d+']], 'uk/singlepage/:id' => ['uk/singlepage/detail', ['method' => 'get', 'ext' => 'html'], ['id' => '\d+']], 'uk/search$' => ['uk/search/index', ['ext' => 'html']], 'uk/dlsearch$' => ['uk/download/search?id=1', ['ext' => 'html']], 'uk/dl/:id/[:bit]$' => ['uk/download/download', ['ext' => 'html'], ['id' => '\d+', 'bit' => '[0-9]+']], 'uk/prodl/:id$' => ['uk/download/prodownload', ['ext' => 'html'], ['id' => '\d+']], 'uk/pinglunadd$' => ['uk/pinglun/add', ['method' => 'post'], ['id' => '\d+']], 'uk/pinglun/[:type]/[:cid]$' => ['uk/pinglun/lists', [], ['type' => '[0-9a-zA-Z_-]+', 'cid' => '\d+']], ]); return [ '__pattern__' => [ 'name' => '\w+', ], // 路由规则定义 'login$' => ['index/customer/index', ['ext' => 'html']], 'logout$' => ['index/customer/logout', ['ext' => 'html']], 'register$' => ['index/customer/register', ['ext' => 'html']], 'forgetpwd$' => ['index/customer/forgetpwd', ['ext' => 'html']], 'authcode/[:id]' => ['index/authcode/verify', ['ext' => 'html'], ['id' => '[a-zA-Z0-9]+']], //英国路由 'uk/login$' => ['uk/customer/index', ['ext' => 'html']], 'uk/logout$' => ['uk/customer/logout', ['ext' => 'html']], 'uk/register$' => ['uk/customer/register', ['ext' => 'html']], 'uk/forgetpwd$' => ['uk/customer/forgetpwd', ['ext' => 'html']], 'uk/authcode/[:id]' => ['uk/authcode/verify', ['ext' => 'html'], ['id' => '[a-zA-Z0-9]+']], // 路由规则定义 'signin$' => ['admin/passport/index', []], 'signout$' => ['admin/passport/logout', []], 'adminregister$' => ['admin/passport/register', []], 'adminforgetpwd$' => ['admin/passport/forgetpwd', []], 'captcha/[:id]' => ['admin/authcode/verify', ['ext' => 'html'], ['id' => '[a-zA-Z0-9]+']], // // 路由规则定义 // 'signin$' => ['adminUK/passport/index', []], // 'signout$' => ['adminUK/passport/logout', []], // 'adminregister$' => ['adminUK/passport/register', []], // 'adminforgetpwd$' => ['adminUK/passport/forgetpwd', []], // 'captcha/[:id]' => ['adminUK/authcode/verify', ['ext' => 'html'], ['id' => '[a-zA-Z0-9]+']], ];