'App\Http\Controllers\Api'], function () { # 小程序登录(不需要登录) Route::get('/wx/login', 'WechatController@login'); // 登录认证 Route::group(['middleware' => 'api.login'], function () { # 用户相关 Route::group(['prefix' => 'user'], function () { # 意见反馈 Route::get('feedback', 'UserController@feedback'); # 商品收藏 Route::post('goodsCollect', 'UserController@goodsCollect'); # 我的收藏/浏览历史 Route::get('myInterest', 'UserController@myInterest'); # 删除收藏/浏览历史 Route::get('removeInterest', 'UserController@removeInterest'); # 搜索历史 Route::get('searchHistory', 'UserController@searchHistory'); # 搜索历史 Route::get('delSearchHistory', 'UserController@delSearchHistory'); # 记录用户分享信息 Route::post('shareRecord', 'UserController@shareRecord'); # 获取用户分享信息 Route::get('shareInfo', 'UserController@shareInfo'); # 设置用户头像和昵称 Route::post('setInfo', 'UserController@setInfo'); }); # 专题 Route::group(['prefix' => 'topic'], function () { # 专题列表 Route::get('list', 'TopicController@lists'); # 专题商品 Route::get('goods', 'TopicController@goods'); }); Route::group(['prefix' => 'goods'], function () { # 优选 Route::get('excellentEditor', 'GoodsController@excellentEditor'); # 今日搜榜 好货推荐 Route::get('salesList', 'GoodsController@salesList'); # 搜索 Route::get('goodsSearch', 'GoodsController@goodsSearch'); # 详情 Route::get('goodsDetail', 'GoodsController@goodsDetail'); # 相似商品 Route::get('sameGoods', 'GoodsController@sameGoods'); # 生成淘口令 Route::post('createTaobaoWord', 'GoodsController@createTaobaoWord'); # 首页榜单类型 Route::get('salesTypeList', 'GoodsController@salesTypeList'); }); # 获取客服二维码 Route::get('/wx/qrcode', 'WechatController@qrcode'); }); });