Commit 2bf239f3 authored by 蔡亮华(贵阳日报)'s avatar 蔡亮华(贵阳日报)
parents 25916d1f 3ee5cecd
...@@ -208,7 +208,8 @@ ...@@ -208,7 +208,8 @@
{ {
"path": "pages/assistingAgriculture/RuralTravel/RuralTravel", "path": "pages/assistingAgriculture/RuralTravel/RuralTravel",
"style": { "style": {
"navigationBarTitleText": "乡村旅居" "navigationBarTitleText": "乡村旅居",
"enablePullDownRefresh": true,
} }
}, },
......
...@@ -137,23 +137,23 @@ ...@@ -137,23 +137,23 @@
<img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" /> <img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" />
<view class="detail-text"> <view class="detail-text">
<text class="detail-title">{{ item.prodName }}</text> <text class="detail-title">{{ item.prodName }}</text>
<text class="give">{{ item.prodName }}</text> <text class="give">{{ item.brief }}</text>
<view class="tag"> <view class="tag">
<wd-tag <wd-tag
bg-color="#EEEEEE" bg-color="#EEEEEE"
round round
v-for="(tag, tagIndex) in item.tag" v-for="(tag, tagIndex) in item.serveList"
:key="tagIndex" :key="tagIndex"
> >
{{ tag }} {{ tag.labelName }}
</wd-tag> </wd-tag>
</view> </view>
<view class="detail-score"> <view class="detail-score">
<text class="score">{{ item.deliveryAmount }}</text> <text class="score">{{ item.score }}</text>
<text class="num">月销{{ item.deliveryAmount }}</text> <text class="num">月销{{ item.monthSoldNum }}</text>
</view> </view>
<view class="venue"> <view class="venue">
<text class="place">{{ item.prodName }}</text> <text class="place">{{ item.tripArea }}出发</text>
<text class="price">{{ item.price }}</text> <text class="price">{{ item.price }}</text>
</view> </view>
</view> </view>
...@@ -226,6 +226,13 @@ const locationFiltering = (index) => { ...@@ -226,6 +226,13 @@ const locationFiltering = (index) => {
labelId.value = null; labelId.value = null;
} }
}; };
onPullDownRefresh(() => {
getProd();
getPopular();
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1000);
});
// 查询热门路线 // 查询热门路线
const getPopular = () => { const getPopular = () => {
getPopularList({ current: 1, size: 10 }).then((res) => { getPopularList({ current: 1, size: 10 }).then((res) => {
...@@ -287,10 +294,12 @@ const getProd = () => { ...@@ -287,10 +294,12 @@ const getProd = () => {
getProdList(params).then((res) => { getProdList(params).then((res) => {
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.serveList = item.serviceList.slice(0, 3);
}); });
cardList.value = res.data.records; cardList.value = res.data.records;
}); });
}; };
const resetParams = () => { const resetParams = () => {
sortType.value = null; sortType.value = null;
attractionId.value = null; attractionId.value = null;
...@@ -549,6 +558,6 @@ page { ...@@ -549,6 +558,6 @@ page {
height: 56rpx; height: 56rpx;
} }
.detail-score { .detail-score {
margin-top: 90rpx; margin-top: 30rpx;
} }
</style> </style>
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