api.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. getBccH5SignAuthentication: p => http.get("client/user/getBccH5SignAuthentication", {
  83. params: p
  84. }),
  85. }
  86. //审核管理
  87. const audit = {
  88. list: p => http.get("ldt_shop/audit/list", {
  89. params: p
  90. }),
  91. submit: p => http.post('ldt_shop/audit/submit', p),
  92. detail: p => http.get("ldt_shop/audit/detail", {
  93. params: p
  94. }),
  95. }
  96. //商场管理
  97. const mall = {
  98. //获取商场列表
  99. list: p => http.get('mall/list', {params: p}),
  100. }
  101. //代理商
  102. const agenter = {
  103. agentLevelList: p => http.get('ldt_agent/agent/list', {params: p}),
  104. addAgentOrder: p => http.post('/app/agent/addAgentOrder', p),
  105. list: p => http.get('ldt_agent/agentrecord/list', {
  106. params: p
  107. }),
  108. submit: p => http.post('ldt_agent/agentrecord/submit', p),
  109. statistics: p => http.get('app/agent/agenterInfo', {
  110. params: p
  111. }),
  112. earningsDetail: p => http.get('app/agent/earningsDetail', {
  113. params: p
  114. }),
  115. }
  116. //代理类型
  117. const agenterType = {
  118. detail: p => http.get('ldt_platform/platformsetting/detail', {
  119. params: p
  120. }),
  121. }
  122. //用户银行
  123. const userBank = {
  124. detail: p => http.get('ldt_user/userbank/detail', {
  125. params: p
  126. }),
  127. list: p => http.get('ldt_user/userbank/list', {
  128. params: p
  129. }),
  130. appList: p => http.get('common/userbank/list', {
  131. params: p
  132. }),
  133. submit: p => http.post('ldt_user/userbank/submit', p),
  134. remove: p => http.post('ldt_user/userbank/remove?ids=' + p),
  135. }
  136. //支付
  137. const pay = {
  138. //获取wx支付所需参数
  139. getPayOrderPamams: p => http.post('client/trade/scanPay', p),
  140. //h5获取wx支付所需参数
  141. getPayOrderPamamsForH5: p => http.post('client/trade/scanPayByWeChat', p),
  142. //wx支付
  143. payOrder: p => http.get('payment/payOrder/YEE_PAY/MINI_PROGRAM', {
  144. params: p
  145. }),
  146. //扫码支付
  147. payOrderOfscanCode: p => http.get('payment/payOrder/YEE_PAY/SCAN_CODE', {
  148. params: p
  149. }),
  150. //支付策略
  151. getPointPayType: p => http.post('cyzh-ldt/loginuser/getPointPayType', p),
  152. //取消支付
  153. cancelTrade:p => http.post('client/trade/cancelTrade', p),
  154. }
  155. const billRecord = {
  156. submit: p => http.post('ldt_bills/bills/submit', p),
  157. detail: p => http.get('ldt_bills/bills/detail', {
  158. params: p
  159. }),
  160. }
  161. const balanceBills = {
  162. list: p => http.get('common/balancebills/list', {
  163. params: p
  164. }),
  165. }
  166. const pointbills = {
  167. list: p => http.get('common/pointbills/list', {params: p}),
  168. channelList: p => http.get('common/pointbills/channelList', {params: p}),
  169. }
  170. const goodsbills = {
  171. list: p => http.get('goodsbills/list', {
  172. params: p
  173. }),
  174. submit: p => http.post('ldt_bills/goodsbills/submit', p)
  175. }
  176. const bills = {
  177. list: p => http.get('/common/bills/myBills', {
  178. params: p
  179. }),
  180. }
  181. const setting = {
  182. feedback: p => http.post('ldt_feedback/feedback/submit', p)
  183. }
  184. //账号
  185. const account = {
  186. pointList: p => http.get('cyzh-ldt/loginuser/channeluserpoint/list', {
  187. params: p
  188. }),
  189. remainList: p => http.get('cyzh-ldt/loginuser/remaining/list', {
  190. params: p
  191. }),
  192. }
  193. //webSocket
  194. const webSocket = {
  195. sendInfo: p => http.post('webSocket/sendInfo', p),
  196. }
  197. const joinRecord = {
  198. //活动详情查看该活动的参加者
  199. list: p => http.get("ldt_activity/joinrecord/list", {
  200. params: p
  201. }),
  202. }
  203. const statistics = {
  204. getBillStatistics: p => http.get('/common/bills/getBillStatistics', {
  205. params: p
  206. })
  207. }
  208. const withdraw = {
  209. submit: p => http.post('common/withdrawrec/withdraw', p),
  210. payOrder: p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW', {
  211. params: p
  212. }),
  213. list: p => http.get("ldt_bills/withdrawrec/list", {
  214. params: p
  215. }),
  216. }
  217. const goods = {
  218. menu: p => http.get("goods/getGoodsMenuList", {
  219. params: p
  220. }),
  221. order: p => http.post('goodsbills/order', p),
  222. }
  223. const address = {
  224. list: p => http.get("client/useraddress/list", {
  225. params: p
  226. }),
  227. detail: p => http.get("ldt_user_address/useraddress/detail", {
  228. params: p
  229. }),
  230. submit: p => http.post('client/useraddress/submit', p),
  231. }
  232. const userChannelPoint = {
  233. list: p => http.get('common/userchannelpoint/list', {
  234. params: p
  235. }),
  236. }
  237. const order = {
  238. list: p => http.get("ldt_bills/goodsbills/list", {
  239. params: p
  240. }),
  241. detail: p => http.get("goodsbills/detail", {
  242. params: p
  243. }),
  244. }
  245. const area={
  246. province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {params: p}),
  247. list:p => http.get('blade-system/region/lazy-tree', {params: p}),
  248. }
  249. const shopConfig={
  250. list: p => http.get("ldt_goods/shopconfig/list", {
  251. params: p
  252. }),
  253. }
  254. const notice={
  255. notReadIdList:p => http.get('app/notice/notReadIdList', {params: p}),
  256. list:p => http.get('app/notice/list', {params: p}),
  257. detail:p => http.get('ldt_notice/notice/detail', {params: p}),
  258. isRead: p => http.post('app/notice/isRead', p),
  259. }
  260. const test={
  261. submit: p => http.post('/common/account/decrypt/test', p),
  262. remove: p => http.post('ldt_bills/bills/remove?ids=' + p),
  263. }
  264. export const api = {
  265. wxApp,
  266. dict,
  267. uploadFile,
  268. activity,
  269. loginUser,
  270. shop,
  271. audit,
  272. mall,
  273. agenter,
  274. agenterType,
  275. userBank,
  276. pay,
  277. billRecord,
  278. balanceBills,
  279. pointbills,
  280. goodsbills,
  281. bills,
  282. setting,
  283. account,
  284. webSocket,
  285. joinRecord,
  286. statistics,
  287. withdraw,
  288. goods,
  289. address,
  290. userChannelPoint,
  291. order,
  292. area,
  293. shopConfig,
  294. notice,
  295. test
  296. }