1

parent efdd8151
......@@ -8,12 +8,12 @@
</div>
<div class="user-info flex-between">
<div class="info flex-align-center">
<img src="/src/static/assistingAgriculture/comment/1.png" alt="" />
<p>不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的</p>
<img :src="item.avatar" alt="" />
<p>{{ item.nickName }}</p>
</div>
<div class="like">
<wd-icon name="thumb-up"></wd-icon>
12
{{ item.giveCount }}
</div>
</div>
</div>
......
......@@ -88,6 +88,8 @@ const getPhotoFn = () => {
return item;
});
}
v.avatar = imgUrl + v.avatar;
v.prodPic = imgUrl + v.prodPic;
});
photoData.value = [...photoData.value, ...res.data];
});
......
<template>
<div class="card" v-for="(item, index) in commentData" :key="index">
<div
class="card"
v-for="(item, index) in commentData"
:key="index"
@click="toReviewDetails(item.evaluationId)"
>
<div class="card-top">
<div class="avatar flex-align-center">
<img :src="item.avatar" alt="" />
......@@ -15,7 +20,14 @@
{{ item.evaluation }}
</div>
<div class="img-wrap">
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
<image
@tap.stop="preview(item)"
mode="aspectFill"
class="wd-img"
v-for="(item, index) in item.images"
:key="index"
:src="item"
/>
</div>
</div>
</div>
......@@ -30,6 +42,17 @@ const props = defineProps({
default: () => [],
},
});
const preview = (url) => {
xma.previewImage({
urls: [url],
});
};
// 查看评论详情
const toReviewDetails = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
</script>
<style lang="scss" scoped>
......@@ -103,6 +126,8 @@ const props = defineProps({
grid-template-columns: repeat(3, 1fr);
.wd-img {
aspect-ratio: 1;
width: 216rpx;
height: 216rpx;
}
}
}
......
<template>
<div class="comment-list">
<div class="top-bar flex-align-center">
<wd-icon name="thin-arrow-left"></wd-icon>
<wd-icon name="thin-arrow-left" @tap="back"></wd-icon>
<wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left />
</div>
<scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true">
......@@ -51,7 +51,7 @@
</div>
</scroll-view>
<div class="back">
<button>返回预订</button>
<button @tap="back">返回预订</button>
</div>
</div>
</template>
......@@ -100,6 +100,11 @@ onLoad((options) => {
getEvalStatisFn();
getCommentListFn();
});
const back = () => {
xma.navigateBack({
delta: 1,
});
};
const search = (e) => {
reset();
commentParameters.evaluation = e.value;
......@@ -242,10 +247,11 @@ uni-page-body {
content: '';
display: block;
position: absolute;
width: calc(80%);
width: 30rpx;
height: 4rpx;
bottom: -12rpx;
left: 50%;
border-radius: 25rpx;
background-color: #fa5151;
transform: translateX(-50%);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment