1

parent 94183dbc
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
<Search :backgroundBox="backgroundBox" background="rgba(255, 255, 255, 0.8)" :show="false"> <Search :backgroundBox="backgroundBox" background="rgba(255, 255, 255, 0.8)" :show="false">
<image class="food" src="../../static/index/food.png" mode="widthFix" /> <image class="food" src="../../static/index/food.png" mode="widthFix" />
<view class="searchBox"> <view class="searchBox">
<image <image class="magnifyingGlass" src="../../static/index/magnifyingGlass.png" mode="widthFix" />
class="magnifyingGlass"
src="../../static/index/magnifyingGlass.png"
mode="aspectFit|aspectFill|widthFix"
/>
<input type="text" class="text" @confirm="toSearch" confirm-type="搜索" /> <input type="text" class="text" @confirm="toSearch" confirm-type="搜索" />
</view> </view>
</Search> </Search>
...@@ -68,8 +64,8 @@ ...@@ -68,8 +64,8 @@
@click="handleClick" @click="handleClick"
@change="onChange" @change="onChange"
customClass="guiyang" customClass="guiyang"
height="120" height="136rpx"
imageMode="aspectFill" imageMode="aspectFit"
></wd-swiper> ></wd-swiper>
<!-- 附近人气美食 --> <!-- 附近人气美食 -->
<view class="nearby"> <view class="nearby">
...@@ -104,7 +100,7 @@ ...@@ -104,7 +100,7 @@
</view> </view>
</view> </view>
<!-- 推荐 --> <!-- 推荐 -->
<view class="recommend"> <view class="recommend" :style="{ top }">
<!-- <view class="tabs"> --> <!-- <view class="tabs"> -->
<scroll-view class="tabs" scroll-x="true"> <scroll-view class="tabs" scroll-x="true">
<text <text
...@@ -222,10 +218,12 @@ let listParams = { ...@@ -222,10 +218,12 @@ let listParams = {
lat: 26.567192352601154, lat: 26.567192352601154,
}; };
const coupon = ref([]); const coupon = ref([]);
const top = ref(null);
let total; let total;
// 轮播图数据 // 轮播图数据
let lunboData; let lunboData;
onLoad(() => { onLoad(() => {
getTop();
orderStatus(); orderStatus();
getClassification(); getClassification();
rotatingBroadcast(); rotatingBroadcast();
...@@ -234,6 +232,16 @@ onLoad(() => { ...@@ -234,6 +232,16 @@ onLoad(() => {
getMerchantList(); getMerchantList();
getCouponMainList(); getCouponMainList();
}); });
// 获取位置板块贴合高度
const getTop = () => {
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
top.value = (res.top + res.bottom) / 2 + 25 + 'px';
},
});
};
onPullDownRefresh(() => { onPullDownRefresh(() => {
reset(); reset();
getClassification(); getClassification();
...@@ -562,8 +570,8 @@ page { ...@@ -562,8 +570,8 @@ page {
margin-left: 20rpx; margin-left: 20rpx;
text-align: start; text-align: start;
.magnifyingGlass { .magnifyingGlass {
width: 26rpx; width: 30rpx;
height: 26rpx; flex-shrink: 0;
} }
.text { .text {
margin-left: 10rpx; margin-left: 10rpx;
...@@ -817,8 +825,8 @@ page { ...@@ -817,8 +825,8 @@ page {
box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08); box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.08);
margin: 0 auto; margin: 0 auto;
margin-top: 10rpx; margin-top: 10rpx;
position: relative; position: sticky;
// top: 0; // top: 100px;
z-index: 99; z-index: 99;
uni-scroll-view .uni-scroll-view::-webkit-scrollbar { uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */ /* 隐藏滚动条,但依旧具备可以滚动的功能 */
......
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