route.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. use think\Route;
  12. Route::group('api', function () {
  13. Route::get('index', 'api/Index/index');
  14. Route::get('geocoder', 'api/Index/geocoder');
  15. Route::any('Wechat/serve','api/Wechat/serve');
  16. Route::any('wechat/notify/:cid','api/Wechat/notify');
  17. Route::any('routine/notify/:cid','api/routine/notify');
  18. Route::post('register', 'api/User/register');
  19. Route::post('login', 'api/User/login');
  20. Route::post('logout', 'api/User/logout');
  21. Route::post('reset', 'api/User/resetpwd');
  22. Route::post('captcha', 'api/Sms/send');
  23. Route::post('upload', 'api/Common/upload');
  24. Route::get('userinfo', 'api/User/userinfo');
  25. Route::group('user', function () {
  26. Route::get('/', 'api/User/index');
  27. Route::post('profile', 'api/User/profile');
  28. Route::get('children/num', 'api/User/children_num');
  29. Route::get('children/:id', 'api/User/children');
  30. Route::get('spread_children/:id', 'api/User/spread_children');
  31. Route::post('setuser', 'api/User/setuser'); //会员申请
  32. });
  33. //首页
  34. Route::group('index', function () {
  35. Route::get('company', 'api/Index/company');
  36. Route::get('wxconfig', 'api/Index/wxconfig');
  37. Route::get('test', 'api/Index/test');
  38. });
  39. //微信
  40. Route::group('wechat', function () {
  41. Route::get('auth', 'api/wechat/auth');
  42. Route::get('wxconfig', 'api/Index/wxconfig');
  43. });
  44. Route::group('mini', function () {
  45. Route::get('auth', 'api/MiniProgram/mp_auth');
  46. Route::get('wxconfig', 'api/Index/wxconfig');
  47. });
  48. //机构
  49. Route::group('institution', function () {
  50. Route::get('aed', 'api/institution/ade');
  51. Route::get('institution', 'api/institution/insti');
  52. Route::get('station', 'api/institution/station');
  53. });
  54. //文章
  55. Route::group('Article', function () {
  56. Route::get('ify', 'api/Article/ify');
  57. Route::get('lst', 'api/Article/lst');
  58. Route::get('view', 'api/Article/view');
  59. });
  60. //救在身边
  61. Route::group('Rescue', function () {
  62. Route::get('index', 'api/Rescue/index'); //救授列表
  63. Route::post('create', 'api/Rescue/create'); //救授申请
  64. Route::get('applylst', 'api/Rescue/applylst'); //申请记录
  65. Route::post('sos', 'api/Rescue/sos_create'); //求救申请
  66. Route::get('lst', 'api/Rescue/lst'); //求救/救授记录
  67. Route::post('setstatus', 'api/Rescue/setstatus'); //救授处理
  68. Route::get('sos_del','api/Rescue/sos_del');
  69. });
  70. //爱心捐款
  71. Route::group('lave', function () {
  72. Route::post('create', 'api/lave/create');
  73. Route::get('ify', 'api/lave/ify');
  74. Route::get('lst', 'api/lave/lst');
  75. Route::get('mylst', 'api/lave/mylst');
  76. Route::get('pay', 'api/lave/pay');
  77. });
  78. //帮扶
  79. Route::group('help', function () {
  80. Route::get('index', 'api/help/index');
  81. Route::get('view', 'api/help/view');
  82. Route::post('apply', 'api/help/apply');
  83. Route::get('ify', 'api/help/ify');
  84. Route::get('applylst', 'api/help/lst');
  85. Route::post("userapply",'api/help/help_user_apply'); //项目帮扶人申请
  86. Route::get("userapplylst",'api/help/user_apply_lst'); //项目帮扶人申请
  87. });
  88. //物资
  89. Route::group('project', function () {
  90. Route::get('list', 'api/project/lst');//捐赠活动列表
  91. Route::get('info', 'api/project/info');//捐赠详情
  92. Route::post('myorder', 'api/project/myorder');//我的捐赠
  93. Route::post('all_order', 'api/project/all_order');//活动捐赠列表
  94. Route::post('order_create', 'api/project/order_create');//创建捐赠
  95. Route::post('create_user', 'api/project/create_user');//创建用户
  96. Route::get('user_list', 'api/project/user_list');//我的所有用户
  97. Route::get('Donation_info', 'api/project/Donation_info');//系统所有物资
  98. Route::post('bill', 'api/project/bill');//所有状态记录
  99. Route::get('order_info', 'api/project/order_info');//订单详情
  100. });
  101. //培训
  102. Route::group('training', function () {
  103. Route::get('lst', 'api/training/lst');
  104. Route::get('view', 'api/training/view');
  105. Route::post('apply', 'api/training/apply');
  106. Route::get('mylst', 'api/training/mylst');
  107. });
  108. //年费
  109. Route::group('level', function () {
  110. Route::post('create', 'api/level/create');
  111. Route::get('ify', 'api/level/ify');
  112. Route::get('lst', 'api/level/lst');
  113. Route::get('view', 'api/level/view');
  114. });
  115. //捐献
  116. Route::group('donate', function () {
  117. Route::post('apply', 'api/donate/apply');
  118. Route::get('lst', 'api/donate/lst');
  119. Route::get('ify', 'api/donate/ify');
  120. Route::get('view', 'api/donate/view');
  121. });
  122. //志愿者
  123. Route::group('volunteer', function () {
  124. Route::post('apply', 'api/volunteer/apply');
  125. Route::get('applylst', 'api/volunteer/lst');
  126. });
  127. });
  128. return [
  129. //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
  130. '__alias__' => [
  131. ],
  132. //变量规则
  133. '__pattern__' => [
  134. ],
  135. // 域名绑定到模块
  136. // '__domain__' => [
  137. // 'admin' => 'admin',
  138. // 'api' => 'api',
  139. // ],
  140. ];