Commit c2e690d4 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents bcb62b03 39d21d4a
......@@ -1018,10 +1018,10 @@ uni-page-body {
}
}
.footer {
height: 196rpx;
height: 90rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
background: #ffffff;
padding: 20rpx 20rpx 0 42rpx;
padding: 16rpx;
align-items: flex-start;
.like {
display: flex;
......
......@@ -11,8 +11,11 @@
<img :src="item.avatar" alt="" />
<p>{{ item.nickName }}</p>
</div>
<div class="like">
<wd-icon name="thumb-up"></wd-icon>
<div class="like flex-align-center" @click="like(item)">
<img
:src="`/static/assistingAgriculture/assets/${item.give == 0 ? 'like' : 'likeFilled'}.png`"
alt=""
/>
{{ item.giveCount }}
</div>
</div>
......@@ -20,6 +23,7 @@
</template>
<script setup>
import { likeOrDislike } from '../../../api/photo';
const showMore = ref(false);
const props = defineProps({
photoData: {
......@@ -33,6 +37,24 @@ const toReviewDetails = (id) => {
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
/* 点赞 */
let flag = false;
const like = (item) => {
if (flag) {
return;
} else {
flag = true;
}
likeOrDislike({ evaluationId: item.evaluationId }).then((res) => {
flag = false;
if (res.code === 0) {
// 成功
item.give = item.give === 0 ? 1 : 0;
item.giveCount = item.give === 0 ? item.giveCount - 1 : item.giveCount + 1;
}
});
};
</script>
<style lang="scss" scoped>
......@@ -86,8 +108,9 @@ const toReviewDetails = (id) => {
.like {
font-size: 12px;
color: #767676;
.wd-icon {
font-size: 15px;
img {
width: 16px;
height: 16px;
}
}
}
......
......@@ -7,7 +7,7 @@
</div>
</scroll-view>
<div class="back">
<button>返回预订</button>
<button @click="back">返回预订</button>
</div>
</div>
</template>
......@@ -91,6 +91,9 @@ const getPhotoFn = () => {
photoData.value = [...photoData.value, ...res.data];
});
};
const back = () => {
uni.navigateBack();
};
</script>
<style lang="scss" scoped>
......@@ -103,21 +106,21 @@ uni-page-body {
flex-direction: column;
background-color: #f3f3f3;
.content {
padding: 10px 5px;
padding: 20rpx 10rpx;
box-sizing: border-box;
flex-grow: 1;
height: 69px;
height: 138rpx;
.filter-box {
display: flex;
background-color: #fff;
padding: 10px;
gap: 10px;
padding: 20rpx;
gap: 20rpx;
flex-wrap: wrap;
div {
padding: 8px;
padding: 16rpx;
color: #3d3d3d;
font-size: 8px;
border-radius: 8px;
font-size: 16rpx;
border-radius: 16rpx;
background-color: #eeeeee;
}
.active {
......@@ -126,23 +129,23 @@ uni-page-body {
}
}
.card-wrap {
// margin-top: 5px;
// margin-top: 10rpx;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 5px;
gap: 10rpx;
}
}
}
.back {
background-color: #fff;
padding: 20px 0 34px;
box-shadow: 0px -4px 8px 0px rgba(0, 0, 0, 0.12);
padding: 40rpx 0;
box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(0, 0, 0, 0.12);
button {
width: 345px;
height: 44px;
border-radius: 34px;
width: 690rpx;
height: 88rpx;
border-radius: 68rpx;
background-color: #fa5151;
font-size: 16px;
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
}
......
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