memberBuy.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { requestApi } from '../util/network'
  2. export const checkFCode =
  3. (goods_id, fcode) =>
  4. requestApi(
  5. '/memberbuy/check_fcode',
  6. 'POST',
  7. {
  8. 'goods_id': goods_id,
  9. 'fcode': fcode
  10. },
  11. 'member'
  12. )
  13. // 获取订单信息
  14. export const buyStep1 =
  15. (cart_id, ifcart, pintuan_id, pintuangroup_id, extra = {}) =>
  16. requestApi(
  17. '/memberbuy/buy_step1',
  18. 'POST',
  19. Object.assign(
  20. {
  21. 'cart_id': cart_id,
  22. 'ifcart': ifcart,
  23. 'pintuan_id': pintuan_id,
  24. 'pintuangroup_id': pintuangroup_id
  25. },
  26. extra),
  27. 'member'
  28. )
  29. // 下单入库
  30. export const buyStep2 =
  31. (ifcart, cart_id, address_id, vat_hash, offpay_hash, offpay_hash_batch, invoice_id, voucher,mallvoucher, pay_message, pintuan_id, pintuangroup_id, f_code, pay_code, extra = {}) =>
  32. requestApi(
  33. '/memberbuy/buy_step2',
  34. 'POST',
  35. Object.assign(
  36. {
  37. 'ifcart': ifcart,
  38. 'cart_id': cart_id,
  39. 'address_id': address_id,
  40. 'vat_hash': vat_hash,
  41. 'offpay_hash': offpay_hash,
  42. 'offpay_hash_batch': offpay_hash_batch,
  43. 'pay_name': pay_code,
  44. 'invoice_id': invoice_id,
  45. 'voucher': voucher,
  46. 'mallvoucher':mallvoucher,
  47. 'pay_message': pay_message,
  48. 'pintuan_id': pintuan_id,
  49. 'pintuangroup_id': pintuangroup_id,
  50. 'fcode': f_code
  51. },
  52. extra)
  53. ,
  54. 'member'
  55. )
  56. // 获取订单支付信息
  57. export const getOrderpayInfo =
  58. (paySn) =>
  59. requestApi(
  60. '/memberbuy/pay',
  61. 'POST',
  62. {
  63. 'pay_sn': paySn
  64. },
  65. 'member'
  66. )
  67. // 门店列表
  68. export const getbuyChainList =
  69. (goods_list,area_id) =>
  70. requestApi(
  71. '/memberbuy/chain_list',
  72. 'POST',
  73. {
  74. 'goods_list':goods_list,
  75. 'area_id':area_id
  76. },
  77. 'member'
  78. )