This commit is contained in:
魏啾
2024-08-03 11:18:26 +08:00
parent 3e49f319c2
commit f442a5a85c

View File

@@ -9,10 +9,7 @@
<!-- 顶部面板 --> <!-- 顶部面板 -->
<view class="top--panel"> <view class="top--panel">
<navseat :opacity='opacity' :titleshow='true' :heightshow='opacity'></navseat> <navseat :opacity='opacity' :titleshow='true' :heightshow='opacity'></navseat>
<!-- #ifdef MP-WEIXIN -->
<!-- #endif -->
<!-- 顶部面板可添加所需要放在页面顶部的内容代码比如banner图 --> <!-- 顶部面板可添加所需要放在页面顶部的内容代码比如banner图 -->
<!-- https://czg-qr-order.oss-cn-beijing.aliyuncs.com/orderfood/shuangyu1.png -->
<image class="panelimgbackground" :src="shopInfo.storeInfo.coverImg" mode="aspectFill"> <image class="panelimgbackground" :src="shopInfo.storeInfo.coverImg" mode="aspectFill">
</image> </image>
<view class="panelone"> <view class="panelone">
@@ -356,22 +353,16 @@
} }
}, },
onPageScroll(e) { onPageScroll(e) {
try {
if (e.scrollTop <= 44) { //搜索导航栏显示影藏 if (e.scrollTop <= 44) { //搜索导航栏显示影藏
this.opacity = false this.opacity = false
} else { } else {
this.opacity = true this.opacity = true
} }
} catch (e) {
//TODO handle the exception
}
this.$u.debounce(() => { this.$u.debounce(() => {
console.log(e.scrollTop, this.scrollTopSize)
if (e.scrollTop >= this.scrollTopSize) { //控制大图层 if (e.scrollTop >= this.scrollTopSize) { //控制大图层
// this.isFixed = false; this.isFixed = false;
this.$set(this, 'isFixed', false);
} else { } else {
this.$set(this, 'isFixed', true); this.isFixed = true;
} }
}, 10) }, 10)
@@ -908,15 +899,18 @@
}, },
/* 左侧导航点击 */ /* 左侧导航点击 */
leftTap(e) { leftTap(e) {
console.log(this.scrollTopSize + this.HeighT,11) let HeighTdata = null
try { if (this.opacity) {
if (this.isFixed) { HeighTdata = this.HeighT
uni.pageScrollTo({ } else {
scrollTop: this.scrollTopSize + this.HeighT, //滑动需要的距离 nav+列表距离的高度 HeighTdata = this.HeighT * 2
duration: 100
});
this.isFixed = false
} }
console.log(this.scrollTopSize + HeighTdata, 11)
try {
uni.pageScrollTo({
scrollTop: this.scrollTopSize + HeighTdata, //滑动需要的距离 nav+列表距离的高度
duration: 0
});
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
@@ -1819,7 +1813,9 @@
color: #999999; color: #999999;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.describe,.name{
.describe,
.name {
width: 270rpx; width: 270rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;