123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | API Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register API routes for your application. These
- | routes are loaded by the RouteServiceProvider within a group which
- | is assigned the "api" middleware group. Enjoy building your API!
- |
- */
- $api = app('Dingo\Api\Routing\Router');
- $api->version('v1', ['namespace' => 'App\Api\V1\Controllers'], function ($api) {
- // $api->group(['middleware' => 'sign.token'], function($api) {
- //发送验证码
- // $api->post('user/sendode', 'UserController@sendcode');
- $api->post('user/logincode', 'UserController@loginCode');
- //账户密码登陆
- $api->post('user/login', 'UserController@login');
- //微信登陆
- $api->post('user/weChatLogin', 'UserController@weChatLogin');
- //验证码动态登陆
- //Route::post('codeLogin', 'UserController@codeLogin');
- //注册
- $api->post('user/register', 'UserController@register');
- //检查手机号是否被注册
- $api->post('user/checkMobile', 'UserController@checkMobile');
- //发送验证码
- $api->post('user/sendCode', 'UserController@sendCode');
- //校验验证码
- $api->post('user/validateCode', 'UserController@validateCode');
- //找回密码
- $api->post('user/getNewPassword', 'UserController@getNewPassword');
- //登陆后才能使用的
- $api->group(['middleware' => 'token.auth'], function ($api) {
- // Endpoints registered here will have the "foo" middleware applied.
- //获取用户个人信息
- // $api->get('personalCenter', 'UserController@personalCenter');
- //修改用户信息
- $api->post('user/updatePersonalCenter', 'UserController@updatePersonalCenter');
- //修改密码
- $api->post('user/updatePassword', 'UserController@updatePassword');
- //绑定手机号
- $api->post('user/bindMobile', 'UserController@bindMobile');
- //绑定微信号
- $api->post('user/bindWeChat', 'UserController@bindWeChat');
- $api->get('user/personalcentor', 'UserController@personalCentor');
- $api->get('user/logout', 'UserController@logout');
- //用户反馈
- $api->post('user_message/feedBack', 'UserMessageController@feedBack');
- });
- //功能列表
- $api->post('features/getCategoryList', 'FeaturesController@getCategoryList');
- $api->post('features/getTagList', 'FeaturesController@getTagList');
- $api->post('features/getMenuList', 'FeaturesController@getMenuList');
- $api->post('features/getMenu', 'FeaturesController@getMenu');
- $api->post('features/getRecommend', 'FeaturesController@getRecommend');
- $api->post('features/getBannerRecommend', 'FeaturesController@getBannerRecommend');
- $api->post('features/getRecommendTag', 'FeaturesController@getRecommendTag');
- $api->post('features/selectIngredients', 'FeaturesController@selectIngredients');
- $api->post('features/selectTag', 'FeaturesController@selectTag');
- $api->post('features/selectAll', 'FeaturesController@selectAll');
- $api->post('features/getHotSearch', 'FeaturesController@getHotSearch');
- $api->post('features/feedBack', 'FeaturesController@feedBack');
- //收藏
- $api->post('features/addCollection', 'FeaturesController@addCollection');
- //2.0菜谱
- //早中晚专题
- $api->post('features/earlyMiddleAndLateTheme', 'FeaturesController@earlyMiddleAndLateTheme');
- //其他专题
- $api->post('features/otherTheme', 'FeaturesController@otherTheme');
- //最近50条菜谱
- $api->post('features/theLastRecipes', 'FeaturesController@theLastRecipes');
- //菜谱列表详情
- $api->post('features/menuList', 'FeaturesController@menuList');
- //菜谱详情
- $api->post('features/menuDetail', 'FeaturesController@menuDetail');
- //文章列表
- $api->post('features/articleList', 'FeaturesController@articleList');
- //文章详情
- $api->post('features/articleDetail', 'FeaturesController@articleDetail');
- //发现页面
- $api->post('finds/getFinds', 'FindsController@getFinds');
- //个人收藏 //收藏菜谱
- $api->post('features/collectRecipes', 'FeaturesController@collectRecipes');
- //个人收藏 //收藏发现
- $api->post('features/collectFind', 'FeaturesController@collectFind');
- //菜谱个人收藏列表
- $api->post('features/receiptPersonList', 'FeaturesController@receiptPersonList');
- //菜谱阅读
- $api->post('features/menuRead', 'FeaturesController@menuRead');
- //文章阅读
- $api->post('features/articleRead', 'FeaturesController@articleRead');
- });
|