Browse Source

提交本地修改

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
dfdeb1ca2b
  1. 7
      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

7
custom-tab-bar/index.js

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

2
pages/chat-detail/index.js

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

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

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

23
pages/index/index.js

@ -2604,11 +2604,28 @@ Page({
}); });
}, },
// 阻止事件冒泡 // 阻止事件冒泡和默认行为,防止iOS下拉拖动
stopPropagation: function (e) { stopPropagation: function (e) {
// 安全检查,防止TypeError // 安全检查,防止TypeError
if (e && typeof e.stopPropagation === 'function') { if (e) {
e.stopPropagation(); 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="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"> <view class="search-section" style="height: 100rpx; display: block; box-sizing: border-box">
@ -186,6 +186,7 @@
id="goodsScrollView" id="goodsScrollView"
bindscrolltolower="onReachBottom" bindscrolltolower="onReachBottom"
bindscroll="onScroll" bindscroll="onScroll"
bindtouchmove="handleTouchMove"
scroll-y="true" scroll-y="true"
scroll-top="{{scrollTop}}" scroll-top="{{scrollTop}}"
refresher-enabled="{{true}}" refresher-enabled="{{true}}"

8
pages/index/index.wxss

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

Loading…
Cancel
Save