api.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. import {
  2. http
  3. } from './service.js'
  4. //微信api
  5. const wxApp = {
  6. getOpenId: p => http.get('/wx-app/getOpenId', {
  7. params: p
  8. }),
  9. getOpenData: p => http.post('/wx-app/getOpenData', p),
  10. getGenerateScheme: p => http.get('/wx-app/getGenerateScheme', {
  11. params: p
  12. }),
  13. createWxaQrCode: p => http.get('/wx-app/createWxaQrCode', {
  14. params: p
  15. }),
  16. getCode: p => http.get('/wx-app/getCode', {params: p}),
  17. appParams: p => http.get('blade-system/param/detail', {params: p}),
  18. }
  19. //字典
  20. const dict = {
  21. list: p => http.get('/blade-system/dict-biz/dictionary', {
  22. params: p
  23. }),
  24. dictionaryPage: p => http.get('/blade-system/dict-biz/dictionaryPage', {
  25. params: p
  26. }),
  27. }
  28. //文件上传
  29. const uploadFile = (p) => http.upload('blade-resource/oss/endpoint/put-file', {
  30. name: 'file',
  31. filePath: p
  32. })
  33. //活动管理
  34. const activity = {
  35. //音乐之声活动
  36. yyzs_list: p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {
  37. params: p,
  38. custom: {
  39. yyzs: true
  40. }
  41. }),
  42. //商户活动
  43. list: p => http.get("/common/activity/list", {
  44. params: p
  45. }),
  46. //活动详情
  47. detail: p => http.get("ldt_activity/activity/detail", {
  48. params: p
  49. }),
  50. //获取地址信息
  51. getLocation: p => http.get("/common/activity/getLocation", {
  52. params: p
  53. }),
  54. }
  55. //用户管理
  56. const loginUser = {
  57. detail: p => http.get('ldt_user/loginuser/detail', {
  58. params: p
  59. }),
  60. submit: p => http.post('ldt_user/loginuser/submit', p),
  61. login: p => http.post('client/user/login', p),
  62. payBefore: p => http.post('cyzh-ldt/loginuser/payBeforeNew', p),
  63. payBeforeForNormal: p => http.post('cyzh-ldt/loginuser/payBeforeForNormal', p),
  64. getBillrecordFromRedis: p => http.get('cyzh-ldt/loginuser/getBillrecordFromRedis', {
  65. params: p
  66. }),
  67. clearBillRecordCache: p => http.get('cyzh-ldt/loginuser/clearBillRecordCache', {
  68. params: p
  69. }),
  70. }
  71. //商户管理
  72. const shop = {
  73. list: p => http.get('shop/list', {
  74. params: p
  75. }),
  76. detail: p => http.get('ldt_shop/shop/detail', {
  77. params: p
  78. }),
  79. indexInfo: p => http.get("shop/indexInfo", {
  80. params: p
  81. }),
  82. }
  83. //审核管理
  84. const audit = {
  85. list: p => http.get("ldt_shop/audit/list", {
  86. params: p
  87. }),
  88. submit: p => http.post('ldt_shop/audit/submit', p),
  89. detail: p => http.get("ldt_shop/audit/detail", {
  90. params: p
  91. }),
  92. }
  93. //商场管理
  94. const mall = {
  95. //获取商场列表
  96. list: p => http.get('mall/list', {params: p}),
  97. }
  98. //代理商
  99. const agenter = {
  100. agentLevelList: p => http.get('ldt_agent/agent/list', {params: p}),
  101. addAgentOrder: p => http.post('/app/agent/addAgentOrder', p),
  102. list: p => http.get('ldt_agent/agentrecord/list', {
  103. params: p
  104. }),
  105. submit: p => http.post('ldt_agent/agentrecord/submit', p),
  106. statistics: p => http.get('app/agent/agenterInfo', {
  107. params: p
  108. }),
  109. earningsDetail: p => http.get('app/agent/earningsDetail', {
  110. params: p
  111. }),
  112. }
  113. //代理类型
  114. const agenterType = {
  115. detail: p => http.get('ldt_platform/platformsetting/detail', {
  116. params: p
  117. }),
  118. }
  119. //用户银行
  120. const userBank = {
  121. detail: p => http.get('ldt_user/userbank/detail', {
  122. params: p
  123. }),
  124. list: p => http.get('ldt_user/userbank/list', {
  125. params: p
  126. }),
  127. appList: p => http.get('common/userbank/list', {
  128. params: p
  129. }),
  130. submit: p => http.post('ldt_user/userbank/submit', p),
  131. remove: p => http.post('ldt_user/userbank/remove?ids=' + p),
  132. }
  133. //支付
  134. const pay = {
  135. //获取wx支付所需参数
  136. getPayOrderPamams: p => http.post('client/trade/scanPay', p),
  137. //h5获取wx支付所需参数
  138. getPayOrderPamamsForH5: p => http.post('client/trade/scanPayByWeChat', p),
  139. //wx支付
  140. payOrder: p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM', {
  141. params: p
  142. }),
  143. //扫码支付
  144. payOrderOfscanCode: p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE', {
  145. params: p
  146. }),
  147. //支付策略
  148. getPointPayType: p => http.post('cyzh-ldt/loginuser/getPointPayType', p),
  149. }
  150. const billRecord = {
  151. submit: p => http.post('ldt_bills/bills/submit', p),
  152. detail: p => http.get('ldt_bills/bills/detail', {
  153. params: p
  154. }),
  155. }
  156. const balanceBills = {
  157. list: p => http.get('common/balancebills/list', {
  158. params: p
  159. }),
  160. }
  161. const pointbills = {
  162. list: p => http.get('common/pointbills/list', {
  163. params: p
  164. }),
  165. }
  166. const goodsbills = {
  167. list: p => http.get('goodsbills/list', {
  168. params: p
  169. }),
  170. submit: p => http.post('ldt_bills/goodsbills/submit', p)
  171. }
  172. const bills = {
  173. list: p => http.get('/common/bills/myBills', {
  174. params: p
  175. }),
  176. }
  177. const setting = {
  178. feedback: p => http.post('ldt_feedback/feedback/submit', p)
  179. }
  180. //账号
  181. const account = {
  182. pointList: p => http.get('cyzh-ldt/loginuser/channeluserpoint/list', {
  183. params: p
  184. }),
  185. remainList: p => http.get('cyzh-ldt/loginuser/remaining/list', {
  186. params: p
  187. }),
  188. }
  189. //webSocket
  190. const webSocket = {
  191. sendInfo: p => http.post('webSocket/sendInfo', p),
  192. }
  193. const joinRecord = {
  194. //活动详情查看该活动的参加者
  195. list: p => http.get("ldt_activity/joinrecord/list", {
  196. params: p
  197. }),
  198. }
  199. const statistics = {
  200. getBillStatistics: p => http.get('/common/bills/getBillStatistics', {
  201. params: p
  202. })
  203. }
  204. const withdraw = {
  205. submit: p => http.post('common/withdrawrec/withdraw', p),
  206. payOrder: p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW', {
  207. params: p
  208. }),
  209. list: p => http.get("ldt_bills/withdrawrec/list", {
  210. params: p
  211. }),
  212. }
  213. const goods = {
  214. menu: p => http.get("goods/getGoodsMenuList", {
  215. params: p
  216. }),
  217. order: p => http.post('goodsbills/order', p),
  218. }
  219. const address = {
  220. list: p => http.get("client/useraddress/list", {
  221. params: p
  222. }),
  223. detail: p => http.get("ldt_user_address/useraddress/detail", {
  224. params: p
  225. }),
  226. submit: p => http.post('client/useraddress/submit', p),
  227. }
  228. const userChannelPoint = {
  229. list: p => http.get('common/userchannelpoint/list', {
  230. params: p
  231. }),
  232. }
  233. const order = {
  234. list: p => http.get("ldt_bills/goodsbills/list", {
  235. params: p
  236. }),
  237. detail: p => http.get("goodsbills/detail", {
  238. params: p
  239. }),
  240. }
  241. const area={
  242. province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {params: p}),
  243. list:p => http.get('blade-system/region/lazy-tree', {params: p}),
  244. }
  245. export const api = {
  246. wxApp,
  247. dict,
  248. uploadFile,
  249. activity,
  250. loginUser,
  251. shop,
  252. audit,
  253. mall,
  254. agenter,
  255. agenterType,
  256. userBank,
  257. pay,
  258. billRecord,
  259. balanceBills,
  260. pointbills,
  261. goodsbills,
  262. bills,
  263. setting,
  264. account,
  265. webSocket,
  266. joinRecord,
  267. statistics,
  268. withdraw,
  269. goods,
  270. address,
  271. userChannelPoint,
  272. order,
  273. area
  274. }