business.js 605 B

1234567891011121314
  1. import { createApiModule, post } from '@/core/http/http-client'
  2. import { buildRestPath } from '@/core/config/api-paths'
  3. /** 业务 REST 接口(在此扩展 path 即可) */
  4. export const business = createApiModule({
  5. productGoods: { path: buildRestPath('product/goods'), method: 'GET' },
  6. productCollect: { path: buildRestPath('product/collect'), method: 'GET' },
  7. couponQuery: { path: buildRestPath('coupon/query'), method: 'POST' },
  8. couponReceive: { path: buildRestPath('coupon/receive'), method: 'POST' }
  9. })
  10. export function sendChatMessage(data) {
  11. return post(buildRestPath('chat/send'), data)
  12. }