UI兼容调整
This commit is contained in:
@@ -13,6 +13,7 @@ const { updateConfig, updateUser, updateDevice } = store;
|
||||
// 使用storeToRefs,用于UI里显示,保持响应性
|
||||
const { user, device } = storeToRefs(store);
|
||||
const showModal = ref(false);
|
||||
const isIos = ref(true);
|
||||
|
||||
const toPage = (path) => {
|
||||
if (!user.value.id) {
|
||||
@@ -26,6 +27,8 @@ const toPage = (path) => {
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const deviceInfo = uni.getDeviceInfo();
|
||||
isIos.value = deviceInfo.osName === "ios";
|
||||
const config = await getAppConfig();
|
||||
console.log("全局配置:", config);
|
||||
updateConfig(config);
|
||||
@@ -48,7 +51,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="root-container">
|
||||
<view class="root-container" :style="{ paddingTop: isIos ? '45px' : '40px' }">
|
||||
<AppBackground />
|
||||
<!-- 根据登录状态显示用户信息或登录按钮 -->
|
||||
<block v-if="user.id">
|
||||
@@ -162,10 +165,8 @@ onMounted(async () => {
|
||||
|
||||
<style scoped>
|
||||
.root-container {
|
||||
height: calc(100vh - 40px);
|
||||
color: white;
|
||||
position: relative;
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
.container {
|
||||
|
||||
@@ -198,6 +198,7 @@ import Container from "@/components/Container.vue";
|
||||
border: 1px solid #e4e4e4;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
|
||||
Reference in New Issue
Block a user