index.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. import {
  2. axios
  3. } from '@/utils/request.js'
  4. // 发送邮箱验证码
  5. export function Api_getEmailCode(data) {
  6. return axios.post(`/api/sms_mail` , data )
  7. }
  8. // 发送手机验证码
  9. export function Api_getSmsSend(data) {
  10. return axios.post(`/api/sms_send` , data)
  11. }
  12. // 登陆页- 登陆
  13. export function Api_userLogin(data) {
  14. return axios.post(`/api/user/login` , data )
  15. }
  16. // 获得个人信息
  17. export function Api_getUserInfo() {
  18. return axios.get(`/api/user/info` )
  19. }
  20. // 提交注册
  21. export function Api_submitRegister(data) {
  22. return axios.post(`/api/user/register` , data)
  23. }
  24. // 轮播图/公告列表/新闻列表
  25. export function Api_getNewsList(data) {
  26. return axios.post(`/api/news/list` , data )
  27. }
  28. // 文章详情
  29. export function Api_getNewDetail(data) {
  30. return axios.post(`/api/news/detail` , data )
  31. }
  32. // 0-2 注册-01-获得国家区号
  33. export function Api_getAreaCode() {
  34. return axios.post(`/api/area_code`)
  35. }
  36. // 03 行情列表/首页推荐
  37. export function Api_getQuotationNew() {
  38. return axios.get(`/api/currency/quotation_new`)
  39. }
  40. // 账户详情
  41. export function Api_getAccountInfo() {
  42. return axios.post(`/api/wallet/list`)
  43. }
  44. // 用户帐单
  45. export function Api_getUserBill(data) {
  46. return axios.post(`/api/wallet/legal_log` , data)
  47. }
  48. // 账户 - 划转
  49. export function Api_setChangeAccount(data) {
  50. return axios.post(`/api/wallet/change` , data)
  51. }
  52. // 币种列表
  53. export function Api_getBiTypeList() {
  54. return axios.get(`/api/wallet/flashAgainstList`)
  55. }
  56. // 闪况记录
  57. export function Api_getFlashRecord() {
  58. return axios.get(`/api/wallet/myFlashAgainstList`)
  59. }
  60. // 提交兑换
  61. export function Api_getSubmit(data) {
  62. return axios.post(`/api/wallet/flashAgainst` , data)
  63. }
  64. // 7-2-3、7-2-4 充值
  65. export function Api_getTopUp(data) {
  66. return axios.post(`/api/wallet/get_in_address` , data)
  67. }
  68. // 修改密码
  69. export function Api_setPassword(data) {
  70. return axios.post(`/api/user/forget` , data)
  71. }
  72. // 地址列表
  73. export function Api_getAddress(data) {
  74. return axios.post(`/api/wallet/get_address` , data)
  75. }
  76. // 增加提现地址
  77. export function Api_addAddress(data) {
  78. return axios.post(`/api/wallet/addaddress` , data)
  79. }
  80. // 删除提现地址
  81. export function Api_delAddress(data) {
  82. return axios.post(`/api/wallet/deladdress` , data)
  83. }
  84. // 划转记录
  85. export function Api_getWalletHzhistory() {
  86. return axios.get(`/api/wallet/hzhistory`)
  87. }
  88. // 下单页信息:当前持仓、张数、逐仓倍数
  89. export function Api_getLeverDeal(data) {
  90. return axios.post(`/api/lever/deal` , data)
  91. }
  92. // 合约下单
  93. export function Api_setSubmitLever(data) {
  94. return axios.post(`/api/lever/submit` , data)
  95. }
  96. // 平仓
  97. export function Api_setCloseLever(data) {
  98. return axios.post(`/api/lever/close` , data)
  99. }
  100. // 设置止盈止损
  101. export function Api_setLeverStop(data) {
  102. return axios.post(`/api/lever/setstop` , data)
  103. }
  104. // 全部平仓
  105. export function Api_setBatchClose(data) {
  106. return axios.post(`/api/lever/batch_close` , data)
  107. }
  108. // 持仓记录
  109. export function Api_getRegister(data) {
  110. return axios.post(`/api/lever/my_trade` , data)
  111. }
  112. // 提币-01-余额查询
  113. export function Api_getWalletCurrency(data) {
  114. return axios.post(`/api/wallet/get_info` , data)
  115. }
  116. // 7-2-6 提币-02-提交
  117. export function Api_setWalletOut(data) {
  118. return axios.post(`/api/wallet/out` , data)
  119. }
  120. // 7-2-6 绑定邮箱
  121. export function Api_setBindEmail(data) {
  122. return axios.post(`/api/safe/email` , data)
  123. }
  124. // 7-2-6 绑定手机
  125. export function Api_setBindMobile(data) {
  126. return axios.post(`/api/safe/mobile` , data)
  127. }
  128. // 设置/修改支付密码
  129. export function Api_setUpdatePassword(data) {
  130. return axios.post(`/api/safe/update_password` , data)
  131. }
  132. // 身份验证
  133. export function Api_identityVerify (data) {
  134. return axios.post(`/api/user/real_name` , data)
  135. }
  136. // 设置google验证码
  137. export function Api_getGoogle () {
  138. return axios.get(`/api/user/get_google`)
  139. }
  140. // 设置google验证码
  141. export function Api_checkGoogle (code) {
  142. return axios.post(`/api/user/check_google`, code)
  143. }
  144. // K线数初始化数据
  145. export function Api_newTimeshar (code) {
  146. return axios.get(`/api/currency/new_timeshar`, code)
  147. }
  148. // // 根据手机号登录
  149. // export function goAuthLogin_Api(data) {
  150. // return axios.post(`/auth/c/doMiniLoginByPhone` , data )
  151. // }
  152. // // 小程序根据用户(企业)ID登录
  153. // export function goEnterpriseId_Api(data) {
  154. // return axios.post(`/auth/c/doMiniLoginById` , data)
  155. // }
  156. // // 获取手机号
  157. // export function getWxPhone_Api(data) {
  158. // return axios.post(`/auth/c/getWxPhone` , data )
  159. // }
  160. // // 根据扫描发票返回信息获取发票信息
  161. // export function getCodeInvoice_Api(data) {
  162. // return axios.post(`/biz/c/get/invoice/info` , data )
  163. // }
  164. // // 获取发票信息表分页
  165. // export function getInvoicePage_Api(data) {
  166. // return axios.get(`/biz/c/invoice/page` , data )
  167. // }
  168. // // 确定录入
  169. // export function confirmEntry_Api(data) {
  170. // return axios.post(`/biz/c/confirm/entry` , data )
  171. // }
  172. // // 获取发票信息表详情
  173. // export function getInvoiceDetail_Api(data) {
  174. // return axios.get(`/biz/c/invoice/detail` , data )
  175. // }
  176. // // 删除发票
  177. // export function delInvoice_Api(data) {
  178. // return axios.post(`/biz/c/invoice/delete` , data )
  179. // }
  180. // // 发票导出
  181. // export function exportInvoice_Api(data) {
  182. // return axios.get(`/biz/c/invoice/export` , data , {responseType: 'arraybuffer', Blob : true} )
  183. // }
  184. // // 获取C端用户详情
  185. // export function getUserDetail_Api(data) {
  186. // return axios.get(`/client/c/user/detail` , data)
  187. // }
  188. // //更新用户信息
  189. // export function setUserInfo_Api(data) {
  190. // return axios.post(`/client/c/update/user` , data)
  191. // }