Blame view

src/service.ts 513 Bytes
sanmu authored
1
2
3
4
import axios from 'axios'
import type { ProductListQuery } from './type'

export const getCategoryList = () => {
sanmu authored
5
6
  // http://39.108.227.113:3000/mock/11/shop/product/category
  // return axios.post('/mock/11/shop/product/category', {})
sanmu authored
7
8
9
10
11
12
13
14
15
16
  return axios.post('/shop/product/category', {})
}

export const getProductList = (params: ProductListQuery) => {
  return axios.post('/shop/product/list', params)
}

export const getDetail = (params: { id: string }) => {
  return axios.post('/shop/product/detail', params)
}