<template>
|
<view class="container" :style="{paddingTop:topHeight + 'rpx'}">
|
<view class="content">
|
111
|
</view>
|
</view>
|
</template>
|
|
<script setup>
|
import { onMounted, ref } from "vue";
|
import { BASE_URL } from '../../config/index.js';
|
|
const topHeight = ref(0)
|
|
// 获取状态栏高度
|
function getTopHeight(){
|
if(uni.getMenuButtonBoundingClientRect){
|
topHeight.value = uni.getMenuButtonBoundingClientRect().bottom * 2
|
}
|
}
|
|
onMounted(() => {
|
getTopHeight()
|
// if(!uni.getStorageSync('openId') || !uni.getStorageSync('token')){
|
// uni.redirectTo({
|
// url:'/pages/login/index'
|
// })
|
// }
|
})
|
</script>
|
|
<style lang="scss" scoped>
|
</style>
|