You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
566 B
24 lines
566 B
5 months ago
|
import request from '@/utils/request'
|
||
|
|
||
|
// api地址
|
||
|
const api = {
|
||
|
list: 'comment/list',
|
||
|
listRows: 'comment/listRows',
|
||
|
total: 'comment/total'
|
||
|
}
|
||
|
|
||
|
// 商品评价列表
|
||
|
export const list = (goodsId, param, option) => {
|
||
|
return request.get(api.list, { ...param, goodsId }, option)
|
||
|
}
|
||
|
|
||
|
// 商品评价列表 (限制数量, 用于商品详情页展示)
|
||
|
export const listRows = (goodsId, limit = 5) => {
|
||
|
return request.get(api.listRows, { goodsId, limit })
|
||
|
}
|
||
|
|
||
|
// 商品评分总数
|
||
|
export const total = (goodsId) => {
|
||
|
return request.get(api.total, { goodsId })
|
||
|
}
|