Browse Source

评价视频距离

master
jiazhipeng 3 weeks ago
parent
commit
d7e9459d9d
  1. 169
      components/commentList.vue
  2. 12
      pages.json
  3. 71
      subPackages/activity/dazhaxie.vue
  4. 4
      subPackages/food/detail.vue
  5. 14
      subPackages/food/index.vue
  6. 6
      subPackages/homestay/detail.vue
  7. 5
      subPackages/line/lineDetail.vue
  8. 63
      subPackages/order/orderDetail.vue
  9. 20
      subPackages/techan/detail.vue
  10. 247
      subPackages/user/comment.vue
  11. 147
      subPackages/user/commentList.vue

169
components/commentList.vue

@ -0,0 +1,169 @@
<template>
<view class="bg">
<view class="header" >
<view>买家评价</view>
<view style="font-weight: 500;font-size: 27rpx;color: #999999;" @click="goCommentList()">
{{total}}
<uni-icons type="right" size="12"></uni-icons>
</view>
</view>
<view class="review-box" v-if="reviews.length>0">
<view class="review-item" v-for="(item,i) in reviews" :key="i">
<image class="avator" :src="item.user.avatar" mode="aspectFill"></image>
<view class="comment-container">
<view class="comment-info">
<view class="nickname" style="padding-right:20rpx ;">{{item.user.nickname}}</view>
<!-- <view class="nickname" style="padding-right:20rpx ;">张三</view> -->
<view class="iconfont">
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/star-seld.png"
v-for="(item,index) in Number(item.rate)" :key="index" class="starImg"/>
</view>
</view>
<view class="comment-content text-overflowRows">{{item.content}}</view>
</view>
<view class="img-box" v-if="item.img_list.length>0">
<image class="imgs" mode="aspectFill" :src="item.img_list[0]" @click="viewImg(item)"></image>
<view v-if="item.img_list.length>1" class="more-img">+{{item.img_list.length}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"commentList",
props: ["prodId"],
data() {
return {
total: 0,
reviews: [],
};
},
mounted() {
this.getComments()
},
methods: {
getComments () {
this.Post({
product_id: this.prodId,
offset: 0,
limit: 3,
},"/api/product/product_comment_list").then((res) => {
let resData = res.data.list || []
resData.forEach(v=>{
v.img_list = v.img_list.split(',')
})
this.reviews = resData;
this.total = res.data.total;
})
},
goCommentList () {
uni.navigateTo({
url:`/subPackages/user/commentList?id=${this.prodId}`
})
},
viewImg (item) {
let imgs = item.img_list
uni.previewImage({
urls:imgs
})
},
},
}
</script>
<style scoped lang="scss">
.bg{
background: #FFFFFF;
width: 100%;
.header{
width: 100%;
height: 97rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: bold;
font-size: 35rpx;
color: #000000;
font-weight: bold;
font-size: 35rpx;
color: #000000;
padding: 26rpx;
}
}
.review-box{
border-top: 1px solid #D9D9D9;
padding: 26rpx;
.review-item{
border-bottom: 1px solid #D9D9D9;
display: flex;
justify-content: space-between;
color: #999999;
align-items: flex-start;
font-size: 24rpx;
.avator{
width: 57rpx;
height: 57rpx;
border-radius: 50%;
flex-shrink: 0;
}
.starImg{
width: 23.47rpx;
height: 23.47rpx;
margin-right: 6rpx;
}
.comment-container{
flex: 1;
width: 10rpx;
padding: 0 45rpx 0 15rpx;
}
.comment-info {
width: 100%;
height: 57rpx;
font-weight: bold;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
}
.comment-content {
width: 100%;
padding-top: 12rpx;
font-size: 27rpx;
color: #000;
font-weight: 500;
}
.img-box{
width: 133rpx;
height: 133rpx;
position: relative;
.imgs{
width: 100%;
height: 100%;
border-radius: 13rpx;
}
}
.more-img{
height: 37rpx;
line-height: 37rpx;
background: #000;
border-radius: 13rpx 0rpx 13rpx 0rpx;
box-sizing: border-box;
padding: 0 5rpx;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
position: absolute;
bottom: 0;
right: 0;
opacity: 0.8;
}
}
.review-item:last-of-type{
border-bottom: none;
}
}
</style>

12
pages.json

