From 700f9d0da314a4ea701fe9f68d305b67d72ec5fb Mon Sep 17 00:00:00 2001
From: longz <longzhaoz@qq.com>
Date: 星期三, 08 七月 2026 15:08:37 +0800
Subject: [PATCH] 各类修复fix
---
yuyueMiniProgram/src/pages/reviewDetail/index.vue | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/yuyueMiniProgram/src/pages/reviewDetail/index.vue b/yuyueMiniProgram/src/pages/reviewDetail/index.vue
index fc44f30..1896486 100644
--- a/yuyueMiniProgram/src/pages/reviewDetail/index.vue
+++ b/yuyueMiniProgram/src/pages/reviewDetail/index.vue
@@ -58,7 +58,6 @@
},
})
-const router = useRouter()
const sysInfo = uni.getSystemInfoSync()
const statusBarHeight = sysInfo.statusBarHeight || 0
const navBarHeight = 44
@@ -109,7 +108,8 @@
const selectedLocalUnits = ref<MiniLocalUnitItem[]>([])
const unitPopupOffsetY = ref(0)
const unitPickerBaseHeight = uni.upx2px(940)
-const unitPickerMinHeight = uni.upx2px(620)
+const unitPickerMinHeight = uni.upx2px(480)
+const unitKeyboardFallbackOffset = uni.upx2px(520)
const unitPickerPanelStyle = computed(() => ({
height: `${Math.max(unitPickerMinHeight, unitPickerBaseHeight - unitPopupOffsetY.value)}px`,
transform: `translateY(-${unitPopupOffsetY.value}px)`,
@@ -117,7 +117,7 @@
const handleUnitKeyboardHeightChange = (res: any) => {
const height = Number(res?.height || 0)
const maxOffset = Math.max(0, unitPickerBaseHeight - unitPickerMinHeight)
- unitPopupOffsetY.value = height > 0 ? Math.min(height, maxOffset) : 0
+ unitPopupOffsetY.value = height > 0 ? Math.min(height + uni.upx2px(24), maxOffset) : unitPopupOffsetY.value
}
const appointmentIcons = {
@@ -230,8 +230,27 @@
}>({})
const showOtherLocalUnitInVisitInfo = computed(() => (detail.value?.localUnits?.length || 0) > 0)
+function backOrHome() {
+ const pages = getCurrentPages()
+ if (pages.length > 1) {
+ uni.navigateBack({
+ delta: 1,
+ fail: () => {
+ uni.switchTab({ url: '/pages/index/index' })
+ },
+ })
+ return
+ }
+ uni.switchTab({
+ url: '/pages/index/index',
+ fail: () => {
+ uni.reLaunch({ url: '/pages/index/index' })
+ },
+ })
+}
+
function handleBack() {
- router.back()
+ backOrHome()
}
function resolveReviewNode(detailValue: MiniApprovalDetailItem): ReviewNodeType {
@@ -595,6 +614,8 @@
return
}
uni.onKeyboardHeightChange(handleUnitKeyboardHeightChange)
+ const maxOffset = Math.max(0, unitPickerBaseHeight - unitPickerMinHeight)
+ unitPopupOffsetY.value = Math.min(unitKeyboardFallbackOffset, maxOffset)
if (unitInput.value) {
showUnitDropdown.value = filteredUnits.value.length > 0
}
@@ -795,7 +816,7 @@
}
uni.showToast({ title: approve ? '已通过' : '已驳回', icon: 'success' })
setTimeout(() => {
- router.back()
+ backOrHome()
}, 1000)
}
catch (error) {
@@ -1345,7 +1366,7 @@
<text class="text-[#333333] text-[28rpx] font-medium">单位</text>
<text class="text-[#FF4D4F] text-[28rpx] ml-[4rpx]">*</text>
</view>
- <input v-model="unitInput" type="text" placeholder="请输入单位名称" placeholder-class="text-[#CCCCCC] text-[28rpx]" class="flex-1 text-[28rpx] text-[#333333] ml-[32rpx]" :disabled="isHandlerReadOnly()" :adjust-position="true" :cursor-spacing="120" @input="handleUnitInput" @focus="handleUnitFocus" @blur="handleUnitBlur" />
+ <input v-model="unitInput" type="text" placeholder="请输入单位名称" placeholder-class="text-[#CCCCCC] text-[28rpx]" class="flex-1 text-[28rpx] text-[#333333] ml-[32rpx]" :disabled="isHandlerReadOnly()" :adjust-position="false" :cursor-spacing="120" @input="handleUnitInput" @focus="handleUnitFocus" @blur="handleUnitBlur" />
<view class="flex items-center h-full pl-[24rpx] active:opacity-80" :class="isHandlerReadOnly() ? 'opacity-60' : ''" @click="addUnit">
<image src="/static/review/add.png" class="w-[28rpx] h-[28rpx] mr-[8rpx]" mode="aspectFit" />
<text class="text-[#0068FF] text-[28rpx]">添加</text>
--
Gitblit v1.7.1