diff --git a/pages/goods-detail/goods-detail.wxss b/pages/goods-detail/goods-detail.wxss
index 4cda2b2..9217c41 100644
--- a/pages/goods-detail/goods-detail.wxss
+++ b/pages/goods-detail/goods-detail.wxss
@@ -1052,7 +1052,7 @@ video.slider-media .wx-video-volume-icon {
.comments-header {
display: flex;
justify-content: space-between;
- align-items: flex-start;
+ align-items: center;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 1px solid #f0f0f0;
@@ -1170,6 +1170,9 @@ video.slider-media .wx-video-volume-icon {
font-size: 14px;
line-height: 1.6;
color: #595959;
+ word-break: break-all;
+ word-wrap: break-word;
+ white-space: normal;
}
.comment-footer {
@@ -1354,12 +1357,13 @@ video.slider-media .wx-video-volume-icon {
background-color: #1890ff;
color: #ffffff;
border: none;
- border-radius: 12rpx;
- padding: 24rpx 64rpx;
- font-size: 32rpx;
+ border-radius: 8rpx;
+ padding: 16rpx 48rpx;
+ font-size: 28rpx;
font-weight: 600;
- box-shadow: 0 4rpx 12rpx rgba(24, 144, 255, 0.3);
+ box-shadow: 0 2rpx 8rpx rgba(24, 144, 255, 0.3);
transition: all 0.3s ease;
+ white-space: nowrap;
}
.comment-button:active {
diff --git a/pages/index/index.js b/pages/index/index.js
index 8ba1a1f..c3ed2fb 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -2503,11 +2503,30 @@ Page({
// 回到顶部
scrollToTop: function () {
+ // 使用数据绑定的方式回到顶部,这是小程序中最可靠的方式
this.setData({
scrollTop: 0,
searchSectionVisible: true,
showBackToTop: false
});
+
+ // 作为备选方案,确保滚动到顶部
+ const scrollView = this.selectComponent('#goodsScrollView');
+ if (scrollView) {
+ // 添加微小延迟确保数据绑定生效后再调用scrollTo
+ setTimeout(() => {
+ scrollView.scrollTo({
+ scrollTop: 0,
+ duration: 300
+ });
+ }, 50);
+ }
+ },
+
+ // 图片加载完成事件
+ onImageLoad(e) {
+ console.log('图片加载完成:', e);
+ // 可以在这里添加图片加载完成后的处理逻辑,比如统计加载时间、显示动画等
},
// 上拉加载更多
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index ab51958..8e032bc 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -160,6 +160,7 @@
bindscrolltolower="onReachBottom"
bindscroll="onScroll"
scroll-y="true"
+ scroll-top="{{scrollTop}}"
refresher-enabled="{{true}}"
refresher-triggered="{{isRefreshing}}"
refresher-default-style="black"
@@ -172,7 +173,7 @@
🏠
- 入驻
+ 我要卖蛋
📣
@@ -182,6 +183,10 @@
🚻
我们
+
+ 🚻
+ 添加桌面
+
@@ -291,5 +296,12 @@
+
+
+ top
+
\ No newline at end of file
diff --git a/utils/api.js b/utils/api.js
index aad4987..80b722c 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -39,9 +39,9 @@ function isRealDevice() {
// 尝试通过系统信息判断环境 - 增强版
try {
- const systemInfo = wx.getSystemInfoSync();
+ const deviceInfo = wx.getDeviceInfo();
// 明确识别开发者工具环境
- if (systemInfo && (systemInfo.platform === 'devtools' || systemInfo.environment === 'devtools')) {
+ if (deviceInfo && (deviceInfo.platform === 'devtools' || deviceInfo.environment === 'devtools')) {
return false;
}
// 其他平台都认为是真机