样式优化

This commit is contained in:
bb_pan 2025-08-07 08:05:15 +08:00
parent ee5aee7433
commit 837bed87a6
2 changed files with 18 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div v-if="isIOS" :style="{ height: statusBarHeight }"></div>
<view class="page-bg">
<view class="page-bg" :style="{ height: `calc(100vh - ${statusBarHeight} - 50px)` }">
<div class="top-content">
<view class="upper-user">
<view class="user-rig">
@ -86,9 +86,11 @@ const isIOS = ref(/iphone/.test(userAgent))
let statusBarHeight = ref('50px')
// #ifdef MP-WEIXIN
statusBarHeight.value = uni.getWindowInfo().statusBarHeight + 'px'
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
// #endif
// #ifndef MP-WEIXIN
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight + 'px'
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
// #endif
function jumpUrl(path) {

View File

@ -1,5 +1,5 @@
<template>
<view class="content">
<view class="content" :style="{ height: `calc(100vh - ${statusBarHeight} - 50px)` }">
<view class="user-info"> 用户 {{ userInfo.nickName }} </view>
<view class="user-info"> 用户 {{ userInfo.userName }} </view>
<view class="user-info"> 手机号{{ userInfo.phonenumber || '13655555' }} </view>
@ -16,6 +16,19 @@ const memberStore = useMemberStore()
// const userInfo = memberStore.userInfo || reactive({})
const userInfo = ref(memberStore.userInfo || {})
const userAgent = navigator.userAgent.toLowerCase()
const isIOS = ref(/iphone/.test(userAgent))
let statusBarHeight = ref('50px')
// #ifdef MP-WEIXIN
statusBarHeight.value = uni.getWindowInfo().statusBarHeight + 'px'
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
// #endif
// #ifndef MP-WEIXIN
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight + 'px'
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
// #endif
// memberStore.userInfo
watch(() => memberStore.userInfo, (newUserInfo) => {
@ -37,7 +50,7 @@ const onSignature = () => {
<style scoped>
.content {
height: calc(100vh - 110px);
/* height: calc(100vh - 110px); */
}
.user-info {
width: 95%;