Commit 3f9e4b46 authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents fe6de220 206cf3ec
...@@ -92,7 +92,13 @@ ...@@ -92,7 +92,13 @@
<!-- 美食类别 --> <!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" /> <Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 --> <!-- 附近筛选 -->
<Position v-show="rotate2" @nearby="nearby" @popular="popular" @region="region" /> <Position
v-show="rotate2"
@nearby="nearby"
@popular="popular"
@region="region"
@refresh="refreshList"
/>
<!-- 排序筛选 --> <!-- 排序筛选 -->
<Sort v-show="rotate3" @sortParams="sortParams" /> <Sort v-show="rotate3" @sortParams="sortParams" />
</view> </view>
...@@ -160,6 +166,17 @@ const nearby = (distance) => { ...@@ -160,6 +166,17 @@ const nearby = (distance) => {
getMerchantList(); getMerchantList();
}); });
}; };
function refreshList() {
delete params.value.distance;
delete params.value.area;
delete params.value.communityName;
params.value.isEnd = false;
params.value.current = 1;
setTimeout(() => {
rotate2.value = false;
}, 400);
getMerchantList();
}
// communityName参数来源 // communityName参数来源
const popular = (communityName) => { const popular = (communityName) => {
params.value.communityName = communityName; params.value.communityName = communityName;
......
...@@ -9,13 +9,8 @@ ...@@ -9,13 +9,8 @@
<view class="item01" prop="merchantServices"> <view class="item01" prop="merchantServices">
<text class="label">评分</text> <text class="label">评分</text>
<!-- 评分 --> <!-- 评分 -->
<wd-rate <wd-rate v-model="formdata.merchantServices" active-color="#ff0000" size="50rpx" space="10px"
v-model="formdata.merchantServices" @change="handlemerchant" />
active-color="#ff0000"
size="50rpx"
space="10px"
@change="handlemerchant"
/>
</view> </view>
<view class="item02"> <view class="item02">
<text>{{ merList[formdata.merchantServices] }}</text> <text>{{ merList[formdata.merchantServices] }}</text>
...@@ -23,34 +18,20 @@ ...@@ -23,34 +18,20 @@
</view> </view>
<!-- 内容描述 --> <!-- 内容描述 -->
<view prop="evaluation"> <view prop="evaluation">
<wd-textarea <wd-textarea v-model="formdata.evaluation" placeholder="亲,分享您的看法,给其他人一个参考哦!" />
v-model="formdata.evaluation"
placeholder="亲,分享您的看法,给其他人一个参考哦!"
/>
</view> </view>
<wd-cell title-width="0px"></wd-cell> <wd-cell title-width="0px"></wd-cell>
<text class="textarea">上传图片/视频</text> <text class="textarea">上传图片/视频</text>
<!-- 图片上传 --> <!-- 图片上传 -->
<view class="wdUpload" prop="images"> <view class="wdUpload" prop="images">
<wd-upload <wd-upload multiple :action="action" @change="handleFile" :file-list="formdata.images"
multiple :before-remove="beforeRemove" :header="headers"></wd-upload>
:action="action"
@change="handleFile"
:file-list="formdata.images"
:before-remove="beforeRemove"
:header="headers"
></wd-upload>
</view> </view>
<!-- 匿名评价 --> <!-- 匿名评价 -->
<wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval"> <wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval">
<wd-switch <wd-switch size="48rpx" active-color="#EC1B1B" v-model="formdata.isAnonymous" active-value="1"
size="48rpx" inactive-value="0" />
active-color="#EC1B1B"
v-model="formdata.isAnonymous"
active-value="1"
inactive-value="0"
/>
</wd-cell> </wd-cell>
</wd-cell-group> </wd-cell-group>
</wd-form> </wd-form>
...@@ -311,8 +292,10 @@ const handleSubmit = async () => { ...@@ -311,8 +292,10 @@ const handleSubmit = async () => {
:deep(.wd-upload__status-content) { :deep(.wd-upload__status-content) {
background-color: #000; background-color: #000;
} }
:deep(.wd-upload) { :deep(.wd-upload) {
gap: 20rpx; gap: 20rpx;
.wd-upload__preview { .wd-upload__preview {
width: calc((100% - 60rpx) / 4); width: calc((100% - 60rpx) / 4);
margin: 0; margin: 0;
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
<view class="start" @click="collectionFn"> <view class="start" @click="collectionFn">
<image v-if="shopInfo.isCollect === 0" src="@/static/shop/start.png"></image> <image v-if="shopInfo.isCollect === 0" src="@/static/shop/start.png"></image>
<wd-icon v-else color="red" name="star-on" size="22px"></wd-icon> <wd-icon v-else color="red" name="star-on" size="22px"></wd-icon>
{{ shopInfo.privateIntFcount }} {{ shopInfo.privateIntFcount || 0 }}
</view> </view>
<!-- <view class="start" @click="shareFn"> <!-- <view class="start" @click="shareFn">
<image src="@/static/shop/share.png"></image> <image src="@/static/shop/share.png"></image>
...@@ -1033,6 +1033,7 @@ page { ...@@ -1033,6 +1033,7 @@ page {
background: #fa5151; background: #fa5151;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 208rpx; padding: 20rpx 208rpx;
max-height: 72rpx;
} }
} }
} }
......
...@@ -351,7 +351,7 @@ const recommendedListOfPeripherals = ref([]); ...@@ -351,7 +351,7 @@ const recommendedListOfPeripherals = ref([]);
onLoad(async (options) => { onLoad(async (options) => {
params.value.shopId = options.shopId; params.value.shopId = options.shopId;
shopId.value = options.shopId; shopId.value = options.shopId;
scrollToTop();
// 使用 Promise.all 并行请求,提升性能 // 使用 Promise.all 并行请求,提升性能
await Promise.all([ await Promise.all([
getStoreInformationFn(options.shopId), getStoreInformationFn(options.shopId),
...@@ -368,7 +368,13 @@ onLoad(async (options) => { ...@@ -368,7 +368,13 @@ onLoad(async (options) => {
// 获取位置并计算距离 // 获取位置并计算距离
calculateDistance(); calculateDistance();
}); });
function scrollToTop() {
// 使用 scrollTo 方法滚动到顶部
xma.pageScrollTo({
scrollTop: 0,
duration: 300, // 动画时间,可选
});
}
onShow(async () => { onShow(async () => {
await getStoreInformationFn(params.value.shopId); await getStoreInformationFn(params.value.shopId);
...@@ -376,24 +382,28 @@ onShow(async () => { ...@@ -376,24 +382,28 @@ onShow(async () => {
calculateDistance(); calculateDistance();
}); });
async function refreshShowDetail(item) { async function refreshShowDetail(item) {
params.value.shopId = item.shopId; // params.value.shopId = item.shopId;
shopId.value = item.shopId; // shopId.value = item.shopId;
// 使用 Promise.all 并行请求,提升性能 // // 使用 Promise.all 并行请求,提升性能
await Promise.all([ // await Promise.all([
getStoreInformationFn(item.shopId), // getStoreInformationFn(item.shopId),
groupBuyListFn(item.shopId), // groupBuyListFn(item.shopId),
couponShopListFn(item.shopId), // couponShopListFn(item.shopId),
]); // ]);
// 获取周边推荐信息 // // 获取周边推荐信息
peripheryRecomFn(); // peripheryRecomFn();
// 获取评价信息 // // 获取评价信息
getEvaluationPageFn(); // getEvaluationPageFn();
// 获取位置并计算距离 // // 获取位置并计算距离
calculateDistance(); // calculateDistance();
/// /////////////////////
xma.navigateTo({
url: `/pages/shop/shop?shopId=${item.shopId}`,
});
} }
// 计算距离的函数封装 // 计算距离的函数封装
async function calculateDistance() { async function calculateDistance() {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<text class="title">{{ shopDetail.shopName }}</text> <text class="title">{{ shopDetail.shopName }}</text>
<view class="ratebox"> <view class="ratebox">
<wd-rate <wd-rate
custom-class="icon-statr"
v-model="shopDetail.grade" v-model="shopDetail.grade"
size="13px" size="13px"
space="1px" space="1px"
...@@ -382,7 +383,11 @@ page { ...@@ -382,7 +383,11 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8rpx; gap: 8rpx;
.icon-statr {
:deep(.wd-icon-star-on) {
display: block !important;
}
}
text { text {
font-family: PingFang SC Regular; font-family: PingFang SC Regular;
font-size: 24rpx; font-size: 24rpx;
......
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