1

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