From 9a8b01bc0f2fa3adbdc1a040b10b07b374335500 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Tue, 5 Aug 2025 16:36:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=92=8C=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=BC=B9=E7=AA=97=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除分类列表的pid过滤,保留排序功能 - 为金额显示添加默认值0防止undefined - 将@tap事件统一改为@click - 修复弹窗关闭后滚动位置恢复问题 - 添加订单号复制功能 --- pages/component/home.vue | 3 ++- pages/component/recycle.vue | 3 ++- pages/manager/inspect-result.vue | 28 +++++++++++++++++++++------- pages/subcomponent/promotion.vue | 4 ++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/pages/component/home.vue b/pages/component/home.vue index 2d34210..77ecce0 100644 --- a/pages/component/home.vue +++ b/pages/component/home.vue @@ -375,7 +375,8 @@ const resList = this.pricePreviewList || [] if (Array.isArray(resList)) { // 只取一级分类,按sort升序 - const firstLevel = resList.filter(item => item.pid == '0').sort((a, b) => a.sort - b.sort) + const firstLevel = resList.sort((a, b) => a.sort - b.sort) + // const firstLevel = resList.filter(item => item.pid == '0').sort((a, b) => a.sort - b.sort) // console.log(firstLevel,'firstLevel'); this.priceList = firstLevel.map(item => { // 从静态表中找图片和价格 diff --git a/pages/component/recycle.vue b/pages/component/recycle.vue index 644efc6..d64aea3 100644 --- a/pages/component/recycle.vue +++ b/pages/component/recycle.vue @@ -539,7 +539,8 @@ export default { }, categories() { const list = getApp().globalData.pricePreviewList || [] - return list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort) + return list.sort((a, b) => a.sort - b.sort) + // return list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort) }, minMoney() { const config = getApp().globalData.configData || []; diff --git a/pages/manager/inspect-result.vue b/pages/manager/inspect-result.vue index 5e53193..8ba81f2 100644 --- a/pages/manager/inspect-result.vue +++ b/pages/manager/inspect-result.vue @@ -26,7 +26,7 @@ {{ getGoodsName(item.shopId) }} - + {{ hasSelectedReason(item) ? '已选择' : '请选择理由(选填)' }} @@ -52,7 +52,7 @@ 质量问题{{ index + 1 }} - + {{ hasSelectedReason(item) ? '已选择' : '请选择理由' }} @@ -79,7 +79,7 @@ 不可回收{{ index +1 }} - + {{ hasSelectedReason(commonItem) ? '已选择' : '请选择理由' }} @@ -97,7 +97,9 @@ 订单编号 - {{ order?.ordeNo || 'RE82738127861525' }} 复制 + {{ order?.ordeNo }} 复制 取件时间 @@ -164,7 +166,8 @@ export default { reasonOptions: [], reasonChecked: [], currentReasonItem: null, - isPopupOpen: false // 控制弹窗状态 + isPopupOpen: false, // 控制弹窗状态 + scrollTop: 0 // 记录滚动位置 } }, computed: { @@ -514,12 +517,25 @@ export default { lockScroll() { + // 获取当前页面滚动位置 + uni.createSelectorQuery().selectViewport().scrollOffset((res) => { + this.scrollTop = res.scrollTop + }).exec() // 禁用页面滚动 this.isPopupOpen = true }, unlockScroll() { // 恢复页面滚动 this.isPopupOpen = false + // 恢复滚动位置 + this.$nextTick(() => { + if (this.scrollTop > 0) { + uni.pageScrollTo({ + scrollTop: this.scrollTop, + duration: 0 + }) + } + }) }, async onRefresh() { await this.refreshData && this.refreshData() @@ -557,8 +573,6 @@ export default { &.popup-open { overflow: hidden; - position: fixed; - width: 100%; height: 100vh; } } diff --git a/pages/subcomponent/promotion.vue b/pages/subcomponent/promotion.vue index cbd7c25..b91966a 100644 --- a/pages/subcomponent/promotion.vue +++ b/pages/subcomponent/promotion.vue @@ -42,13 +42,13 @@ 可提现佣金(元) - {{userInfo.money}} + {{userInfo.money || 0}} 累计提现(元) - {{userInfo.integerPrice}} + {{userInfo.integerPrice || 0}}