From 1d7d7109c406f2e1982cff6908db79bac94c43b2 Mon Sep 17 00:00:00 2001 From: XingQue Date: Wed, 1 Jul 2026 17:30:24 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=8A=A2=E5=8D=95=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E4=B8=8EIM=E5=BF=83=E8=B7=B3=E4=BF=AE=E5=A4=8D=EF=BC=8C?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=A5=96=E5=8A=B1=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=89=8D=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- pages/accept-order/accept-order.wxss | 20 ++++++++++---------- utils/chat-core.js | 25 ++++++++++--------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/pages/accept-order/accept-order.wxss b/pages/accept-order/accept-order.wxss index 73ca486..4ea4d48 100644 --- a/pages/accept-order/accept-order.wxss +++ b/pages/accept-order/accept-order.wxss @@ -33,7 +33,7 @@ page { /* ====== 1. 商品类型区域 ====== */ .leixing-quyu { - padding: 30rpx 0 20rpx; + padding: 24rpx 0 16rpx; background: rgba(18, 22, 38, 0.9); backdrop-filter: blur(20rpx); border-bottom: 1rpx solid rgba(255, 255, 255, 0.05); @@ -46,26 +46,26 @@ page { .leixing-scroll { width: 100%; white-space: nowrap; - height: 180rpx; + height: 158rpx; } .leixing-container { display: inline-flex; padding: 0 30rpx; - gap: 20rpx; + gap: 16rpx; } .leixing-item { display: inline-flex; flex-direction: column; align-items: center; - width: 160rpx; + width: 132rpx; position: relative; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .leixing-active { - transform: translateY(-8rpx); + transform: translateY(-6rpx); } .guangyun-effect { @@ -86,9 +86,9 @@ page { } .leixing-tupian { - width: 120rpx; - height: 120rpx; - border-radius: 32rpx; + width: 100rpx; + height: 100rpx; + border-radius: 28rpx; z-index: 1; box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.6); transition: all 0.3s ease; @@ -101,8 +101,8 @@ page { } .leixing-jieshao { - margin-top: 16rpx; - font-size: 24rpx; + margin-top: 12rpx; + font-size: 22rpx; color: #b0c0e0; max-width: 100%; overflow: hidden; diff --git a/utils/chat-core.js b/utils/chat-core.js index a75548a..8f2b97c 100644 --- a/utils/chat-core.js +++ b/utils/chat-core.js @@ -515,21 +515,16 @@ function startHeartbeat(app) { let convTick = 0; goEasyConnection.heartbeatInterval = setInterval(() => { if (goEasyConnection.status === 'connected' && wx.goEasy?.im) { - wx.goEasy.im.ping({ - onSuccess: () => { - convTick += 1; - if (convTick % 3 === 0) { - loadConversations(app); - } - }, - onFailed: (error) => { - console.error('心跳失败:', error); - if (isSdkConnected()) return; - goEasyConnection.status = 'reconnecting'; - app.emitEvent('connectionChanged', { status: 'reconnecting' }); - attemptReconnect(app); - }, - }); + if (isSdkConnected()) { + convTick += 1; + if (convTick % 3 === 0) { + loadConversations(app); + } + } else { + goEasyConnection.status = 'reconnecting'; + app.emitEvent('connectionChanged', { status: 'reconnecting' }); + attemptReconnect(app); + } } else if (goEasyConnection.autoReconnect && !isSdkConnected()) { ensureConnection(app); }