1

parent 1ba84420
import { request } from '../../utils/request';
// 查询评论详情
export function evaluationGetById(data) {
return request({
url: `/sgyrdd/evaluation/getById`,
method: 'GET',
data,
});
}
export function prodGetProd(data) {
return request({
url: `/sgyrdd/prod/getProd`,
method: 'GET',
data,
});
}
import { request } from '../../utils/request';
// 查询景点详情接口
export function znprodTourList(data) {
return request({
url: `/sgyrdd/znprod/tour/list`,
method: 'GET',
data,
});
}
...@@ -225,7 +225,9 @@ ...@@ -225,7 +225,9 @@
"style": { "style": {
"navigationBarTitleText": "景点详情", "navigationBarTitleText": "景点详情",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationStyle":"" "navigationStyle":"",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
} }
}, },
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="review-details-pages"> <view class="review-details-pages">
<view class="swiper-list"> <view class="swiper-list">
<wd-swiper <wd-swiper
:list="swiperList" :list="reviewDetail.orderEvaluation?.images"
direction="horizontal" direction="horizontal"
indicatorPosition="right" indicatorPosition="right"
autoplay autoplay
...@@ -22,46 +22,46 @@ ...@@ -22,46 +22,46 @@
<view class="revuew-content"> <view class="revuew-content">
<view class="user-info"> <view class="user-info">
<view class="info-content"> <view class="info-content">
<image <image :src="imgUrl + reviewDetail.user?.avatar" mode="aspectFill"></image>
src="@/static/assistingAgriculture/reviewDetails/avatar.png"
mode="aspectFill"
></image>
<view class="text-box"> <view class="text-box">
<text class="user-name">不爱吃鱼的小猫咪</text> <text class="user-name">{{ reviewDetail.user.nickName }}</text>
<text class="fb-time">2024-08-03</text> <text class="fb-time">{{ reviewDetail.user.createTime }}</text>
</view> </view>
</view> </view>
<view> <view>
<text class="score">4.9</text> <text class="score">{{ reviewDetail.orderEvaluation?.descriptionMatches }}</text>
<text class="score-unit">/5分</text> <text class="score-unit">/5分</text>
</view> </view>
</view> </view>
<text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d"> <text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d; text-align: left">
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。 {{ reviewDetail.orderEvaluation.evaluation }}
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。
</text> </text>
</view> </view>
<view class="scenic-spot"> <view class="scenic-spot" @click="jumpProd">
<image src="@/static/assistingAgriculture/reviewDetails/fj.png" mode="aspectFill"></image> <image :src="imgUrl + prodInfo.pic" mode="aspectFill"></image>
<view class="scenic-area-details"> <view class="scenic-area-details">
<text class="scenic-name">红枫湖+青岩古镇+云漫湖</text> <text class="scenic-name">{{ prodInfo.prodName }}</text>
<text class="scenic-type">自然风景</text> <text class="scenic-type">{{ prodInfo.brief }}</text>
<view class="tag-list"> <view class="tag-list">
<text class="tag">无购物</text> <!-- <text class="tag">{{ prodInfo.brief }}</text> -->
<text class="tag">无购物</text>
</view> </view>
</view> </view>
<wd-icon class="icon" color="#ABAAAA" name="arrow-right" size="22px"></wd-icon> <wd-icon class="icon" color="#ABAAAA" name="arrow-right" size="22px"></wd-icon>
</view> </view>
<view class="dz-btn"> <view class="dz-btn" @click="dzClick">
<wd-icon color="#767676" name="thumb-up" size="22px"></wd-icon> <wd-icon v-if="reviewDetail.isLike == 0" name="thumb-up" size="44rpx"></wd-icon>
<text>12</text> <wd-icon v-else name="thumb-up" color="red" size="44rpx"></wd-icon>
<text>{{ reviewDetail.likeNum }}</text>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { evaluationGetById, prodGetProd } from '@/api/assistingAgriculture/reviewDetails';
import { likeOrDislike } from '@/api/shop';
const current = ref(0); const current = ref(0);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const evaluationIds = ref('');
onMounted(() => { onMounted(() => {
xma.getSystemInfo({ xma.getSystemInfo({
success: function (res) { success: function (res) {
...@@ -69,15 +69,59 @@ onMounted(() => { ...@@ -69,15 +69,59 @@ onMounted(() => {
}, },
}); });
}); });
const swiperList = ref([ onLoad((options) => {
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', const { evaluationId } = options;
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg', evaluationIds.value = evaluationId;
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg', evaluationGetByIdFn(evaluationId);
]); });
function handleClick(e) {} function handleClick(e) {}
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
const prodInfo = ref({});
function prodGetProdFn(prodId) {
prodGetProd({ prodId }).then((res) => {
prodInfo.value = res.data.data.prod;
});
}
const reviewDetail = ref({});
const jumpProd = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=${prodInfo.value.prodId}&shopId=${prodInfo.value.shopId}`,
});
};
const dzClick = () => {
likeOrDislike({ evaluationId: evaluationIds.value }).then((res) => {
if (res.code === 0) {
if (reviewDetail.value.isLike === 0) {
reviewDetail.value.likeNum++;
reviewDetail.value.isLike = 1;
} else {
reviewDetail.value.likeNum--;
reviewDetail.value.isLike = 0;
}
}
});
};
function evaluationGetByIdFn(evaluationId) {
evaluationGetById({ evaluationId }).then((res) => {
if (res.code === 0) {
if (res.data.orderEvaluation.images) {
res.data.orderEvaluation.images = res.data.orderEvaluation.images
.split(',')
.map((item) => {
item = import.meta.env.VITE_APP_IMG_URL + item;
return item;
})
.filter((item) => {
return item && item !== '';
});
}
reviewDetail.value = res.data;
prodGetProdFn(res.data.orderEvaluation.prodId);
}
});
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -109,7 +153,6 @@ page { ...@@ -109,7 +153,6 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
align-items: center;
padding: 40rpx 20rpx; padding: 40rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
.user-info { .user-info {
......
...@@ -16,7 +16,18 @@ ...@@ -16,7 +16,18 @@
</template> </template>
<script setup> <script setup>
onMounted(() => {}); import { znprodTourList } from '@/api/assistingAgriculture/scenicSpotDetails';
const prodIds = ref('');
onLoad((options) => {
const { prodId } = options;
prodIds.value = prodId;
znprodTourListFn(prodId);
});
const znprodTourListFn = (prodId) => {
znprodTourList({ prodId }).then((res) => {
console.log('res', res);
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -918,6 +918,7 @@ page { ...@@ -918,6 +918,7 @@ page {
} }
img { img {
max-width: 100%; max-width: 100%;
object-fit: cover;
height: auto; height: auto;
margin-top: 20rpx; margin-top: 20rpx;
} }
......
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