12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | Application Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register all of the routes for an application.
- | It is a breeze. Simply tell Lumen the URIs it should respond to
- | and give it the Closure to call when that URI is requested.
- |
- */
- $api = app('Dingo\Api\Routing\Router');
- $api->version('v1', [
- 'namespace' => 'App\Http\Controllers',
- ], function ($api) {
- //登录+验签
- $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
- });
- $api->group(['middleware' => 'chxq_sign'], function ($api) {
- //内容预览
- $api->post('/templateSet/preview', 'CmsContentTemplateSetController@preview');
- //获取首页模板名称
- $api->get('/templateSet/templateName', 'CmsContentTemplateSetController@template');
- //首页商品列表
- $api->get('/templateSet/productList', 'CmsContentTemplateSetController@productList');
- });
- $api->group(['middleware' => 'chxq_jwt_auth'], function ($api) {
- });
- //兑换商城首页
- $api->get('/template/exchange', 'CmsContentTemplateSetController@exchangeMall');
- //获取左一右二/上一下三专题下的商品
- $api->get('/subject/products', 'CmsContentTemplateSetController@getProducts');
- });
- $api->version('v1', [
- 'namespace' => 'App\Http\Controllers\V2',
- ], function ($api) {
- $api->group([
- 'prefix' => 'v2'
- ], function ($api) {
- //获取楼层信息
- $api->get('/floor/info', 'FloorController@info');
- //热门视频ids
- $api->get('/floor/hotVideoIds', 'FloorController@hotVideoIds');
- //获取推荐用户组内容
- $api->get('memberList', 'MemberGroupController@memberList');
-
- $api->group(['middleware' => 'chxq_jwt_auth'], function ($api) {
- //楼层列表
- $api->get('/floor/index', 'FloorController@index');
- });
- });
- });
|