From 3f7acbae32700d7c3c2f883968ea33d436df5219 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 27 六月 2025 11:28:27 +0800
Subject: [PATCH] update 修改商品广场和神厨左侧导航栏位置
---
pages/kitchen/KitchenVideo.vue | 9 ++++++---
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue | 2 +-
pages/commodity-square/commoditySquare.vue | 4 ++--
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/pages/commodity-square/commoditySquare.vue b/pages/commodity-square/commoditySquare.vue
index 92a9545..62a478a 100644
--- a/pages/commodity-square/commoditySquare.vue
+++ b/pages/commodity-square/commoditySquare.vue
@@ -2,7 +2,7 @@
<view class="container">
<top-bar selectedTitleIndex="shop" textColor="black" @changeTab="topBarChange" class="topBar"></top-bar>
<input type="text" v-show="false" v-model="flushDom" />
- <view class="search" :style="{marginTop: buttonHeight+10+'px',}">
+ <view class="search" :style="{marginTop: buttonHeight+'px',}">
<u-search class="nav-search" @blur='searchGoods' placeholder="鎼滅储鍟嗗搧" :show-action="false"></u-search>
</view>
<scroll-view class="scrollContainer" :scroll-y="true" @scrolltolower="loadMoreData" >
@@ -254,7 +254,7 @@
async onLoad() {
// 鑾峰彇鐘舵�佹爮楂樺害
const systemInfo = uni.getSystemInfoSync();
- this.buttonHeight = systemInfo.statusBarHeight +80;
+ this.buttonHeight = systemInfo.statusBarHeight +40;
console.log('-------------------------------->',this.buttonHeight)
await this.loadCategoryList();
this.getGoodsParam.pageNumber = 1
diff --git a/pages/kitchen/KitchenVideo.vue b/pages/kitchen/KitchenVideo.vue
index 327a597..fe07b72 100644
--- a/pages/kitchen/KitchenVideo.vue
+++ b/pages/kitchen/KitchenVideo.vue
@@ -2,7 +2,7 @@
<view class="video-container">
<!-- 瑙嗛鍔犺浇 -->
<zero-loading v-show="videoLoading" type="circle" color="#0ebd57" text=""></zero-loading>
- <view class="showLeft" @click="showDrawer('showLeft')" v-if="!showLeft">
+ <view class="showLeft" @click="showDrawer('showLeft')" v-if="!showLeft" :style="{top: buttonHeight+'px'}">
<uni-icons type="right" size="30"></uni-icons>
</view>
<!-- 瑙嗛鍒楄〃 -->
@@ -238,7 +238,7 @@
</view>
</uni-popup>
<uni-drawer ref="showLeft" mode="left" width="120" :cus-style="true" height="80vh"
- @change="change($event,'showLeft')" class="navigationLeft">
+ @change="change($event,'showLeft')" class="navigationLeft" :drawerTop="buttonHeight">
<scroll-view class="typeNavigation" :scroll-y="true" :show-scrollbar="false">
<view class="typeNavigationItem" :class="{typeNavigationItemCheck:currentCategort ==item.id}"
@click="chooseCategory(item.id)" v-for="item in categoryList" :key="item.id">
@@ -274,6 +274,7 @@
},
data() {
return {
+ buttonHeight:0,
showLeft:false,
currentCategort: '',
categoryList: [],
@@ -364,6 +365,9 @@
this.startHidenTime = Date.now()
},
onLoad() {
+ // 鑾峰彇鐘舵�佹爮楂樺害
+ const systemInfo = uni.getSystemInfoSync();
+ this.buttonHeight = systemInfo.statusBarHeight;
this.getKitchenTypeList();
this.loadVideos();
},
@@ -939,7 +943,6 @@
.showLeft {
display: flex;
- top: 50rpx;
left: 0;
align-items: center;
justify-content: flex-start;
diff --git a/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue b/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
index 3c00f18..2acb24f 100644
--- a/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
+++ b/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
@@ -1,7 +1,7 @@
<template>
<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
- <view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer,'custom-style':cusStyle}" :style="{width:drawerWidth+'px',maxHeight:drawerHeight,top:drawerTop+'rpx'}">
+ <view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer,'custom-style':cusStyle}" :style="{width:drawerWidth+'px',maxHeight:drawerHeight,top:drawerTop+'px'}">
<slot />
</view>
<!-- #ifdef H5 -->
--
Gitblit v1.8.0