|
@ -31,7 +31,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
props:['goodsId'], |
|
|
props:['goodsId','goodsType'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
commentList: [], |
|
|
commentList: [], |
|
@ -46,18 +46,20 @@ |
|
|
this.commentList = [] |
|
|
this.commentList = [] |
|
|
this.commentNum = 0 |
|
|
this.commentNum = 0 |
|
|
if (!this.goodsId) return |
|
|
if (!this.goodsId) return |
|
|
this.Post({ |
|
|
let query = {offset: 0,limit: 2} |
|
|
goods_id: this.goodsId, |
|
|
if (this.goodsType=='goodsId') { |
|
|
offset: 0, |
|
|
query.goods_id = this.goodsId |
|
|
limit: 2 |
|
|
} else { |
|
|
}, '/api/scenic/getGoodsCommentByScenicId').then(res => { |
|
|
query.scenic_id = this.goodsId |
|
|
|
|
|
} |
|
|
|
|
|
this.Post(query, '/api/scenic/getGoodsCommentByScenicId').then(res => { |
|
|
this.commentList = res.data |
|
|
this.commentList = res.data |
|
|
this.commentNum = res.msg |
|
|
this.commentNum = res.msg |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
viewAll () { |
|
|
viewAll () { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:'/subPackages/eventCalendar/detail?id='+this.id |
|
|
url:`/subPackages/order/commentList?${this.goodsType}=`+this.goodsId |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|