样式优化
This commit is contained in:
parent
ee5aee7433
commit
837bed87a6
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="isIOS" :style="{ height: statusBarHeight }"></div>
|
<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">
|
<div class="top-content">
|
||||||
<view class="upper-user">
|
<view class="upper-user">
|
||||||
<view class="user-rig">
|
<view class="user-rig">
|
||||||
|
|
@ -86,9 +86,11 @@ const isIOS = ref(/iphone/.test(userAgent))
|
||||||
let statusBarHeight = ref('50px')
|
let statusBarHeight = ref('50px')
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
statusBarHeight.value = uni.getWindowInfo().statusBarHeight + 'px'
|
statusBarHeight.value = uni.getWindowInfo().statusBarHeight + 'px'
|
||||||
|
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight + 'px'
|
statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight + 'px'
|
||||||
|
console.log('🚀 ~ statusBarHeight.value:', statusBarHeight.value)
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
function jumpUrl(path) {
|
function jumpUrl(path) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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.nickName }} </view>
|
||||||
<view class="user-info"> 用户: {{ userInfo.userName }} </view>
|
<view class="user-info"> 用户: {{ userInfo.userName }} </view>
|
||||||
<view class="user-info"> 手机号:{{ userInfo.phonenumber || '13655555' }} </view>
|
<view class="user-info"> 手机号:{{ userInfo.phonenumber || '13655555' }} </view>
|
||||||
|
|
@ -16,6 +16,19 @@ const memberStore = useMemberStore()
|
||||||
// const userInfo = memberStore.userInfo || reactive({})
|
// const userInfo = memberStore.userInfo || reactive({})
|
||||||
const userInfo = ref(memberStore.userInfo || {})
|
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 的变化
|
// 监听 memberStore.userInfo 的变化
|
||||||
watch(() => memberStore.userInfo, (newUserInfo) => {
|
watch(() => memberStore.userInfo, (newUserInfo) => {
|
||||||
|
|
@ -37,7 +50,7 @@ const onSignature = () => {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.content {
|
.content {
|
||||||
height: calc(100vh - 110px);
|
/* height: calc(100vh - 110px); */
|
||||||
}
|
}
|
||||||
.user-info {
|
.user-info {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue