123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?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' => 'jwt.chxq_auth'], function ($api) {
- //配置
- $api->get('config', 'ConfigController@index');
- //下载列表
- $api->get('download', 'DownloadController@index');
- //新增下载
- $api->post('download', 'DownloadController@create');
- //测试用户统计
- $api->get('memberStatistics', 'MemberStatisticsController@index');
- //详情
- $api->get('memberStatistics/view', 'MemberStatisticsController@view');
- //获取上传凭证和地址
- $api->get('getVodUploadAuth', 'AliYunVodController@getVodUploadAuth');
- //根据videoId获取播放地址
- $api->get('getPlayUrlByVideoId', 'AliYunVodController@getPlayUrlByVideoId');
- $api->group(['namespace' => 'Post'], function ($api) {
- $api->get('statistics', 'PostController@statistics');
- //发布内容
- $api->post('post', 'PostController@create');
- //编辑发布内容话题
- $api->put('post/topic', 'PostController@updateTopic');
- //内容列表
- $api->get('post', 'PostController@index');
- //内容详情
- $api->get('post/detail', 'PostController@detail');
- //内容类型
- $api->get('post/getType', 'PostController@getType');
- //推荐内容
- $api->put('post/suggest', 'PostController@suggest');
- //删除内容
- $api->delete('post/delete', 'PostController@delete');
- //隐藏内容
- $api->put('post/hide', 'PostController@hide');
- //增加数据
- $api->put('post/addData', 'PostController@addData');
- //评论列表
- $api->get('post/comment', 'PostController@commentList');
- //评论&回复
- $api->post('post/comment', 'PostController@comment');
- //删除评论
- $api->delete('post/comment/delete', 'PostController@commentDelete');
- //回收站列表
- $api->get('post/waste', 'PostController@waste');
- //回收站复原
- $api->put('post/waste', 'PostController@restore');
- //日志列表
- $api->get('post/log', 'PostController@log');
- //添加网站内容
- $api->post('post/store', 'PostController@createStore');
- //获取网站内容
- $api->get('post/store', 'PostController@getStore');
- //网站内容详情
- $api->get('post/store/detail', 'PostController@getStoreDetail');
- });
- $api->group(['namespace' => 'Topic'], function ($api) {
- //重置话题redis
- $api->put('topic/resetRedis', 'TopicController@resetRedis');
- //新增话题分类
- $api->post('topic/categoryCreate', 'CategoryController@create');
- //话题分类列表
- $api->get('topic/categoryIndex', 'CategoryController@index');
- //话题分类详情
- $api->get('topic/categoryView', 'CategoryController@view');
- //推荐分类
- $api->put('topic/categoryIsSuggest', 'CategoryController@isSuggest');
- //开启分类
- $api->put('topic/category/is_open', 'CategoryController@isOpen');
- //编辑话题
- $api->put('topic/categoryEdit', 'CategoryController@edit');
- //新增话题
- $api->post('topic/topicCreate', 'TopicController@create');
- //编辑话题
- $api->put('topic/topicEdit', 'TopicController@edit');
- //列表
- $api->get('topic/topicIndex', 'TopicController@index');
- //详情
- $api->get('topic/topicView', 'TopicController@view');
- //开启话题
- $api->put('topic/topicIsOpen', 'TopicController@isOpen');
- //设置推荐 &热门话题
- $api->put('topic/topicSetStatus', 'TopicController@setStatus');
- //获取多个话题
- $api->get('topic/getTopic', 'TopicController@getTopic');
- //获取用户关注话题
- $api->get('topic/getMemberTopic', 'TopicController@getMemberTopic');
- });
- //行为
- $api->group(['namespace' => 'Behavior'], function ($api) {
- //行为列表
- $api->get('behavior/list', 'BehaviorController@index');
- //登记/注册行为
- $api->post('behavior/create', 'BehaviorController@create');
- //编辑行为
- $api->put('behavior/edit', 'BehaviorController@edit');
- //列表修改行为状态(行为管理)
- $api->post('behavior/editStatus', 'BehaviorController@editStatus');
- //行为数据列表
- $api->get('behavior/behaviorData', 'BehaviorController@behaviorData');
- //行为日志列表
- $api->get('behavior/log', 'LogController@index');
- //用户注册账单列表
- $api->get('registeredRecord/list', 'RegisteredRecordController@index');
- //评论账本列表
- $api->get('CommentRecord/list', 'CommentRecordController@index');
- //发布账本列表
- $api->get('ReleaseRecord/list', 'ReleaseRecordController@index');
- //阅读/分享/收藏等普通行为账单
- $api->get('generalRecord/list', 'GeneralRecordController@index');
- });
- //音乐分类列表
- $api->get('music/category/list', 'MusicController@categoryList');
- //新增音乐分类
- $api->post('music/category/create', 'MusicController@categoryCreate');
- //编辑音乐分类
- $api->put('music/category/create', 'MusicController@categoryEdit');
- //修改音乐分类状态
- $api->put('music/category/status', 'MusicController@editStatus');
- //删除音乐分类
- $api->delete('music/category/delete', 'MusicController@categoryDelete');
- //音乐列表
- $api->get('music/list', 'MusicController@musicList');
- //新建音乐
- $api->post('music/create', 'MusicController@musicCreate');
- //修改音乐
- $api->put('music/create', 'MusicController@musicEdit');
- //删除音乐
- $api->delete('music/delete', 'MusicController@musicDelete');
- //用户上传音乐列表
- $api->get('music/upload/list', 'MusicController@userMusic');
- });
- });
|