测试分支提交,详情页字段修改
parent
150e56fce3
commit
6a327ac0e7
|
|
@ -47,7 +47,8 @@
|
||||||
const { data } = await sheep.$api.goods.comment(id, {
|
const { data } = await sheep.$api.goods.comment(id, {
|
||||||
list_rows: 3,
|
list_rows: 3,
|
||||||
});
|
});
|
||||||
state.commentList = data.data;
|
console.log(data)
|
||||||
|
state.commentList = data;
|
||||||
state.total = data.total;
|
state.total = data.total;
|
||||||
}
|
}
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
|
|
||||||
|
|
@ -256,10 +256,12 @@
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
// 在此处对数据做出转换
|
// 在此处对数据做出转换
|
||||||
res.data.sales=res.data.salesCount
|
res.data.sales=res.data.salesCount
|
||||||
res.data.original_price=res.data.price
|
res.data.original_price=res.data.marketPrice/100
|
||||||
res.data.introduction=res.data.title
|
res.data.subtitle=res.data.introduction
|
||||||
|
res.data.title=res.data.name
|
||||||
|
res.data.price=[res.data.price/100]
|
||||||
state.goodsInfo = res.data;
|
state.goodsInfo = res.data;
|
||||||
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.picUrl.split(','));
|
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.sliderPicUrls);
|
||||||
} else {
|
} else {
|
||||||
// 未找到商品
|
// 未找到商品
|
||||||
state.goodsInfo = null;
|
state.goodsInfo = null;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ export default {
|
||||||
|
|
||||||
// 商品评价列表
|
// 商品评价列表
|
||||||
comment: (id, params = {}) =>
|
comment: (id, params = {}) =>
|
||||||
request({
|
request2({
|
||||||
url: 'goods/comment/' + id,
|
url: 'product/comment/list?spuId=' + id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
custom: {
|
custom: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue