weixin.php 605 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\api\route;
  3. use app\api\middleware\AllowOriginMiddleware;
  4. use app\api\middleware\SeretKeyMiddleware;
  5. use think\facade\Config;
  6. use think\facade\Route;
  7. use think\Response;
  8. /**
  9. * 无需授权的接口
  10. */
  11. Route::group('weixin',function () {
  12. //微信 sdk 配置
  13. Route::rule('config', 'v1.weixin/jssdk');
  14. //小程序获取手机号
  15. Route::rule('getPhone', 'v1.weixin/getPhone');
  16. //用户登录
  17. Route::rule('result', 'v1.weixin/result');
  18. //微信支付回调
  19. Route::rule('notify', 'v1.weixin/notify');
  20. })->middleware([
  21. AllowOriginMiddleware::class
  22. ]);