样式优化
This commit is contained in:
parent
ee5aee7433
commit
837bed87a6
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
|
|
|
|||
Loading…
Reference in New Issue