api.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use app\common\middleware\AllowOriginMiddleware;
  12. use app\common\middleware\CheckSiteOpenMiddleware;
  13. use app\common\middleware\InstallMiddleware;
  14. use app\common\middleware\UserTokenMiddleware;
  15. use app\common\middleware\VisitProductMiddleware;
  16. use app\common\middleware\RequestLockMiddleware;
  17. use think\facade\Route;
  18. Route::group('api/', function () {
  19. Route::any('test', 'api.Auth/test');
  20. //强制登录
  21. Route::group(function () {
  22. Route::group('v2', function () {
  23. //新的下单接口,支持分账
  24. Route::group('order', function () {
  25. Route::post('check', '/v2CheckOrder');
  26. Route::post('create', '/v2CreateOrder');
  27. })->prefix('api.store.order.StoreOrder');
  28. });
  29. //退出登录
  30. Route::post('logout', 'api.Auth/logout');
  31. //用户信息
  32. Route::get('user', 'api.Auth/userInfo');
  33. //绑定推荐人
  34. Route::post('user/spread', 'api.Auth/spread');
  35. //优惠券
  36. Route::group('coupon', function () {
  37. Route::post('receive/:id', 'api.store.product.StoreCoupon/receiveCoupon');
  38. });
  39. //客服聊天
  40. Route::group('service', function () {
  41. Route::get('history/:id', 'api.store.service.Service/chatHistory');
  42. Route::get('list', 'api.store.service.Service/getList');
  43. Route::get('mer_history/:merId/:id', 'api.store.service.Service/serviceHistory');
  44. Route::get('user_list/:merId', 'api.store.service.Service/serviceUserList');
  45. //客服扫码登录
  46. Route::post('scan_login/:key', 'api.store.service.Service/scanLogin');
  47. Route::get('user/:merId/:uid', 'api.store.service.Service/user');
  48. Route::post('mark/:merId/:uid', 'api.store.service.Service/mark');
  49. });
  50. //订单
  51. Route::group('order', function () {
  52. Route::post('check', '/checkOrder');
  53. Route::post('create', '/createOrder');
  54. Route::get('group_order_list', '/groupOrderList');
  55. Route::get('group_order_detail/:id', '/groupOrderDetail');
  56. Route::post('cancel/:id', '/cancelGroupOrder');
  57. Route::get('list', '/lst');
  58. Route::get('detail/:id', '/detail');
  59. Route::get('number', '/number');
  60. Route::post('pay/:id', '/groupOrderPay');
  61. Route::post('take/:id', '/take');
  62. Route::post('express/:id', '/express');
  63. Route::post('del/:id', '/del');
  64. Route::get('status/:id', '/groupOrderStatus');
  65. Route::get('verify_code/:id', '/verifyCode');
  66. Route::post('receipt/:id', '/createReceipt');
  67. Route::get('delivery/:id', '/getOrderDelivery');
  68. })->prefix('api.store.order.StoreOrder');
  69. // 预售
  70. Route::group('presell', function () {
  71. Route::post('pay/:id', '/pay');
  72. })->prefix('api.store.order.PresellOrder');
  73. //退款单
  74. Route::group('refund', function () {
  75. Route::get('batch_product/:id', '/batchProduct');
  76. Route::get('express/:id', '/express');
  77. Route::get('product/:id', '/product');
  78. Route::post('apply/:id', '/refund');
  79. Route::get('list', '/lst');
  80. Route::get('detail/:id', '/detail');
  81. Route::post('del/:id', '/del');
  82. Route::post('back_goods/:id', '/back_goods');
  83. Route::post('cancel/:id', '/cancel');
  84. })->prefix('api.store.order.StoreRefundOrder');
  85. //评价
  86. Route::group('reply', function () {
  87. Route::get('product/:id', '/product');
  88. Route::post(':id', '/reply');
  89. })->prefix('api.store.product.StoreReply');
  90. //注销用户
  91. Route::post('user/cancel', 'api.Auth/cancel');
  92. //用户
  93. Route::group('user', function () {
  94. //切换账号
  95. Route::get('account', 'User/account');
  96. Route::post('switch', 'User/switchUser');
  97. //修改信息
  98. Route::post('change/phone', 'User/changePhone');
  99. Route::post('change/info', 'User/updateBaseInfo');
  100. Route::post('change/password', 'User/changePassword');
  101. //收藏
  102. Route::get('/relation/product/lst', 'UserRelation/productList');
  103. Route::get('/relation/merchant/lst', 'UserRelation/merchantList');
  104. Route::post('/relation/create', 'UserRelation/create');
  105. Route::post('/relation/batch/create', 'UserRelation/batchCreate');
  106. Route::post('/relation/delete', 'UserRelation/delete');
  107. Route::post('/relation/lst/delete', 'UserRelation/lstDelete');
  108. //反馈
  109. Route::post('/feedback', 'Feedback/feedback');
  110. Route::get('/feedback/list', 'Feedback/feedbackList');
  111. Route::get('/feedback/detail/:id', 'Feedback/detail');
  112. //充值
  113. Route::post('/recharge', 'UserRecharge/recharge');
  114. Route::post('/recharge/brokerage', 'UserRecharge/brokerage');
  115. //地址
  116. Route::get('/address/lst', 'UserAddress/lst');
  117. Route::post('/address/create', 'UserAddress/create');
  118. Route::get('/address/detail/:id', 'UserAddress/detail');
  119. Route::post('/address/update/:id', 'UserAddress/editDefault');
  120. Route::post('/address/delete/:id', 'UserAddress/delete');
  121. //分销海报
  122. Route::get('/spread_image', 'User/spread_image');
  123. Route::get('/v2/spread_image', 'User/spread_image_v2');
  124. //推广人列表
  125. Route::get('/spread_list', 'User/spread_list');
  126. //提现
  127. Route::get('/extract/lst', 'UserExtract/lst');
  128. Route::get('/extract/banklst', 'UserExtract/bankLst');
  129. Route::post('/extract/create', 'UserExtract/create');
  130. Route::get('/extract/history_bank', 'UserExtract/historyBank');
  131. //绑定手机号
  132. Route::post('binding', 'User/binding');
  133. //小程序获取手机号
  134. Route::post('mp/binding', 'User/mpPhone');
  135. //余额记录
  136. Route::get('bill', 'User/bill');
  137. //佣金记录
  138. Route::get('brokerage_list', 'User/brokerage_list');
  139. //推广人订单
  140. Route::get('spread_order', 'User/spread_order');
  141. //推广人排行榜
  142. Route::get('spread_top', 'User/spread_top');
  143. //佣金排行榜
  144. Route::get('brokerage_top', 'User/brokerage_top');
  145. Route::get('spread_info', 'User/spread_info');
  146. Route::get('spread_level', 'User/spread_info');
  147. Route::get('brokerage/info', 'User/brokerage_info');
  148. Route::get('brokerage/all', 'User/brokerage_all');
  149. Route::get('brokerage/notice', 'User/notice');
  150. //浏览记录
  151. Route::get('history', 'UserHistory/lst');
  152. Route::post('history/delete/:id', 'UserHistory/deleteHistory');
  153. Route::post('history/batch/delete', 'UserHistory/deleteHistoryBatch');
  154. //发票
  155. Route::post('receipt/create', 'UserReceipt/create');
  156. Route::get('receipt/lst', 'UserReceipt/lst');
  157. Route::get('receipt/order', 'UserReceipt/order');
  158. Route::get('receipt/order/:id', 'UserReceipt/orderDetail');
  159. Route::post('receipt/delete/:id', 'UserReceipt/delete');
  160. Route::post('receipt/update/:id', 'UserReceipt/update');
  161. Route::post('receipt/is_default/:id', 'UserReceipt/isDefault');
  162. Route::get('receipt/detail/:id', 'UserReceipt/detail');
  163. //签到
  164. Route::get('sign/lst', 'UserSign/lst');
  165. Route::get('sign/info', 'UserSign/info');
  166. Route::post('sign/create', 'UserSign/create');
  167. Route::get('sign/month', 'UserSign/month');
  168. //积分
  169. Route::get('integral/info', 'User/integralInfo');
  170. Route::get('integral/lst', 'User/integralList');
  171. //客服列表
  172. Route::get('services', 'User/services');
  173. Route::get('member/info', 'User/memberInfo');
  174. Route::get('member/log', 'Member/getMemberValue');
  175. })->prefix('api.user.');
  176. //购物车
  177. Route::group('user/cart', function () {
  178. Route::get('/lst', 'StoreCart/lst');
  179. Route::post('/create', 'StoreCart/create');
  180. Route::post('/again', 'StoreCart/again');
  181. Route::post('/change/:id', 'StoreCart/change');
  182. Route::post('/delete', 'StoreCart/batchDelete');
  183. Route::get('/count', 'StoreCart/cartCount');
  184. Route::post('/batchCreate', 'StoreCart/batchCreate');
  185. })->prefix('api.store.order.');
  186. Route::group('store/product', function () {
  187. Route::post('/assist/create/:id', 'StoreProductAssistSet/create');
  188. Route::get('/assist/detail/:id', 'StoreProductAssistSet/detail');
  189. Route::post('/assist/set/:id', 'StoreProductAssistSet/set');
  190. Route::get('/assist/user/:id', 'StoreProductAssistSet/userList');
  191. Route::get('/assist/share/:id', 'StoreProductAssistSet/shareNum');
  192. Route::get('/assist/set/lst', 'StoreProductAssistSet/lst');
  193. Route::post('/assist/set/delete/:id', 'StoreProductAssistSet/delete');
  194. Route::post('/increase_take', 'StoreProduct/setIncreaseTake');
  195. })->prefix('api.store.product.');
  196. //申请商户
  197. Route::get('intention/lst', 'api.store.merchant.MerchantIntention/lst');
  198. Route::get('intention/detail/:id', 'api.store.merchant.MerchantIntention/detail');
  199. Route::post('intention/update/:id', 'api.store.merchant.MerchantIntention/update');
  200. Route::post('store/product/group/cancel', 'api.store.product.StoreProductGroup/cancel');
  201. //客服商品管理
  202. Route::group('server/:merId', function () {
  203. //商品
  204. Route::post('product/create', 'StoreProduct/create');
  205. Route::post('product/update/:id', 'StoreProduct/update');
  206. Route::get('product/detail/:id', 'StoreProduct/detail');
  207. Route::post('product/delete/:id', 'StoreProduct/delete');
  208. Route::post('product/status/:id', 'StoreProduct/switchStatus');
  209. Route::get('product/lst', 'StoreProduct/lst');
  210. Route::get('product/title', 'StoreProduct/title');
  211. Route::post('product/restore/:id', 'StoreProduct/restore');
  212. Route::post('product/destory/:id', 'StoreProduct/destory');
  213. Route::post('product/good/:id', 'StoreProduct/updateGood');
  214. Route::get('product/config', 'StoreProduct/config');
  215. //商品分类
  216. Route::get('category/lst', 'StoreCategory/lst');
  217. Route::post('category/create', 'StoreCategory/create');
  218. Route::post('category/update/:id', 'StoreCategory/update');
  219. Route::get('category/detail/:id', 'StoreCategory/detail');
  220. Route::post('category/status/:id', 'StoreCategory/switchStatus');
  221. Route::post('category/delete/:id', 'StoreCategory/delete');
  222. Route::get('category/list', 'StoreCategory/getList');
  223. Route::get('category/select', 'StoreCategory/getTreeList');
  224. Route::get('category/brandlist', 'StoreCategory/BrandList');
  225. //运费模板
  226. Route::get('template/lst', 'ShippingTemplate/lst');
  227. Route::post('template/create', 'ShippingTemplate/create');
  228. Route::post('template/update/:id', 'ShippingTemplate/update');
  229. Route::get('template/select', 'ShippingTemplate/getList');
  230. Route::get('template/detail/:id', 'ShippingTemplate/detail');
  231. Route::post('template/delete', 'ShippingTemplate/batchDelete');
  232. //品牌管理
  233. Route::get('attr/lst', 'StoreProductAttrTemplate/lst');
  234. Route::post('attr/create', 'StoreProductAttrTemplate/create');
  235. Route::post('attr/update/:id', 'StoreProductAttrTemplate/update');
  236. Route::get('attr/detail/:id', 'StoreProductAttrTemplate/detail');
  237. Route::post('attr/delete', 'StoreProductAttrTemplate/batchDelete');
  238. Route::get('attr/detail/:id', 'StoreProductAttrTemplate/detail');
  239. Route::get('attr/list', 'StoreProductAttrTemplate/getlist');
  240. })->prefix('api.server.')->middleware(\app\common\middleware\MerchantServerMiddleware::class,1);
  241. //管理员订单
  242. Route::group('admin/:merId', function () {
  243. Route::get('/statistics', '/orderStatistics');
  244. Route::get('/order_price', '/orderDetail');
  245. Route::get('/order_list', '/orderList');
  246. Route::get('/order/:id', '/order');
  247. Route::post('/mark/:id', '/mark');
  248. Route::post('/price/:id', '/price');
  249. Route::post('/delivery/:id', '/delivery');
  250. Route::post('/verify/:id', '/verify');
  251. Route::get('/pay_price', '/payPrice');
  252. Route::get('/pay_number', '/payNumber');
  253. Route::get('/mer_form', '/getFormData');
  254. Route::get('/dump_temp', '/getFormData');
  255. Route::get('/delivery_config', '/getDeliveryConfig');
  256. Route::get('/delivery_options', '/getDeliveryOptions');
  257. })->prefix('api.server.StoreOrder')->middleware(\app\common\middleware\MerchantServerMiddleware::class,0);
  258. //管理员退款单
  259. Route::group('server/:merId/refund', function () {
  260. //退款单
  261. Route::get('lst', '/lst');
  262. Route::get('detail/:id', '/detail');
  263. Route::get('get/:id', '/getRefundPrice');
  264. Route::post('confirm/:id', '/refundPrice');
  265. Route::get('express/:id', '/express');
  266. Route::post('status/:id', '/switchStatus');
  267. Route::post('mark/:id', '/mark');
  268. })->prefix('api.server.StoreRefundOrder')->middleware(\app\common\middleware\MerchantServerMiddleware::class,0);
  269. //核销
  270. Route::group('verifier/:merId', function () {
  271. Route::get('order/:id', '/detail');
  272. Route::post(':id', '/verify');
  273. })->prefix('api.store.order.StoreOrderVerify')->middleware(\app\common\middleware\MerchantServerMiddleware::class,0);
  274. //社区
  275. Route::group('community', function () {
  276. Route::post('/create', 'Community/create');
  277. Route::post('/update/:id', 'Community/update');
  278. Route::post('/delete/:id', 'Community/delete');
  279. Route::get('pay_product/lst', 'Community/payList');
  280. Route::get('rela_product/lst', 'Community/relationList');
  281. Route::get('hist_product/lst', 'Community/historyList');
  282. Route::post('fans/:id', 'Community/setFocus');
  283. Route::get('fans/lst', 'Community/getUserFans');
  284. Route::get('focus/lst', 'Community/getUserFocus');
  285. Route::post('start/:id', 'Community/startCommunity');
  286. Route::get('start/lst', 'Community/getUserStartCommunity');
  287. Route::post('reply/create/:id', 'CommunityReply/create');
  288. Route::post('reply/start/:id', 'CommunityReply/start');
  289. Route::get('order/:id', 'Community/getSpuByOrder');
  290. Route::get('qrcode/:id', 'Community/qrcode');
  291. })->prefix('api.community.');
  292. Route::group('svip', function () {
  293. //价格列表
  294. Route::post('pay/:id', '/createOrder')->middleware(\app\common\middleware\BlockerMiddleware::class);
  295. })->prefix('api.user.Svip');
  296. })->middleware(UserTokenMiddleware::class, true);
  297. //非强制登录
  298. Route::group(function () {
  299. // 付费会员
  300. Route::group('svip', function () {
  301. //价格列表
  302. Route::get('pay_lst', '/getTypeLst');
  303. Route::get('user_info', '/svipUserInfo');
  304. Route::get('coupon_lst', '/svipCoupon');
  305. Route::get('product_lst', '/svipProductList');
  306. Route::post('coupon_receive/:id', '/receiveCoupon');
  307. })->prefix('api.user.Svip');
  308. //社区
  309. Route::group('community', function () {
  310. //社区文章列表
  311. Route::get('/lst', 'Community/lst');
  312. Route::get('/video_lst', 'Community/videoShow');
  313. //详情
  314. Route::get('/show/:id', 'Community/show');
  315. //用户页
  316. Route::get('/user/info/:id', 'Community/userInfo');
  317. //用户的文章
  318. Route::get('/user/community/:id', 'Community/userCommunitylst');
  319. //用户的视频
  320. Route::get('/user/community_video/:id', 'Community/userCommunityVideolst');
  321. //分类&话题
  322. Route::get('category/lst', 'CommunityCategory/lst');
  323. Route::get('/:id/reply', 'CommunityReply/lst');
  324. Route::get('/focuslst', 'Community/focuslst');
  325. })->prefix('api.community.');
  326. //上传图片
  327. Route::post('upload/image/:field', 'api.Common/uploadImage');
  328. //获取商户基本信息
  329. Route::get('service/info/:id', 'api.store.service.Service/merchantInfo');
  330. //公共配置
  331. Route::get('config', 'api.Common/config');
  332. //专题
  333. Route::group('activity', function () {
  334. Route::get('lst/:id', 'api.Common/activityLst');
  335. Route::get('info/:id', 'api.Common/activityInfo');
  336. });
  337. //商品
  338. Route::group('store/product', function () {
  339. Route::get('seckill/select', 'StoreProductSeckill/select');
  340. Route::get('seckill/lst', 'StoreProductSeckill/lst');
  341. Route::get('seckill/detail/:id', 'StoreProductSeckill/detail')->middleware(VisitProductMiddleware::class, 1);
  342. Route::get('category/lst', 'StoreCategory/lst');
  343. Route::get('category', 'StoreCategory/children');
  344. Route::get('brand/lst', 'StoreBrand/lst');
  345. Route::get('detail/:id', 'StoreProduct/detail')->middleware(VisitProductMiddleware::class, 0);
  346. Route::get('/qrcode/:id', 'StoreProduct/qrcode');
  347. Route::get('category/hotranking', 'StoreCategory/cateHotRanking');
  348. Route::get('bag/explain', 'StoreProduct/getBagExplain');
  349. Route::get('/reply/lst/:id', 'StoreReply/lst');
  350. //预售
  351. Route::get('/presell/lst', 'StoreProductPresell/lst');
  352. Route::get('/presell/detail/:id', 'StoreProductPresell/detail')->middleware(VisitProductMiddleware::class, 2);
  353. //预售协议
  354. Route::get('presell/agree', 'StoreProductPresell/getAgree');
  355. //助力
  356. Route::get('/assist/lst', 'StoreProductAssist/lst');
  357. //拼团
  358. Route::get('group/lst', 'StoreProductGroup/lst');
  359. Route::get('group/detail/:id', 'StoreProductGroup/detail')->middleware(VisitProductMiddleware::class, 4);
  360. Route::get('group/count', 'StoreProductGroup/userCount');
  361. Route::get('group/category', 'StoreProductGroup/category');
  362. Route::get('group/get/:id', 'StoreProductGroup/groupBuying');
  363. Route::get('/guarantee/:id', 'StoreProduct/guaranteeTemplate');
  364. Route::get('/preview', 'StoreProduct/preview');
  365. Route::get('/price_rule/:id', 'StoreProduct/priceRule');
  366. })->prefix('api.store.product.');
  367. //各种商品列表
  368. Route::group('product/spu', function () {
  369. //礼包 product/spu/bag
  370. Route::get('/bag', 'StoreSpu/bag');
  371. //商品 product/spu/lst
  372. Route::get('/lst', 'StoreSpu/lst');
  373. //热门 product/spu/hot/:type
  374. Route::get('/hot/:type', 'StoreSpu/hot');
  375. //推荐 product/spu/recommend
  376. Route::get('/recommend', 'StoreSpu/recommend');
  377. //商户商品 product/spu/merchant/:id
  378. Route::get('/merchant/:id', 'StoreSpu/merProductLst');
  379. //礼包推荐 product/spu/bag/recommend
  380. Route::get('/bag/recommend', 'StoreSpu/bagRecommend');
  381. //活动分类 product/spu/active/category/:type
  382. Route::get('/active/category/:type', 'StoreSpu/activeCategory');
  383. //标签获取数据
  384. Route::get('/labels', 'StoreSpu/labelsLst');
  385. //本地生活商品
  386. Route::get('/local/:id', 'StoreSpu/local');
  387. //复制口令
  388. Route::get('/copy', 'StoreSpu/copy');
  389. Route::get('/get/:id', 'StoreSpu/get');
  390. //优惠券商品列表
  391. Route::get('/coupon_product', 'StoreSpu/getProductByCoupon');
  392. //热卖排行
  393. Route::get('/get_hot_ranking', 'StoreSpu/getHotRanking');
  394. })->prefix('api.store.product.');
  395. //直播
  396. Route::group('broadcast', function () {
  397. Route::get('/lst', 'BroadcastRoom/lst');
  398. Route::get('/hot', 'BroadcastRoom/hot');
  399. })->prefix('api.store.broadcast.');
  400. //优惠券
  401. Route::group('coupon', function () {
  402. Route::get('product', 'api.store.product.StoreCoupon/coupon');
  403. Route::get('store/:id', 'api.store.product.StoreCoupon/merCoupon');
  404. Route::get('list', 'api.store.product.StoreCoupon/lst');
  405. Route::get('getlst', 'api.store.product.StoreCoupon/getList');
  406. Route::get('new_people', 'api.store.product.StoreCoupon/newPeople');
  407. });
  408. //商户
  409. Route::group('store/merchant/', function () {
  410. Route::get('/lst', 'Merchant/lst');
  411. Route::get('/product/lst/:id', 'Merchant/productList');
  412. Route::get('/category/lst/:id', 'Merchant/categoryList');
  413. Route::get('/detail/0', 'Merchant/systemDetail');
  414. Route::get('/detail/:id', 'Merchant/detail');
  415. Route::get('/qrcode/:id', 'Merchant/qrcode');
  416. Route::get('/local', 'Merchant/localLst');
  417. })->prefix('api.store.merchant.');
  418. Route::post('store/certificate/:merId', 'api.Auth/getMerCertificate');
  419. //文章
  420. Route::group('article', function () {
  421. Route::get('/lst/:cid', 'Article/lst');
  422. Route::get('/list', 'Article/list');
  423. Route::get('detail/:id', 'Article/detail');
  424. Route::get('/category/lst', 'ArticleCategory/lst');
  425. })->prefix('api.article.');
  426. Route::post('upload/video', 'merchant.Common/uploadVideo');
  427. Route::get('excel/download/:id', 'merchant.store.order.Order/download');
  428. //申请商户
  429. Route::post('intention/create', 'api.store.merchant.MerchantIntention/create');
  430. Route::get('intention/cate', 'api.store.merchant.MerchantIntention/cateLst');
  431. Route::get('intention/type', 'api.store.merchant.MerchantIntention/typeLst');
  432. //浏览
  433. Route::post('common/visit', 'api.Common/visit');
  434. Route::get('store/product/assist/count', 'api.store.product.StoreProductAssist/userCount');
  435. Route::get('store/expr/temps', 'admin.system.serve.Export/getExportTemp');
  436. //复制口令
  437. Route::get('command/copy', 'api.Common/getCommand');
  438. Route::group('discounts', function () {
  439. Route::get('lst', '/lst');
  440. })->prefix('api.store.product.Discounts');
  441. //test
  442. Route::any('store/test', 'api.Test/test');
  443. Route::get('subscribe', 'api.Common/subscribe');
  444. })->middleware(UserTokenMiddleware::class, false);
  445. //微信支付回调
  446. Route::any('notice/wechat_pay', 'api.Common/wechatNotify')->name('wechatNotify');
  447. //微信支付回调
  448. Route::any('notice/wechat_combine_pay/:type', 'api.Common/wechatCombinePayNotify')->name('wechatCombinePayNotify');
  449. Route::any('notice/routine_combine_pay/:type', 'api.Common/routineCombinePayNotify')->name('routineCombinePayNotify');
  450. Route::any('notice/callback', 'api.Common/deliveryNotify');
  451. //小程序支付回调
  452. Route::any('notice/routine_pay', 'api.Common/routineNotify')->name('routineNotify');
  453. //支付宝支付回调
  454. Route::any('notice/alipay_pay/:type', 'api.Common/alipayNotify')->name('alipayNotify');
  455. Route::any('getVersion', 'api.Common/getVersion')->name('getVersion');
  456. //城市列表
  457. Route::get('system/city/lst', 'merchant.store.shipping.City/getlist');
  458. Route::get('v2/system/city/lst/:pid', 'merchant.store.shipping.City/lstV2');
  459. Route::get('v2/system/city', 'merchant.store.shipping.City/cityList');
  460. //热门搜索
  461. Route::get('common/hot_keyword', 'api.Common/hotKeyword')->append(['type' => 0]);
  462. //社区热门搜索
  463. Route::get('common/commuunity/hot_keyword', 'api.Common/hotKeyword')->append(['type' => 1]);
  464. //推荐页 banner
  465. Route::get('common/hot_banner/:type', 'api.Common/hotBanner');
  466. //退款原因
  467. Route::get('common/refund_message', 'api.Common/refundMessage');
  468. //充值赠送
  469. Route::get('common/recharge_quota', 'api.Common/userRechargeQuota');
  470. //快递公司
  471. Route::get('common/express', 'api.Common/express');
  472. //图片转 base64
  473. Route::post('common/base64', 'api.Common/get_image_base64');
  474. //个人中心菜单
  475. Route::get('common/menus', 'api.Common/menus');
  476. //首页数据
  477. Route::get('common/home', 'api.Common/home');
  478. //经纬度转位置信息
  479. Route::get('lbs/geocoder', 'api.Common/lbs_geocoder');
  480. //获取支付宝支付链接
  481. Route::get('common/pay_key/:key', 'api.Common/pay_key');
  482. //用户反馈类型
  483. Route::get('common/feedback_type', 'api.user.FeedBackCategory/lst');
  484. //登录
  485. Route::post('auth/login', 'api.Auth/login');
  486. //登录
  487. Route::post('auth', 'api.Auth/authLogin');
  488. //短信登录
  489. Route::post('auth/smslogin', 'api.Auth/smsLogin');
  490. //注册
  491. Route::post('auth/register', 'api.Auth/register');
  492. //小程序手机号注册
  493. Route::post('auth/mp_phone', 'api.Auth/mpPhone');
  494. //微信授权
  495. Route::get('auth/wechat', 'api.Auth/auth');
  496. //小程序授权
  497. Route::post('auth/mp', 'api.Auth/mpAuth');
  498. //app授权
  499. Route::post('auth/app', 'api.Auth/appAuth');
  500. //apple授权
  501. Route::post('auth/apple', 'api.Auth/appleAuth');
  502. //修改密码
  503. Route::post('user/change_pwd', 'api.Auth/changePassword');
  504. //验证码
  505. Route::post('auth/verify', 'api.Auth/verify');
  506. //微信配置
  507. Route::get('wechat/config', 'api.Wechat/jsConfig');
  508. //图片验证码
  509. Route::get('captcha', 'api.Auth/getCaptcha');
  510. //获取协议列表
  511. Route::get('agreement_lst', 'admin.system.Cache/getKeyLst')->append(['type' => 1]);
  512. //获取协议内容
  513. Route::get('agreement/:key', 'admin.system.Cache/getAgree');
  514. Route::get('copyright', 'api.Common/copyright');
  515. Route::get('script', 'api.Common/script');
  516. Route::get('appVersion', 'api.Common/appVersion');
  517. Route::get('diy', 'api.Common/diy');
  518. Route::get('navigation', 'api.Common/getNavigation');
  519. Route::get('micro', 'api.Common/micro');
  520. Route::get('version', 'admin.Common/version');
  521. //滑块验证码
  522. Route::get('ajcaptcha', 'api.Auth/ajcaptcha');
  523. Route::post('ajcheck', 'api.Auth/ajcheck');
  524. })->middleware(AllowOriginMiddleware::class)
  525. ->middleware(InstallMiddleware::class)
  526. ->middleware(CheckSiteOpenMiddleware::class)
  527. ->middleware(RequestLockMiddleware::class);
  528. Route::any('/', 'View/h5')->middleware(InstallMiddleware::class)
  529. ->middleware(CheckSiteOpenMiddleware::class);
  530. Route::group('/pages', function () {
  531. Route::miss('View/h5');
  532. })->middleware(InstallMiddleware::class)
  533. ->middleware(CheckSiteOpenMiddleware::class);
  534. Route::group('/open-location', function () {
  535. Route::miss('View/h5');
  536. })->middleware(InstallMiddleware::class)
  537. ->middleware(CheckSiteOpenMiddleware::class)
  538. ;