| xqd
@@ -22,9 +22,6 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->group([
|
|
|
'middleware' => ['throttle:120'], //代表1分钟内接口最高请求次数,超出返回 429: Too Many Attempts
|
|
|
], function ($api) {
|
|
|
- $api->get('setting/{tags?}', 'SettingsController@get'); //用户配置信息
|
|
|
- $api->post('setting', 'SettingsController@set'); //设置用户信息
|
|
|
- $api->post('sms/send', 'SmsController@send'); //发送手机验证码
|
|
|
$api->post('email/send', 'EmailController@sendEmailCode'); //发送邮箱验证码
|
|
|
$api->post('email/email_verify', 'EmailController@emailVerify'); //验证码验证
|
|
|
$api->post('attachments/upload', 'AttachmentController@upload'); //上传附件
|
| xqd
@@ -36,7 +33,6 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->get('privacy', 'IndexController@privacyPolice'); //隐私政策
|
|
|
$api->get('agreement', 'IndexController@userAgreement'); //用户协议
|
|
|
$api->get('aboutus', 'IndexController@aboutus'); //关于我们
|
|
|
-
|
|
|
$api->get('filter_type_list', 'ProductController@filterTypeList'); //产品类型(分类)
|
|
|
$api->get('upload_type_list', 'ProductController@uploadTypeList'); //产品类型(上传)
|
|
|
|
| xqd
@@ -47,26 +43,15 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->post('login', 'AuthController@login'); //账号密码登录
|
|
|
$api->post('smslogin', 'AuthController@loginBySmsCode'); //短信验证码登录
|
|
|
$api->get('forget_password', 'AuthController@forgetPassword'); //忘记密码
|
|
|
-
|
|
|
- $api->post('oplogin', 'AuthController@authLogin'); //APP第三方授权登录(微信)
|
|
|
- $api->post('decrypt_phone', 'AuthController@decryptPhone'); //微信小程序获取手机号
|
|
|
- $api->post('mnplogin', 'AuthController@miniProgram'); //微信小程序登录(微信)
|
|
|
- $api->post('oalogin', 'AuthController@h5Oauth'); //H5授权登录[未实现]
|
|
|
- $api->get('minicode', 'AuthController@miniCode'); //获取微信小程序code[未实现]
|
|
|
-
|
|
|
});
|
|
|
|
|
|
$api->group(['prefix' => 'index'], function ($api) {
|
|
|
- $api->get('all_region', 'RegionController@allRegion'); //全国省市区
|
|
|
- $api->get('helps', 'ArticleController@helpList'); //帮助类型
|
|
|
- $api->get('answer', 'ArticleController@answer'); //问题答案
|
|
|
$api->get('product_list', 'ProductController@productList'); //首页产品列表
|
|
|
});
|
|
|
|
|
|
// 系统设置
|
|
|
$api->group(['prefix' => 'settings'], function ($api) {
|
|
|
$api->get('notice_policy', 'SettingsController@noticePolicy'); //公告|政策
|
|
|
-
|
|
|
$api->get('record', 'SettingsController@record'); //备案信息
|
|
|
$api->get('clause', 'SettingsController@clause'); //条款
|
|
|
$api->get('law', 'SettingsController@law'); //法律声明
|
| xqd
@@ -80,33 +65,16 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->group([
|
|
|
'middleware' => ['api.auth', 'throttle:120'],
|
|
|
], function ($api) {
|
|
|
-
|
|
|
$api->get('logout', 'AuthController@logout')->name('logout'); //退出登录
|
|
|
$api->post('auth/forget_password', 'AuthController@forgetPassword'); //忘记密码
|
|
|
-
|
|
|
$api->group(['prefix' => 'users'], function($api){
|
|
|
- //restful实例
|
|
|
- $api->get('/', 'UserController@index'); //获取用户列表数据
|
|
|
$api->get('show', 'UserController@show'); //根据用户id查询用户数据
|
|
|
- $api->post('/', 'UserController@create'); //新增用户
|
|
|
$api->post('up_user_info', 'UserController@upUserInfo'); //修改用户信息
|
|
|
$api->delete('destroy', 'UserController@destroy'); //删除用户信息
|
|
|
$api->post('avatar', 'UserController@avatar'); //上传头像接口
|
|
|
$api->get('add_follow', 'UserController@addFollow'); //添加关注
|
|
|
-
|
|
|
-
|
|
|
- //[未实现:h5绑定、h5解绑;小程序绑定、小程序解绑]
|
|
|
- $api->post('bind_mobile', 'UserController@bindMobile'); //手机号绑定
|
|
|
- $api->post('rebind_mobile', 'UserController@bindMobile'); //手机号解绑
|
|
|
- $api->get('group_by_initial', 'UserController@groupByInitial'); //用户列表按照首字母分组排序,类似手机通讯录 ?
|
|
|
- $api->post('feedback', 'UserController@feedback'); //问题反馈 意见反馈
|
|
|
- });
|
|
|
- // 常见问题
|
|
|
- $api->group(['prefix' => 'questions'], function($api){
|
|
|
- $api->get('question_list', 'QuestionController@questionList'); //常见问题列表
|
|
|
- $api->get('question_detail', 'QuestionController@questionDetail'); //常见问题详情
|
|
|
+ $api->get('group_by_initial', 'UserController@groupByInitial'); //用户列表按照首字母分组排序
|
|
|
});
|
|
|
-
|
|
|
// 产品
|
|
|
$api->group(['prefix' => 'product'], function($api){
|
|
|
$api->post('add_product', 'ProductController@addProduct'); //添加产品
|
| xqd
@@ -130,7 +98,6 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->get('member_list', 'MemberController@memberList'); //会员价格
|
|
|
$api->post('join_member', 'MemberController@joinMember'); //加入会员
|
|
|
});
|
|
|
-
|
|
|
// 文件夹
|
|
|
$api->group(['prefix' => 'folder'], function($api){
|
|
|
$api->post('add_folder', 'UserFolderController@addFolder'); //新建文件夹
|
| xqd
@@ -140,11 +107,9 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\V1'], function ($api)
|
|
|
$api->post('move_file', 'UserFolderController@moveFile'); //移动文件
|
|
|
$api->get('image_list', 'UserFolderController@imageList'); //图片列表
|
|
|
});
|
|
|
-
|
|
|
// 支付
|
|
|
$api->group(['prefix' => 'pay'], function($api){
|
|
|
- $api->get('payment', 'PayController@payment'); //会员价格
|
|
|
+ $api->get('payment', 'PayController@payment'); //构建支付
|
|
|
});
|
|
|
-
|
|
|
});
|
|
|
});
|