123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <?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->post('login', 'AuthController@authenticate');
- $api->group(['middleware' => 'auth:api'], function ($api) {
- //注册
- $api->post('reg', 'AuthController@register');
- //登出
- $api->post('logout', 'AuthController@logout');
- //刷新身份令牌
- $api->post('refresh', 'AuthController@refresh');
- });
- $api->group(['middleware' => 'jwt.chxq_auth'], function ($api) {
- //用户列表
- $api->get('user', 'UserController@index');
- //用户列表
- $api->get('memberList', 'MemberController@memberList');
- //用户详情
- $api->post('memberView', 'MemberController@view');
- //修改状态
- $api->put('updateStatus', 'MemberController@updateStatus');
- //设置属性
- $api->post('setAttr', 'MemberController@setAttr');
- //公共配置
- $api->post('configIndex', 'ConfigController@index');
- //专题列表
- $api->get('/subject/index', 'CmsSubjectController@index');
- //新增专题
- $api->post('/subject/create', 'CmsSubjectController@create');
- //查看某专题
- $api->get('/subject/view', 'CmsSubjectController@view');
- //编辑专题
- $api->put('/subject/edit', 'CmsSubjectController@edit');
- //删除专题
- $api->delete('/subject/delete', 'CmsSubjectController@delete');
- //列表修改专题状态
- $api->post('/subject/editStatus', 'CmsSubjectController@editStatus');
- //模板列表
- $api->get('/template/index', 'CmsContentTemplateController@index');
- //新建模板
- $api->post('/template/create', 'CmsContentTemplateController@create');
- //列表修改模板状态
- $api->put('/template/edit', 'CmsContentTemplateController@edit');
- //列表修改模板名称
- $api->put('/template/editName', 'CmsContentTemplateController@editTemplateName');
- //banner设置
- $api->post('/templateSet/bannerSet', 'CmsContentTemplateSetController@bannerSet');
- //专题广告设置
- $api->post('/templateSet/advertisement', 'CmsContentTemplateSetController@advertisement');
- //商品楼层设置
- $api->post('/templateSet/floorSet', 'CmsContentTemplateSetController@floorSet');
- //分类专题设置
- $api->post('/templateSet/categorySet', 'CmsContentTemplateSetController@categorySet');
- //模板内容删除
- $api->delete('/templateSetDelete', 'CmsContentTemplateSetController@templateSetDelete');
- //内容发布
- $api->post('/templateSet/release', 'CmsContentTemplateSetController@release');
- //内容预览
- $api->post('/templateSet/preview', 'CmsContentTemplateSetController@preview');
- //点击内容配置
- $api->post('/templateSet/set', 'CmsContentTemplateSetController@set');
- //获取对应城市模板名称
- $api->get('templateName', 'CmsContentTemplateSetController@templateName');
- });
- });
- $api->version('v1', [
- 'namespace' => 'App\Http\Controllers\V2',
- ], function ($api) {
- $api->group([
- 'prefix' => 'v2'
- ], function ($api) {
- $api->group(['middleware' => 'jwt.chxq_auth'], function ($api) {
- });
- //banner专题计数
- $api->post('countSubject', 'CmsContentTemplateSetController@countSubject');
- //楼层列表
- $api->get('/floor/index', 'FloorController@index');
- //新增楼层
- $api->post('/floor/create', 'FloorController@create');
- //编辑楼层
- $api->put('/floor/edit', 'FloorController@edit');
- //修改楼层状态
- $api->put('/floor/editStatus', 'FloorController@editStatus');
- //关闭banner修改楼层状态
- $api->put('floorBind', 'FloorController@floorBind');
- });
- });
|