Files
lgp-wx-new/api/page/product.js
2026-10-13 14:04:22 +08:00

18 lines
513 B
JavaScript

import {get, post} from '../request';
const prefix = 'product/'
export const getProductListApi = async (param) => {
return await get(`${prefix}list`, param)
}
export const getCategoryListByPidApi = async (pid = 0) => {
return await get(`${prefix}category-list-by-pid`, {pid})
}
export const getProductDetailApi = async (id = 0, p_user_id = 0) => {
return await get(`${prefix}detail`, {id, p_user_id})
}
export const productViewApi = async (id) => {
return await post(`${prefix}view`, { id })
}