api.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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', {params: p}),
  163. channelList: p => http.get('common/pointbills/channelList', {params: p}),
  164. }
  165. const goodsbills = {
  166. list: p => http.get('goodsbills/list', {
  167. params: p
  168. }),
  169. submit: p => http.post('ldt_bills/goodsbills/submit', p)
  170. }
  171. const bills = {
  172. list: p => http.get('/common/bills/myBills', {
  173. params: p
  174. }),
  175. }
  176. const setting = {
  177. feedback: p => http.post('ldt_feedback/feedback/submit', p)
  178. }
  179. //账号
  180. const account = {
  181. pointList: p => http.get('cyzh-ldt/loginuser/channeluserpoint/list', {
  182. params: p
  183. }),
  184. remainList: p => http.get('cyzh-ldt/loginuser/remaining/list', {
  185. params: p
  186. }),
  187. }
  188. //webSocket
  189. const webSocket = {
  190. sendInfo: p => http.post('webSocket/sendInfo', p),
  191. }
  192. const joinRecord = {
  193. //活动详情查看该活动的参加者
  194. list: p => http.get("ldt_activity/joinrecord/list", {
  195. params: p
  196. }),
  197. }
  198. const statistics = {
  199. getBillStatistics: p => http.get('/common/bills/getBillStatistics', {
  200. params: p
  201. })
  202. }
  203. const withdraw = {
  204. submit: p => http.post('common/withdrawrec/withdraw', p),
  205. payOrder: p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW', {
  206. params: p
  207. }),
  208. list: p => http.get("ldt_bills/withdrawrec/list", {
  209. params: p
  210. }),
  211. }
  212. const goods = {
  213. menu: p => http.get("goods/getGoodsMenuList", {
  214. params: p
  215. }),
  216. order: p => http.post('goodsbills/order', p),
  217. }
  218. const address = {
  219. list: p => http.get("client/useraddress/list", {
  220. params: p
  221. }),
  222. detail: p => http.get("ldt_user_address/useraddress/detail", {
  223. params: p
  224. }),
  225. submit: p => http.post('client/useraddress/submit', p),
  226. }
  227. const userChannelPoint = {
  228. list: p => http.get('common/userchannelpoint/list', {
  229. params: p
  230. }),
  231. }
  232. const order = {
  233. list: p => http.get("ldt_bills/goodsbills/list", {
  234. params: p
  235. }),
  236. detail: p => http.get("goodsbills/detail", {
  237. params: p
  238. }),
  239. }
  240. const area={
  241. province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {params: p}),
  242. list:p => http.get('blade-system/region/lazy-tree', {params: p}),
  243. }
  244. const shopConfig={
  245. list: p => http.get("ldt_goods/shopconfig/list", {
  246. params: p
  247. }),
  248. }
  249. export const api = {
  250. wxApp,
  251. dict,
  252. uploadFile,
  253. activity,
  254. loginUser,
  255. shop,
  256. audit,
  257. mall,
  258. agenter,
  259. agenterType,
  260. userBank,
  261. pay,
  262. billRecord,
  263. balanceBills,
  264. pointbills,
  265. goodsbills,
  266. bills,
  267. setting,
  268. account,
  269. webSocket,
  270. joinRecord,
  271. statistics,
  272. withdraw,
  273. goods,
  274. address,
  275. userChannelPoint,
  276. order,
  277. area,
  278. shopConfig
  279. }