weixin.php 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. //token
  13. Route::any('wechatH5', 'Api\WeixinController@wechatH5');
  14. //前端请求这个接口 最后会带着openid 重定向到前端页面
  15. Route::any('setWebHook', 'Api\WeixinController@setWebHook');
  16. //前端给的openid 保存
  17. Route::any('wxSetUser', 'Api\WeixinController@setUser');
  18. //如果没绑定账号 要求绑定
  19. Route::any('wxLogin', 'Api\WeixinController@login');
  20. //重定向过程中对外开放的接口 用于最后拿到openid
  21. Route::any('getUnionid', 'Api\WeixinController@getUnionid');
  22. Route::any('getOpenid', 'Api\WeixinController@getOpenid');
  23. Route::group(['middleware'=> ['checkWeixin']],function ($route){
  24. $route->any('reminderDetail', 'Api\OrderController@reminderDetail2');
  25. $route->any('reminderSave', 'Api\OrderController@reminderSave');
  26. });