解决登录显示、首页显示bug

This commit is contained in:
2026-05-19 11:06:46 +08:00
parent 2f7e097e6c
commit 00a859c551
181 changed files with 55329 additions and 998 deletions

View File

@@ -27,8 +27,8 @@ const props = defineProps({
const statusBarHeight = ref(0)
try {
const systemInfo = uni.getSystemInfoSync()
statusBarHeight.value = systemInfo.statusBarHeight
const windowInfo = uni.getWindowInfo()
statusBarHeight.value = windowInfo.statusBarHeight
} catch (error) {
statusBarHeight.value = 20
}
@@ -60,6 +60,16 @@ function goBack() {
return
}
if (
props.fallbackUrl == '/pages/mall/delivery/home/index' ||
props.fallbackUrl == '/pages/mall/delivery/orders/index' ||
props.fallbackUrl == '/pages/mall/delivery/messages/index' ||
props.fallbackUrl == '/pages/mall/delivery/profile/index'
) {
uni.switchTab({ url: props.fallbackUrl })
return
}
uni.redirectTo({ url: props.fallbackUrl })
}
</script>

View File

@@ -1,9 +1,10 @@
<template>
<view class="service-page-shell">
<view class="service-page-fixed-header">
<view v-if="!hideHeader" class="service-page-fixed-header">
<ServicePageHeader :title="title" :fallback-url="fallbackUrl"></ServicePageHeader>
</view>
<view class="service-page-header-placeholder" :style="{ height: headerHeight + 'px' }"></view>
<view v-if="hideHeader" class="service-page-safe-top" :style="{ height: safeTopHeight + 'px' }"></view>
<view v-else class="service-page-header-placeholder" :style="{ height: headerHeight + 'px' }"></view>
<scroll-view class="service-page-scroll" scroll-y="true">
<view class="service-page-content">
<slot></slot>
@@ -24,18 +25,25 @@ const props = defineProps({
fallbackUrl: {
type: String,
default: ''
},
hideHeader: {
type: Boolean,
default: false
}
})
const headerHeight = ref(116)
const safeTopHeight = ref(32)
try {
const systemInfo = uni.getSystemInfoSync()
const statusBar = systemInfo.statusBarHeight
const unit = systemInfo.screenWidth / 750
const windowInfo = uni.getWindowInfo()
const statusBar = windowInfo.statusBarHeight
const unit = windowInfo.windowWidth / 750
headerHeight.value = statusBar + Math.round(124 * unit)
safeTopHeight.value = statusBar + Math.round(24 * unit)
} catch (error) {
headerHeight.value = 116
safeTopHeight.value = 32
}
</script>
@@ -66,6 +74,11 @@ try {
flex-shrink: 0;
}
.service-page-safe-top {
width: 100%;
flex-shrink: 0;
}
.service-page-scroll {
flex: 1;
min-height: 0;