Browse Source

提交本地修改

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
dfdeb1ca2b
  1. 9
      custom-tab-bar/index.js
  2. 2
      pages/chat-detail/index.js
  3. 11
      pages/goods-detail/goods-detail.js
  4. 23
      pages/index/index.js
  5. 3
      pages/index/index.wxml
  6. 8
      pages/index/index.wxss

9
custom-tab-bar/index.js

@ -213,18 +213,13 @@ Component({
// 如果idcardstatus不是1,提示用户并跳转到入驻页面
if (idcardstatus !== 1) {
wx.showToast({
title: '请先完成身份认证',
icon: 'none',
duration: 3000
})
// 3秒后自动跳转到认证页面
setTimeout(() => {
wx.navigateTo({
url: '/pages/profile/authentication/index'
})
}, 3000)
})
return
}

2
pages/chat-detail/index.js

@ -260,7 +260,7 @@ Page({
isNew: false
}));
this.setData({ messages: updatedMessages });
}, 300);
}, 1000);
});
},

11
pages/goods-detail/goods-detail.js

@ -3085,14 +3085,9 @@ Page({
console.log('用户身份证认证状态:', idcardstatus);
if (idcardstatus !== 1) {
console.log('用户未完成身份证认证,显示提示并跳转至认证页面');
wx.showToast({
title: '请先完成身份认证后使用该功能',
icon: 'none',
duration: 2000
});
// 延迟2秒跳转到认证页面
//跳转到认证页面
setTimeout(() => {
wx.navigateTo({
url: '/pages/profile/authentication/index',
@ -3103,7 +3098,7 @@ Page({
console.error('跳转到认证页面失败:', error);
}
});
}, 2000);
});
return;
}

23
pages/index/index.js

@ -2604,11 +2604,28 @@ Page({
});
},
// 阻止事件冒泡
// 阻止事件冒泡和默认行为,防止iOS下拉拖动
stopPropagation: function (e) {
// 安全检查,防止TypeError
if (e && typeof e.stopPropagation === 'function') {
e.stopPropagation();
if (e) {
if (typeof e.stopPropagation === 'function') {
e.stopPropagation();
}
if (typeof e.preventDefault === 'function') {
e.preventDefault();
}
}
},
// iOS专用的触摸事件处理,防止下拉拖动
handleTouchMove: function (e) {
// 在iOS上,当scrollTop为0时,阻止下拉拖动
const scrollTop = e.detail.scrollTop || 0;
if (scrollTop === 0) {
// 阻止默认行为,防止iOS弹性滚动
if (e && typeof e.preventDefault === 'function') {
e.preventDefault();
}
}
},

3
pages/index/index.wxml

@ -1,6 +1,6 @@
<view class="container">
<!-- 顶部搜索区域容器 - 始终固定显示 -->
<view class="top-section-container">
<view class="top-section-container" catchtouchmove="stopPropagation">
<!-- 搜索区域 -->
<view class="search-section" style="height: 100rpx; display: block; box-sizing: border-box">
@ -186,6 +186,7 @@
id="goodsScrollView"
bindscrolltolower="onReachBottom"
bindscroll="onScroll"
bindtouchmove="handleTouchMove"
scroll-y="true"
scroll-top="{{scrollTop}}"
refresher-enabled="{{true}}"

8
pages/index/index.wxss

@ -199,6 +199,9 @@ page {
box-shadow: none;
background: transparent;
z-index: 1;
/* 防止iOS弹性滚动 */
-webkit-overflow-scrolling: touch;
overflow: hidden;
}
/* 标题样式调整 */
@ -236,12 +239,13 @@ page {
flex: 1;
padding-top: 0;
padding-bottom: 20rpx;
height: auto;
min-height: calc(100vh - 400rpx); /* 调整最小高度 */
height: 100%;
box-sizing: border-box;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
background: transparent;
/* 防止iOS弹性滚动 */
overscroll-behavior: contain;
}
/* 品种筛选区域调整 - 确保在商品图层之上,搜索框之下 */

Loading…
Cancel
Save