@ -367,6 +367,18 @@
"style": {
"navigationBarTitleText" : "绿色有机标准认证"
}
},
{
"path": "user/comment",
"style": {
"navigationBarTitleText": "填写评价"
}
},
{
"path": "user/commentList",
"style": {
"navigationBarTitleText": "全部评价"
}
}
]
}],

71
subPackages/activity/dazhaxie.vue

@ -34,6 +34,18 @@
<image v-show="xieTypeIndex==1" mode="heightFix" src="https://static.ticket.sz-trip.com/uploads/20250926/b544167679d48b610189e505fa18b94d.png"></image>
</view>
</view>
<view class="xie-type" v-if="typeIndex==2">
<view class="xie-type-item" @click="routeTypeIndex=0">
<image v-show="routeTypeIndex==1" mode="heightFix" src="https://static.ticket.sz-trip.com/uploads/20250929/98ea5deec4232b6621f4edd49e5d5c07.png"></image>
<image v-show="routeTypeIndex==0" mode="heightFix" src="https://static.ticket.sz-trip.com/uploads/20250929/1ac70bd077d438dcbedb465ed26da406.png"></image>
</view>
<view class="xie-type-item" @click="routeTypeIndex=1">
<image v-show="routeTypeIndex==0" mode="heightFix" src="https://static.ticket.sz-trip.com/uploads/20250929/96b8dc0d9f43adbd511eab4254c47064.png"></image>
<image v-show="routeTypeIndex==1" mode="heightFix" src="https://static.ticket.sz-trip.com/uploads/20250929/c33e9f35a12db14e85d0b7a8f650d19d.png"></image>
</view>
</view>
</view>
<view class="prod-box flex-between" v-if="typeIndex!=2">
<view v-if="typeIndex==0" style="width: 100%;height: 10rpx;"></view>
@ -75,6 +87,23 @@
</template>
</view>
<view class="prod-box flex-between" v-else>
<template v-if="routeTypeIndex==0">
<view class="row-product" @click="gotoDetailByType(item)" :key="index"
v-for="(item,index) in routeList.list.slice(0,routeList.viewNum)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="flex-between">
<view class="price">{{item.price/100}}</view>
<view class="btn">立即抢购</view>
</view>
</view>
</view>
<image class="view-more" src="https://static.ticket.sz-trip.com/uploads/20250923/e121513a65fda74f822c660cda703e9a.png"
v-if="routeList.list.length>0&&routeList.viewNum<=6" mode="heightFix"
@click="routeList.viewNum=999"></image>
</template>
<template v-else>
<view class="row-product" @click="gotoDetailByType(item)" :key="index"
v-for="(item,index) in typeList[typeIndex].list.slice(0,typeList[typeIndex].viewNum)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
@ -84,7 +113,8 @@
<view class="tag" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">{{tag}}</view>
</view> -->
<view class="flex-between">
<view class="btn">查看详情</view>
<view class="price">{{item.price/100}}</view>
<view class="btn">立即抢购</view>
</view>
</view>
@ -92,6 +122,8 @@
<image class="view-more" src="https://static.ticket.sz-trip.com/uploads/20250923/e121513a65fda74f822c660cda703e9a.png"
v-if="typeList[typeIndex].list.length>0&&typeList[typeIndex].viewNum<=6" mode="heightFix"
@click="typeList[typeIndex].viewNum=999"></image>
</template>
</view>
<view class="prod-bottom"></view>
</view>
@ -124,6 +156,10 @@
typeIndex: 0,
xieTypeIndex:0,
xieList: {list: [], viewNum: 6,id: 113},
routeTypeIndex:0,
routeList: {list: [], viewNum: 6,id: 114},
typeList: [
{
id: 109,title: "品蟹鲜",viewNum:6, list: [],
@ -140,7 +176,7 @@
{
id: 111,title: "玩蟹路",viewNum:6, list: [],
img:"https://static.ticket.sz-trip.com/uploads/20250923/84ec930200a2a7421785fc146ea6d29a.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250923/963148360925eaaf4c5dc9f5a3a9a641.png",
imgs:"https://static.ticket.sz-trip.com/uploads/20250929/a323e447e845d21c1001bb8ae87645fd.png",
bgImg:"https://static.ticket.sz-trip.com/uploads/20250923/7dd6ead7144b2d4d1630a4fc3b4ca673.png",
},
{
@ -213,6 +249,17 @@
this.xieList.list = res.data.list
})
this.Post({
tag_id: this.routeList.id,
offset: 0,
limit: 999,
},'/api/product/get_product_by_tag_subject').then(res => {
if (res.data.list.length < this.routeList.viewNum) {
this.routeList.viewNum = 999
}
this.routeList.list = res.data.list
})
},
getCoupon(item) {
if (!this.isReceive) {
@ -375,15 +422,7 @@
justify-content: space-between;
padding: 4rpx 10rpx 10rpx;
}
.price{
font-weight: bold;
font-size: 28rpx;
color: #FF0014;
&::before{
content: "¥";
font-size: 24rpx;
}
}
.btn{
width: 140rpx;
height: 50rpx;
@ -514,4 +553,14 @@
height: 100vh;
overflow-y: auto;
}
.price{
font-weight: bold;
font-size: 28rpx;
color: #FF0014;
&::before{
content: "¥";
font-size: 24rpx;
}
}
</style>

4
subPackages/food/detail.vue

@ -50,6 +50,8 @@
</view>
</view>
<commentListVue v-if="id" :prodId="id"></commentListVue>
<view class="scroll-all-box" id="menus">
<view :class="'scroll-menus' + (fixed ? ' fixed-menus' : '')">
<view :class="'scroll-menu-item' + (type == 1 ? ' active' : '')" @click="changeMenu(1)">产品特色</view>
@ -157,7 +159,9 @@
</template>
<script>
import commentListVue from '../../components/commentList.vue';
export default {
components: {commentListVue},
data() {
return {

14
subPackages/food/index.vue

@ -14,10 +14,14 @@
{{item.display_tags.split(',').join(" | ")}}
</view>
<view class="subtitle text-overflowRows">{{item.address}}</view>
<view class="flex-between">
<view class="subtitle" >
<text v-if="item.distance">距您约{{(item.distance/1000).toFixed(2)}}km</text>
</view>
<view class="price price-money">
{{item.price/100}}
</view>
</view>
</view>
</view>
@ -39,6 +43,7 @@
}
},
onShow() {
this.getLocation()
this.finished = false
},
onReady() {
@ -52,7 +57,12 @@
//
getList(){
this.Post({tag_id: this.type_id,offset: this.list.length,limit: 10},
let param = {
product_id: this.goodsId,
lon: uni.getStorageSync('location').lon || '120',
lat: uni.getStorageSync('location').lat || '36',
}
this.Post({tag_id: this.type_id,offset: this.list.length,limit: 10,...param},
'/api/product/get_product_by_tag').then(res => {
this.list = [...this.list, ...res.data.list];
if (res.data.length < 10) {

6
subPackages/homestay/detail.vue

@ -108,6 +108,9 @@
</view>
<view style="width: 100%;height: 20rpx;background: #F7F7F7;"></view>
<commentListVue v-if="id" :prodId="id"></commentListVue>
<view style="padding: 0rpx 29rpx;">
<view class="box-title">酒店介绍</view>
<view class="common-container" style="padding: 30rpx 40rpx;">
@ -195,10 +198,11 @@
</template>
<script>
import commentListVue from '../../components/commentList.vue';
import SelectCalendar from './selectCalendar';
export default {
components: {
SelectCalendar
SelectCalendar,commentListVue
},
data() {
return {

5
subPackages/line/lineDetail.vue

@ -18,6 +18,9 @@
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #F7F7F7;"></view>
<commentListVue v-if="id" :prodId="id"></commentListVue>
<view class="scroll-all-box" id="menus">
<view :class="'scroll-menus' + (fixed ? ' fixed-menus' : '')">
<view :class="'scroll-menu-item' + (type == 1 ? ' active' : '')" @click="changeMenu(1)">产品详情</view>
@ -51,9 +54,11 @@
</template>
<script>
import commentListVue from '../../components/commentList.vue';
const device = uni.getSystemInfoSync();
const ratio = device.windowWidth / 750;
export default {
components: {commentListVue},
data() {
return {
id: '',

63
subPackages/order/orderDetail.vue

@ -92,6 +92,10 @@
<span>手机号</span>{{item.phone}}
</view>
</view>
<view class="com-comment-box" v-if="item.state=='WAIT_COMMENT' && info.order_product_list.length>1">
<view class="com-comment-btn">去评价</view>
</view>
</view>
<!-- 邮寄自提商品详情 -->
@ -152,6 +156,10 @@
</view>
</view>
</view>
<view class="com-comment-box" v-if="item.state=='WAIT_COMMENT' && info.order_product_list.length>1">
<view class="com-comment-btn">去评价</view>
</view>
</view>
<!-- 酒店信息 -->
@ -226,6 +234,11 @@
</view>
</view>
</view>
<view class="com-comment-box" v-if="item.state=='WAIT_COMMENT' && info.order_product_list.length>1">
<view class="com-comment-btn">去评价</view>
</view>
</view>
<!-- 线路下单 -->
@ -305,6 +318,10 @@
</view>
</view>
</view>
<view class="com-comment-box" v-if="item.state=='WAIT_COMMENT' && info.order_product_list.length>1">
<view class="com-comment-btn">去评价</view>
</view>
</view>
</view>
@ -365,6 +382,11 @@
立即支付
</view>
<view class="btn" v-if="info.state=='WAIT_COMMENT'&& info&&info.order_product_list.length==1"
@click="goComment(info.order_product_list[0])">
去评价
</view>
<!-- <view class="btn" v-if="info.state == 'POST' && info.order_child[0].goods_genre == 'pgoods'"
@click="openMask()">
快递查询
@ -411,13 +433,20 @@
lineNum: 0,
current: 0,
maskShow: false,
postInfo: {}
postInfo: {},
showReload: false,
}
},
onLoad(option) {
this.orderId = option.id
this.getDetail()
},
onShow () {
if (this.showReload) {
this.getDetail()
this.showReload = false;
}
},
methods: {
//
async getDetail() {
@ -646,7 +675,18 @@
});
}
})
},
//
goComment (item) {
if (item) {
uni.setStorageSync("commentProd", item)
uni.navigateTo({
url:`/subPackages/user/comment`
})
this.showReload = true
}
},
}
}
</script>
@ -1259,4 +1299,25 @@
color: #6A8A27;
margin-top: 10rpx;
}
.com-comment-box{
border-top: 1px solid #D8D8D8;
margin-top: 30rpx;
padding-top: 30rpx;
display: flex;
justify-content: flex-end;
}
.com-comment-btn{
width: 173rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 11rpx;
border: 1px solid #999999;
line-height: 60rpx;
text-align: center;
font-weight: 500;
font-size: 27rpx;
color: #111111;
}
</style>

20
subPackages/techan/detail.vue

@ -12,6 +12,13 @@
<view class="swipe-box info-box-query" id="box1">
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000"
@change="swiperChange" circular>
<swiper-item v-if="info && info.videourl">
<video :src="showImg(info.videourl)" id="detailVideo"
:poster="showImg(info.headimg)"
@error="videoErrorCallback" controls
style="width: 100%;height: 100%;" object-fit="cover"
></video>
</swiper-item>
<swiper-item v-for="(item, index) in info.listimg" :key="item.id">
<view class="swiper-item">
<image class="item-img" :src="showImg(item)" mode="aspectFill"></image>
@ -62,8 +69,9 @@
</view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: #F7F7F7;"></view>
<commentListVue v-if="id" :prodId="id"></commentListVue>
<view class="price-box supplier-box" style="margin-top: 20rpx;" v-if="supplierInfo">
<image v-if="supplierInfo.headimg" class="supplier-image" :src="supplierInfo.headimg"></image>
@ -166,10 +174,10 @@
</template>
<script>
import commentListVue from '../../components/commentList.vue';
import cartDataVue from '../../components/cartData.vue'
export default {
components: {cartDataVue},
components: {cartDataVue,commentListVue},
data() {
return {
down: false,
@ -216,6 +224,12 @@
this.getCartList()
},
methods: {
videoErrorCallback(e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
},
viewImage (item) {
let image = "";
if (item.image) {

247
subPackages/user/comment.vue

@ -0,0 +1,247 @@
<template>
<view class="bg">
<!-- 顶部商品图片名称 -->
<view class="top">
<image :src="showImg(info.product_img)" mode=""></image>
<view class="goods-title text-overflowRows">
{{info.product_title}}
</view>
</view>
<view class="line"></view>
<view class="rate-box">
综合评分
<img :src="'https://static.ticket.sz-trip.com/dongtai/images/user/' + (starIndex > index ? 'star-seld.png' : 'star.png')"
v-for="(item,index) in 5" :key="index" @click="changeStar(item)" class="starImg"/>
</view>
<view class="comment-text">
<textarea placeholder-style="color:#999;font-size:28rpx;font-weigth:500;" placeholder="请填写您的评价~" style="width: 657rpx;background: #F7F7F7;border-radius: 6px;padding: 28.67rpx 20rpx;" v-model="content"/>
</view>
<view class="comment-pic">
<view class="" style="margin-top: 40.67rpx;margin-bottom: 36.67rpx;">上传图片({{list.length}}/6)</view>
<uni-file-picker limit="6" file-mediatype="image" return-type="list" ref="files" :auto-upload="false" @select="select" @progress="progress" @success="success" @fail="fail" @delete="del">
<view class="" style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
<!-- <image style="width: 40rpx;height: 40rpx;position: absolute;right: 0;top: 0;" src="https://static.ticket.sz-trip.com/tongli/images/order/cha.png" mode=""></image> -->
<view class="" style="margin-top: 16rpx;font-size: 24rpx;font-weight: 500;color: #999;">
上传图片
</view>
</view>
</uni-file-picker>
</view>
<view class="submit-btn" @click="submit">提交</view>
</view>
</template>
<script>
import {pathToBase64} from "@/static/js/mmmm-image-tools/index.js"
export default {
data() {
return {
proList: [
{name: '', img: [], imgList: [], content: ''}
],
content:'',
info: {},
order_id: '',
imageStyles: {
width: 64,
height: 64,
border: {
radius: '50%'
}
},
listStyles: {
//
border: false,
// 线
dividline: false,
},
fileLists: [],
list:[],
starIndex: 5
}
},
onLoad(options) {
},
onShow(){
this.getProductInfo()
},
methods: {
getProductInfo () {
this.info = uni.getStorageSync("commentProd");
if (!this.info||!this.info.order_id) {
setTimeout(()=>{
uni.navigateBack()
},1000)
}
},
//
changeStar(item) {
this.starIndex = item + 1
},
del(e) {
console.log('e',e.tempFile);
let index = this.list.findIndex(f => f === e.tempFile)
this.list.splice(index, 1)
let i = this.fileLists.findIndex(f => f.url === e.tempFile)
this.fileLists.splice(i, 1)
this.$forceUpdate()
console.log('删除后的list',this.list);
console.log('删除后的fileLists',this.fileLists);
},
//
async onunload(url){
console.log('url',url);
let base64 = await pathToBase64(url)
let res = await this.Post({
method: 'POST',
img_base64: base64
}, '/api/pbservice/Other/base64Upload')
return res.data.url
},
//
async select(e){
console.log('选择文件:',e)
let lists = [].concat(e.tempFiles)
console.log('lists',lists);
let fileListLen = this.fileLists
lists.map((item) => {
fileListLen.push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (var i = 0; i < lists.length; i++) {
const result = await this.onunload(e.tempFiles[i].url)
console.log('result',result)
this.list.push(result)
}
console.log('fileLists',this.fileLists);
console.log('list',this.list);
},
submit() {
console.log('content',this.content);
if (this.content == '') {
uni.showToast({
title: '请文字评论后再提交~',
icon: 'none'
});
return;
}
if (this.fileLists.length != this.list.length) {
uni.showToast({
title: '图片上传中,请稍后再提交',
icon: 'none'
});
return
}
console.log('-----------',this.list);
this.Post({
product_id: this.info.product_id,
order_id: this.info.order_id,
content: this.content,
rate: this.starIndex,
img_list: this.list.join(","), //
sku_id: this.info.sku_id,
},'/api/product/product_comment').then(res => {
if (res.code == 1 || res.code == 200) {
uni.navigateBack()
uni.removeStorageSync(commentProd)
}
});
},
}
}
</script>
<style scoped lang="scss">
.bg {
padding: 0 26.67rpx;
background: #fff;
min-height: 100vh;
padding-top: 19.33rpx;
}
.top {
display: flex;
}
.top image {
width: 142rpx;
height: 142rpx;
flex-shrink: 0;
margin: .67rpx 20rpx .67rpx 12rpx;
border-radius: 7rpx;
}
.goods-title {
height: 80rpx;
font-size: 31rpx;
font-weight: 500;
color: #333;
}
.line {
height: 1rpx;
background: #d8d8d8;
margin: 20rpx 0;
}
.rate-box {
display: flex;
height: 106rpx;
align-items: center;
.starImg {
width: 40rpx;
height: 40rpx;
margin-left: 20rpx;
}
}
.example-body {
padding: 10px;
padding-top: 0;
}
.custom-image-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.text {
font-size: 14px;
color: #333;
}
.submit-btn {
width: 697rpx;
height: 80rpx;
background: #6A8A2D;
border-radius: 11rpx;
font-size: 36rpx;
font-weight: 500;
color: #FFFFFF;
text-align: center;
line-height: 80rpx;
position: fixed;
bottom: 53.33rpx;
}
::v-deep .uni-file-picker {
padding-bottom: 165rpx !important;
}
::v-deep .file-picker__progress-item {
display: none !important;
}
</style>

147
subPackages/user/commentList.vue

@ -0,0 +1,147 @@
<template>
<view class="bg">
<view class="review-item" v-for="(item,i) in reviews" :key="i">
<view class="flex">
<image class="avator" :src="item.user.avatar" mode="aspectFill"></image>
<view class="comment-container">
<view class="nickname" style="padding-right:20rpx ;">{{item.user.nickname}}</view>
<view class="iconfont">
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/star-seld.png"
v-for="(item,index) in Number(item.rate)" :key="index" class="starImg"/>
</view>
</view>
<view style="font-weight: 500;font-size: 24rpx;color: #999999;display: flex;align-items: center;">
{{item.create_time.slice(0,10)}}
</view>
</view>
<view class="text-overflow" style="font-weight: 500;
font-size: 31rpx;color: #999999;margin: 22rpx 0 30rpx;">
{{item.sku_name}}
</view>
<view class="comment-content">{{item.content}}</view>
<view class="img-box" >
<image class="imgs" v-for="(img,i) in item.img_list" :key="i"
mode="aspectFill" :src="img" @click="viewImg(item)"></image>
<!-- <view v-if="item.img_list.length>1" class="more-img">+{{item.img_list.length}}</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
name:"commentList",
props: ["prodId"],
data() {
return {
id: null,
total: 0,
reviews: [],
finished: false,
};
},
onLoad(option) {
this.id = option.id
this.getComments()
},
methods: {
getComments () {
this.Post({
product_id: this.id,
offset: this.reviews.length,
limit: 10,
},"/api/product/product_comment_list").then((res) => {
let resData = res.data.list || []
resData.forEach(v=>{
v.img_list = v.img_list.split(',')
// v.img_list = [v.img_list, v.img_list, v.img_list, v.img_list]
})
this.reviews = [...this.reviews, ...resData];
this.total = res.data.total;
if(resData.length<10) {
this.finished = true
}
})
},
goCommentList () {
uni.navigateTo({
url:`/subPackages/user/commentList?id=${this.prodId}`
})
},
viewImg (item) {
let imgs = item.img_list
uni.previewImage({
urls:imgs
})
},
},
onReachBottom() {
setTimeout(() => {
if(!this.finished) this.getComments()
},1000)
}
}
</script>
<style scoped lang="scss">
.bg{
background: #FFFFFF;
min-height: 100vh;
width: 100%;
padding: 20rpx 26rpx;
}
.review-item{
.avator{
width: 72rpx;
height: 72rpx;
background: #999999;
border-radius: 50%;
flex-shrink: 0;
}
.starImg{
width: 23.47rpx;
height: 23.47rpx;
margin-right: 6rpx;
}
.comment-container{
flex: 1;
width: 10rpx;
padding: 0 45rpx 0 15rpx;
height: 72rpx;
font-weight: bold;
font-size: 31rpx;
color: #333333;
}
.comment-content {
width: 100%;
font-weight: 500;
font-size: 29rpx;
color: #000000;
margin-bottom: 28rpx;
}
.img-box{
width: 100%;
.imgs{
width: 219rpx;
height: 219rpx;
background: #CCCCCC;
border-radius: 13rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.imgs:nth-of-type(3) {
margin-right: 0;
}
}
}
.review-item:last-of-type{
border-bottom: none;
}
</style>
Loading…
Cancel
Save