1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?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\V1',
- ], function ($api) {
- //登陆
- $api->post('login', 'AuthController@login');
- //获取商户信息
- $api->post('getShopInfo', 'ShopController@getTokenShop');
- //$api->group(['middleware' => 'chxq.shop_check'], function ($api) {});
- $api->get('statistics', 'IndexController@index');
- $api->get('statistics/sales', 'IndexController@sales');
- $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->post('addShop', 'ShopController@addShop');
- //编辑
- $api->put('editShop', 'ShopController@editShop');
- //商户列表
- $api->get('shopList', 'ShopController@list');
- //用户列表
- //商户详情
- $api->get('shopView', 'ShopController@view');
- //修改状态
- $api->put('isOpen', 'ShopController@isOpen');
- $api->get('user', 'UserController@index');
- //公共配置
- $api->post('configIndex', 'ConfigController@index');
- });
- });
|