15 changed files with 413 additions and 99 deletions
@ -0,0 +1,97 @@ |
|||
<template> |
|||
<view class="body"> |
|||
<template v-if="list.length!=0"> |
|||
<view class="reviews_item" v-for="(item,index) in list" :key="index"> |
|||
<view class="reviews_item_title"> |
|||
<view class="reviews_title_user"> |
|||
<text>{{item.user_name}}</text> |
|||
<uni-rate size="18" :disabled="true" disabledColor="red" :value="item.comment_rank" active-color="red" :is-fill="false"/> |
|||
</view> |
|||
<view class="reviews_title_time">{{item.add_time}}</view> |
|||
</view> |
|||
<view class="reviews_item_color">{{item.commentlabels}}</view> |
|||
<view class="reviews_item_content">{{item.content}}</view> |
|||
<!-- <view class="reviews_item_image"> |
|||
<view class="reviews_image_content" v-for="(item,index) in 3" :key="index"></view> |
|||
</view> --> |
|||
</view> |
|||
</template> |
|||
<view class="noreview" v-else>No comment for the time being</view> |
|||
<!-- <view class="mask" v-show="isShwo" @click="isShwo=false"></view> --> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {defaultRequest,defaultRequest2} from '../../api/index.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
isShwo:false, |
|||
query:{ |
|||
_action:'getgoodscomment', |
|||
goods_id:'', |
|||
page_index:1, |
|||
page_size:10, |
|||
commentlabel:'' |
|||
}, |
|||
list:[] |
|||
} |
|||
}, |
|||
methods:{ |
|||
getList(){ |
|||
defaultRequest(this.query).then(res=>{ |
|||
console.info(res) |
|||
if(res.error==0){ |
|||
if(res.data)this.list=res.data |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
onLoad(e) { |
|||
this.query.goods_id=e.goods_id |
|||
this.getList() |
|||
} |
|||
} |
|||
</script> |
|||
<style> |
|||
page{ |
|||
border-top: 14.67rpx #F6F5FA solid; |
|||
} |
|||
</style> |
|||
<style lang="scss" scoped> |
|||
.body{ |
|||
padding: 0 32rpx; |
|||
} |
|||
.noreview{ |
|||
text-align: center; |
|||
margin-top: 100rpx; |
|||
color: #767575; |
|||
|
|||
} |
|||
.more{ |
|||
text-align: right; |
|||
position: relative; |
|||
// margin-top: 20rpx; |
|||
image{ |
|||
width: 24rpx; |
|||
height: 6.67rpx; |
|||
} |
|||
.more_delete{ |
|||
background-image: url(@/static/img/more_bf.png); |
|||
background-size: 100% 100%; |
|||
width: 102.67rpx; |
|||
height: 67.33rpx; |
|||
position: absolute; |
|||
right: 0; |
|||
bottom: 20rpx; |
|||
line-height: 50rpx; |
|||
text-align: center; |
|||
font-size: 24rpx; |
|||
z-index: 999; |
|||
} |
|||
} |
|||
.mask{ |
|||
background-color: white; |
|||
opacity: 0; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue