index.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. import https from './interface'
  2. const Timestamp = new Date().getTime();//随机时间戳
  3. /**
  4. * 将所有接口统一起来便于维护
  5. * 如果项目很大可以将 url 独立成文件,接口分成不同的模块
  6. * handle [boolean] 如果需要自己处理 catch 请求 ,传入 true ,交给接口统一处理 ,请传如 false或不传
  7. */
  8. //获取用户信息接口
  9. export const getUserInfo = (data) => {
  10. return https({
  11. url: '/api/getUserInfo?time='+Timestamp,
  12. method: 'GET',
  13. data,
  14. })
  15. }
  16. //新用户注册接口
  17. export const regUser = (data) => {
  18. return https({
  19. url: '/api/regUser?time='+Timestamp,
  20. method: 'POST',
  21. data,
  22. })
  23. }
  24. //场次列表
  25. export const paimaiGoodspaicat = (data) => {
  26. return https({
  27. url: '/api/paimai/goodspaicat?time='+Timestamp,
  28. method: 'GET',
  29. data,
  30. })
  31. }
  32. //预约
  33. export const yuyue = (data) => {
  34. return https({
  35. url: '/api/paimai/yuyue?time='+Timestamp,
  36. method: 'POST',
  37. data,
  38. })
  39. }
  40. //预约列表
  41. export const yuyuelist = (data) => {
  42. return https({
  43. url: '/api/paimai/yuyuelist?time='+Timestamp,
  44. method: 'POST',
  45. data,
  46. })
  47. }
  48. //订单列表
  49. export const paiorderlist = (data) => {
  50. return https({
  51. url: '/api/paimai/paiorderlist?time='+Timestamp,
  52. method: 'POST',
  53. data,
  54. })
  55. }
  56. //资金记录
  57. export const payjilu = (data) => {
  58. return https({
  59. url: '/api/paimai/payjilu?time='+Timestamp,
  60. method: 'POST',
  61. data,
  62. })
  63. }
  64. //兑换预支付订单
  65. export const dhyuzhifu = (data) => {
  66. return https({
  67. url: '/api/paimai/dhyuzhifu?time='+Timestamp,
  68. method: 'POST',
  69. data,
  70. })
  71. }
  72. //兑换付款后调用
  73. export const dhinfo = (data) => {
  74. return https({
  75. url: '/api/paimai/dhinfo?time='+Timestamp,
  76. method: 'POST',
  77. data,
  78. })
  79. }
  80. //付款后
  81. export const fukuan = (data) => {
  82. return https({
  83. url: '/api/paimai/fukuan?time='+Timestamp,
  84. method: 'POST',
  85. data,
  86. })
  87. }
  88. //兑换预支付订单
  89. export const zzyuzhifu = (data) => {
  90. return https({
  91. url: '/api/paimai/zzyuzhifu?time='+Timestamp,
  92. method: 'POST',
  93. data,
  94. })
  95. }
  96. //兑换付款后调用
  97. export const zzinfo = (data) => {
  98. return https({
  99. url: '/api/paimai/zzinfo?time='+Timestamp,
  100. method: 'POST',
  101. data,
  102. })
  103. }
  104. //团队信息
  105. export const tuanduiinfo = (data) => {
  106. return https({
  107. url: '/api/paimai/tuanduiinfo?time='+Timestamp,
  108. method: 'POST',
  109. data,
  110. })
  111. }
  112. //团队信息
  113. export const tuanduilist = (data) => {
  114. return https({
  115. url: '/api/paimai/tuanduilist?time='+Timestamp,
  116. method: 'POST',
  117. data,
  118. })
  119. }
  120. //团队信息
  121. export const qianbaomingxi = (data) => {
  122. return https({
  123. url: '/api/paimai/qianbaomingxi?time='+Timestamp,
  124. method: 'POST',
  125. data,
  126. })
  127. }
  128. //体现 api/paimai/applyWithdraw
  129. export const applyWithdraw = (data) => {
  130. return https({
  131. url: '/api/paimai/applyWithdraw?time='+Timestamp,
  132. method: 'POST',
  133. data,
  134. })
  135. }
  136. //体现记录
  137. export const withdrawLog = (data) => {
  138. return https({
  139. url: '/api/paimai/withdrawLog?time='+Timestamp,
  140. method: 'POST',
  141. data,
  142. })
  143. }
  144. //补票
  145. export const jiaoshui = (data) => {
  146. return https({
  147. url: '/api/paimai/jiaoshui?time='+Timestamp,
  148. method: 'POST',
  149. data,
  150. })
  151. }
  152. export const jiefeng = (data) => {
  153. return https({
  154. url: '/api/paimai/jiefeng?time='+Timestamp,
  155. method: 'POST',
  156. data,
  157. })
  158. }
  159. //捡漏
  160. export const jianloulist = (data) => {
  161. return https({
  162. url: '/api/paimai/jianloulist?time='+Timestamp,
  163. method: 'POST',
  164. data,
  165. })
  166. }
  167. //立即捡漏 api/paimai/paiorder
  168. export const paiorder = (data) => {
  169. return https({
  170. url: '/api/paimai/paiorder?time='+Timestamp,
  171. method: 'POST',
  172. data,
  173. })
  174. }
  175. //收益 api/paimai/paimai/shifanglist
  176. export const shifanglist = (data) => {
  177. return https({
  178. url: '/api/paimai/shifanglist?time='+Timestamp,
  179. method: 'POST',
  180. data,
  181. })
  182. }
  183. //平仓
  184. export const shifang = (data) => {
  185. return https({
  186. url: '/api/paimai/shifang?time='+Timestamp,
  187. method: 'POST',
  188. data,
  189. })
  190. }
  191. //捡漏数据 api/paimai/jianlounum
  192. export const jianlounum = (data) => {
  193. return https({
  194. url: '/api/paimai/jianlounum?time='+Timestamp,
  195. method: 'POST',
  196. data,
  197. })
  198. }
  199. //新手教程
  200. export const jiaocheng = (data) => {
  201. return https({
  202. url: '/api/paimai/jiaocheng?time='+Timestamp,
  203. method: 'GET',
  204. data,
  205. })
  206. }
  207. //参与规则
  208. export const guize = (data) => {
  209. return https({
  210. url: '/api/paimai/guize?time='+Timestamp,
  211. method: 'GET',
  212. data,
  213. })
  214. }
  215. //教程详情api/paimai/jiaochengxq
  216. export const jiaochengxq = (data) => {
  217. return https({
  218. url: '/api/paimai/jiaochengxq?time='+Timestamp,
  219. method: 'GET',
  220. data,
  221. })
  222. }
  223. //节点详情
  224. export const jiedianxq = (data) => {
  225. return https({
  226. url: '/api/paimai/jiedianxq?time='+Timestamp,
  227. method: 'GET',
  228. data,
  229. })
  230. }
  231. // 默认全部导出
  232. export default {
  233. getUserInfo,
  234. regUser,
  235. paimaiGoodspaicat,
  236. yuyue,
  237. paiorderlist,
  238. yuyuelist,
  239. payjilu,
  240. dhyuzhifu,
  241. dhinfo,
  242. zzyuzhifu,
  243. zzinfo,
  244. tuanduiinfo,
  245. tuanduilist,
  246. qianbaomingxi,
  247. applyWithdraw,
  248. withdrawLog,
  249. jiaoshui,
  250. fukuan,
  251. jiefeng,
  252. jianloulist,
  253. paiorder,
  254. shifanglist,
  255. shifang,
  256. jianlounum,
  257. jiaocheng,
  258. guize,
  259. jiaochengxq,
  260. jiedianxq
  261. }