route.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. });
  32. //首页
  33. Route::group('index', function () {
  34. Route::get('company', 'api/Index/company');
  35. Route::get('wxconfig', 'api/Index/wxconfig');
  36. Route::get('test', 'api/Index/test');
  37. });
  38. //微信
  39. Route::group('wechat', function () {
  40. Route::get('auth', 'api/wechat/auth');
  41. Route::get('wxconfig', 'api/Index/wxconfig');
  42. });
  43. //机构
  44. Route::group('institution', function () {
  45. Route::get('aed', 'api/institution/ade');
  46. Route::get('institution', 'api/institution/insti');
  47. Route::get('station', 'api/institution/station');
  48. });
  49. //文章
  50. Route::group('Article', function () {
  51. Route::get('ify', 'api/Article/ify');
  52. Route::get('lst', 'api/Article/lst');
  53. Route::get('view', 'api/Article/view');
  54. });
  55. //救在身边
  56. Route::group('Rescue', function () {
  57. Route::get('index', 'api/Rescue/index'); //救授列表
  58. Route::post('create', 'api/Rescue/create'); //救授申请
  59. Route::get('applylst', 'api/Rescue/applylst'); //申请记录
  60. Route::post('sos', 'api/Rescue/sos_create'); //求救申请
  61. Route::get('lst', 'api/Rescue/lst'); //求救/救授记录
  62. Route::post('setstatus', 'api/Rescue/setstatus'); //救授处理
  63. Route::get('sos_del','api/Rescue/sos_del');
  64. });
  65. //爱心捐款
  66. Route::group('lave', function () {
  67. Route::post('create', 'api/lave/create');
  68. Route::get('ify', 'api/lave/ify');
  69. Route::get('lst', 'api/lave/lst');
  70. Route::get('mylst', 'api/lave/mylst');
  71. Route::get('pay', 'api/lave/pay');
  72. });
  73. //帮扶
  74. Route::group('help', function () {
  75. Route::get('index', 'api/help/index');
  76. Route::get('view', 'api/help/view');
  77. Route::post('apply', 'api/help/apply');
  78. Route::get('ify', 'api/help/ify');
  79. Route::get('applylst', 'api/help/lst');
  80. });
  81. //物资
  82. Route::group('project', function () {
  83. Route::get('list', 'api/project/lst');//捐赠活动列表
  84. Route::get('info', 'api/project/info');//捐赠详情
  85. Route::post('myorder', 'api/project/myorder');//我的捐赠
  86. Route::post('all_order', 'api/project/all_order');//活动捐赠列表
  87. Route::post('order_create', 'api/project/order_create');//创建捐赠
  88. Route::post('create_user', 'api/project/create_user');//创建用户
  89. Route::get('user_list', 'api/project/user_list');//我的所有用户
  90. Route::get('Donation_info', 'api/project/Donation_info');//系统所有物资
  91. Route::get('logistics', 'api/project/logistics');//获取物流方式
  92. Route::post('bill', 'api/project/bill');//所有状态记录
  93. Route::get('order_info', 'api/project/order_info');//订单详情
  94. });
  95. //培训
  96. Route::group('training', function () {
  97. Route::get('lst', 'api/training/lst');
  98. Route::get('view', 'api/training/view');
  99. Route::post('apply', 'api/training/apply');
  100. Route::get('mylst', 'api/training/mylst');
  101. });
  102. //年费
  103. Route::group('level', function () {
  104. Route::post('create', 'api/level/apply');
  105. Route::get('ify', 'api/level/ify');
  106. Route::get('lst', 'api/level/lst');
  107. Route::get('view', 'api/level/view');
  108. });
  109. //捐献
  110. Route::group('donate', function () {
  111. Route::post('apply', 'api/help/apply');
  112. Route::get('lst', 'api/help/lst');
  113. Route::get('view', 'api/help/view');
  114. });
  115. //志愿者
  116. Route::group('volunteer', function () {
  117. Route::post('apply', 'api/volunteer/apply');
  118. Route::get('applylst', 'api/volunteer/lst');
  119. });
  120. });
  121. return [
  122. //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
  123. '__alias__' => [
  124. ],
  125. //变量规则
  126. '__pattern__' => [
  127. ],
  128. // 域名绑定到模块
  129. // '__domain__' => [
  130. // 'admin' => 'admin',
  131. // 'api' => 'api',
  132. // ],
  133. ];