bug修改

parent 22b95bd7
......@@ -4,7 +4,7 @@
<view class="right">
<text class="text">{{ item.shopName }}</text>
<view class="twoBxo">
<text class="one-text">{{ item.grade }}推荐</text>
<text class="one-text">{{ item.grade }} 推荐</text>
<!-- <text class="two-text">¥30/人</text> -->
<text class="three-text">销量{{ item.monthSoldNum }}</text>
<text class="four-text">
......@@ -61,7 +61,7 @@ const toShop = (id) => {
margin: 0 auto;
margin-bottom: 2rpx;
display: flex;
padding: 22rpx 0;
padding-top: 22rpx;
padding-left: 20rpx;
box-sizing: border-box;
.img {
......@@ -130,7 +130,7 @@ const toShop = (id) => {
.labelBox {
display: flex;
align-items: center;
margin: 20rpx 0;
margin: 10rpx 0;
flex-wrap: wrap;
view {
margin-right: 8rpx;
......@@ -147,7 +147,7 @@ const toShop = (id) => {
.groupPurchasePrice {
display: flex;
align-items: center;
margin-bottom: 20rpx;
margin-bottom: 10rpx;
.img {
width: 32rpx;
height: 32rpx;
......
......@@ -35,9 +35,7 @@
</view>
<view class="pre-text">
<text class="left-text">预售</text>
<text class="right-text">
预计{{ dataDetails.prodPresale.presaleEndTime.split(' ')[0] }}发货
</text>
<text class="right-text">下单{{ dataDetails.prodPresale.sendGoodTime }}天以后发货</text>
</view>
</view>
......@@ -104,8 +102,13 @@
<view class="evaluate">
<view class="evaluate-num" @click="jumpPjPgae">
<text class="env">评价({{ commentData.count }})</text>
<text class="num">好评率({{ commentData.high }} %)</text>
<wd-icon name="arrow-right" size="32rpx" style="margin-top: 2rpx"></wd-icon>
<text class="num" v-if="commentData.count !== 0">好评率({{ commentData.high }} %)</text>
<wd-icon
v-if="commentData.count !== 0"
name="arrow-right"
size="32rpx"
style="margin-top: 2rpx"
></wd-icon>
</view>
</view>
<!-- 详情图-->
......
......@@ -93,7 +93,7 @@
<image class="img" :src="item.shopLogo" mode="scaleToFill" />
<text class="one">{{ item.shopName }}</text>
<view class="price">
<text class="two">{{ item.grade }}推荐</text>
<text class="two">{{ item.grade }} 推荐</text>
<!-- <text class="three">¥36/人</text> -->
</view>
<text class="four" v-show="item.lastBuyTime <= 86400000">
......@@ -127,10 +127,15 @@
:class="{ rotate: rotate }"
></wd-icon>
</view>
<!-- <view class="box">
<text class="text2">排序筛选</text>
<wd-icon name="fill-arrow-down" size="22rpx" class="icon2"></wd-icon>
</view> -->
<view class="box">
<text class="text" @tap="locationFiltering2">排序筛选</text>
<wd-icon
:class="{ rotate: rotate2 }"
name="fill-arrow-down"
size="22rpx"
class="icon"
></wd-icon>
</view>
</view>
<!-- 位置定位 -->
<Position
......@@ -140,6 +145,8 @@
@region="region"
@refresh="refresh"
/>
<!-- 排序筛选 -->
<Sort v-show="rotate2" @sortParams="sortParams" />
</view>
<!-- 美食卡片 -->
<FoodDetails :cardData="cardData" />
......@@ -166,6 +173,7 @@ import fab from '../../components/fab/fab.vue';
import myIcon from '../../components/wd-icon-local/wd-icon.vue';
import { onMounted, reactive, ref } from 'vue';
import { useCountStore } from '@/store';
import Sort from '../../components/index/Sort.vue';
// import Search from '../../components/index/Search.vue';
import FoodDetails from '../../components/index/FoodDetails.vue';
import ShopCard from '../../components/index/ShopCard.vue';
......@@ -195,6 +203,7 @@ const tabsData = ref([]);
const show = ref(false);
const light = ref(0);
const rotate = ref(false);
const rotate2 = ref(false);
const classificationT = ref([
{ img: 'hotPot', text: '火锅' },
{ img: 'barbecue', text: '烧烤烤肉' },
......@@ -255,6 +264,17 @@ onPullDownRefresh(() => {
getMerchantList();
getCouponMainList();
});
// 排序参数来源
const sortParams = (params) => {
reset();
const { sortName, sortMode } = params;
listParams.sortName = sortName;
listParams.sortMode = sortMode;
getMerchantList();
rotate2.value = false;
};
function jumpProductDetails(item) {
xma.navigateTo({
url: '/pages/shop/shop?shopId=' + item.shopId,
......@@ -334,6 +354,7 @@ const nearbyFood = async () => {
res.data.content.forEach((item) => {
item.shopLogo = import.meta.env.VITE_APP_IMG_URL + item.shopLogo;
item.lastBuyTime = new Date().getTime() - new Date(item.lastBuyTime).getTime();
item.grade = item.grade.toFixed(1);
});
foodNearbyData.value = res.data.content;
});
......@@ -407,6 +428,7 @@ const getMerchantList = async () => {
total = res.data.totalElements;
res.data.content.forEach((item) => {
item.shopLogo = import.meta.env.VITE_APP_IMG_URL + item.shopLogo;
item.grade = item.grade.toFixed(1);
if (item.evaluationVos.length > 0) {
item.simpleProds.forEach((item) => {
item.avatar = import.meta.env.VITE_APP_IMG_URL + item.avatar;
......@@ -471,7 +493,7 @@ const refresh = () => {
};
// distance参数来源
const nearby = (distance) => {
console.log('distance', distance);
// console.log('distance', distance);
reset();
if (distance === 0) {
delete listParams.distance;
......@@ -531,6 +553,11 @@ const jingang = (id, pic, categoryName) => {
};
const locationFiltering = () => {
rotate.value = !rotate.value;
rotate2.value = false;
};
const locationFiltering2 = () => {
rotate2.value = !rotate2.value;
rotate.value = false;
};
const handleClick = (e) => {
const index = e.index;
......
......@@ -8,7 +8,7 @@
:showTitle="true"
></search>
<!-- <view class="head"> -->
<view class="top" :style="{ backgroundImage: topBg }"></view>
<image class="top" :src="topBg" mode="widthFix" />
<view class="bootom" :style="{ top }">
<view class="bootom-top">
<view class="option" @tap="locationFiltering(0)">
......@@ -120,7 +120,7 @@ onLoad((options) => {
getByParentIdData();
getTop();
getByType({ place }).then((res) => {
topBg.value = `url(${import.meta.env.VITE_APP_IMG_URL + res.data[0].imgUrl})`;
topBg.value = import.meta.env.VITE_APP_IMG_URL + res.data[0].imgUrl;
});
});
......@@ -294,15 +294,7 @@ page {
// margin-bottom: 10rpx;
// height: 480rpx;
.top {
height: 356rpx;
// background: url('../../static/index/taste.png');
background-size: 100% 100%;
.icon {
font-size: 28rpx;
margin-top: 70rpx;
margin-left: 40rpx;
color: white;
}
width: 100%;
}
.bootom {
// height: 124rpx;
......
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