123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <?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!
- |
- */
- //Route::middleware('auth:api')->get('/user', function (Request $request) {
- // return $request->user();
- //});
- $api = app('Dingo\Api\Routing\Router');
- $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($api) {
- //附件下载
- $api->get('attachment/download/{md5}', [
- 'as' => 'attachment.download',
- 'uses' => 'AttachmentController@download',
- ]);
- //附件上传
- $api->post('attachment/upload', [
- 'as' => 'attachment.upload',
- 'uses' => 'AttachmentController@upload',
- ]);
- //附件删除
- $api->get('attachment/delete/{md5}', [
- 'as' => 'attachment.delete',
- 'uses' => 'AttachmentController@delete',
- ]);
- //上传头像
- $api->post('auth/avatar', [
- 'as' => 'auth.avatar',
- 'uses' => 'AuthController@avatar',
- ]);
- // test
- $api->get('test', [
- 'as' => 'test',
- 'uses' => 'AuthController@test',
- ]);
- // Auth
- // signin
- $api->post('auth/login', [
- 'as' => 'login',
- 'uses' => 'AuthController@login',
- ]);
- $api->get('auth/wechat_login', [
- 'as' => 'wechat_login',
- 'uses' => 'AuthController@wechatLogin',
- ]);
- $api->get('auth/logout', [
- 'as' => 'auth.logout',
- 'uses' => 'AuthController@logout',
- ]);
- $api->post('auth/code', [
- 'as' => 'auth.code',
- 'uses' => 'AuthController@getCode',
- ]);
- // signup
- $api->post('auth/register', [
- 'as' => 'auth.register',
- 'uses' => 'AuthController@register',
- ]);
- $api->post('auth/password', [
- 'as' => 'auth.reset',
- 'uses' => 'AuthController@setPassword',
- ]);
- $api->post('auth/check_password', [
- 'as' => 'auth.check_password',
- 'uses' => 'AuthController@check_password',
- ]);
- $api->post('auth/reset', [
- 'as' => 'auth.reset',
- 'uses' => 'AuthController@reset',
- ]);
- $api->get('auth/is_login', [
- 'as' => 'auth.is_login',
- 'uses' => 'AuthController@isLogin',
- ]);
- //首页
- $api->get('index/home', [
- 'as' => 'index.home',
- 'uses' => 'IndexController@home',
- ]);
- $api->get('index/filter', [
- 'as' => 'index.filter',
- 'uses' => 'IndexController@filter',
- ]);
- $api->get('index/search', [
- 'as' => 'index.search',
- 'uses' => 'IndexController@search',
- ]);
- $api->get('index/user_search', [
- 'as' => 'index.user_search',
- 'uses' => 'IndexController@userSearch',
- ]);
- //我的
- $api->get('my/show', [
- 'as' => 'my.show',
- 'uses' => 'MyController@show',
- ]);
- $api->get('my/persona', [
- 'as' => 'my.persona',
- 'uses' => 'MyController@persona',
- ]);
- $api->get('my/edit', [
- 'as' => 'my.edit',
- 'uses' => 'MyController@edit',
- ]);
- $api->post('my/update', [
- 'as' => 'my.update',
- 'uses' => 'MyController@update',
- ]);
- // 充值
- $api->post('my/recharge', [
- 'as' => 'my.recharge',
- 'uses' => 'MyController@recharge',
- ]);
- $api->get('my/system_info', [
- 'as' => 'my.system_info',
- 'uses' => 'MyController@systemInfo',
- ]);
- $api->get('my/reply', [
- 'as' => 'my.reply',
- 'uses' => 'MyController@reply',
- ]);
- $api->get('my/letter', [
- 'as' => 'my.letter',
- 'uses' => 'MyController@letter',
- ]);
- $api->get('my/dream', [
- 'as' => 'my.dream',
- 'uses' => 'MyController@dream',
- ]);
- $api->get('my/care', [
- 'as' => 'my.care',
- 'uses' => 'MyController@care',
- ]);
- // 我的收藏
- $api->get('my/collection', [
- 'as' => 'my.collection',
- 'uses' => 'MyController@collection',
- ]);
- // 关于喵喵
- $api->get('my/miao', [
- 'as' => 'my.miao',
- 'uses' => 'MyController@aboutMiao',
- ]);
- // 消息中心
- $api->get('my/info', [
- 'as' => 'my.info',
- 'uses' => 'MyController@info',
- ]);
- $api->get('my/read', [
- 'as' => 'my.read',
- 'uses' => 'MyController@read',
- ]);
- // 联系客服
- $api->post('my/suggest', [
- 'as' => 'my.suggest',
- 'uses' => 'MyController@suggest',
- ]);
- // 提现
- $api->post('my/cash', [
- 'as' => 'my.cash',
- 'uses' => 'MyController@cash',
- ]);
- $api->get('my/cash/page', [
- 'as' => 'my.cash_page',
- 'uses' => 'MyController@cashPage',
- ]);
- $api->get('my/bank/list', [
- 'as' => 'my.bank_list',
- 'uses' => 'MyController@bankList',
- ]);
- $api->get('my/bank/account', [
- 'as' => 'my.account',
- 'uses' => 'MyController@account',
- ]);
- $api->post('my/bank/create', [
- 'as' => 'my.bank_create',
- 'uses' => 'MyController@bankCreate',
- ]);
- $api->post('my/bank/qrcode', [
- 'as' => 'my.qrcode',
- 'uses' => 'MyController@bankImgCreate',
- ]);
- $api->get('my/bank/delete', [
- 'as' => 'my.bank_delete',
- 'uses' => 'MyController@bankDelete',
- ]);
- $api->get('my/pay/article', [
- 'as' => 'my.pay_article',
- 'uses' => 'MyController@payArticle',
- ]);
- // 用户信息
- $api->get('user/show', [
- 'as' => 'user.show',
- 'uses' => 'HomeController@show',
- ]);
- // 关注用户
- $api->get('user/care', [
- 'as' => 'user.care',
- 'uses' => 'HomeController@care',
- ]);
- // 见面
- $api->get('user/meet', [
- 'as' => 'user.meet',
- 'uses' => 'HomeController@meet',
- ]);
- // 梦想
- $api->get('dream/show', [
- 'as' => 'dream.show',
- 'uses' => 'DreamController@show',
- ]);
- $api->get('dream/share', [
- 'as' => 'dream.share',
- 'uses' => 'DreamController@share',
- ]);
- $api->get('dream/search', [
- 'as' => 'dream.search',
- 'uses' => 'DreamController@search',
- ]);
- $api->get('dream/collection', [
- 'as' => 'dream.collection',
- 'uses' => 'DreamController@collection',
- ]);
- $api->post('dream/support', [
- 'as' => 'dream.support',
- 'uses' => 'DreamController@support',
- ]);
- $api->post('dream/store', [
- 'as' => 'dream.store',
- 'uses' => 'DreamController@store',
- ]);
- // interaction 动态
- $api->post('interaction/store', [
- 'as' => 'interaction.store',
- 'uses' => 'InteractionController@store',
- ]);
- $api->post('interaction/comment', [
- 'as' => 'interaction.comment',
- 'uses' => 'InteractionController@comment',
- ]);
- $api->post('interaction/reply', [
- 'as' => 'interaction.reply',
- 'uses' => 'InteractionController@reply',
- ]);
- $api->get('/comment/delete', [ //删除评论
- 'as' => 'interaction.delete',
- 'uses' => 'InteractionController@delete',
- ]);
- //支付宝支付回调
- $api->post('pay/alipay/notify', [
- 'as' => 'pay.alipay.notify',
- 'uses' => 'PayController@alipayNotify',
- ]);
- //微信支付回调
- $api->post('pay/wechatpay/notify', [
- 'as' => 'pay.wechatpay.notify',
- 'uses' => 'PayController@wechatpayNotify',
- ]);
- //商户充值
- $api->post('pay/charge', [
- 'as' => 'pay.charge',
- 'uses' => 'PayController@charge',
- ]);
- });
|