UI兼容调整

This commit is contained in:
kron
2025-06-15 22:01:06 +08:00
parent c2b2d0bf99
commit 9ffcf67948
6 changed files with 47 additions and 10 deletions

View File

@@ -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 {

View File

@@ -198,6 +198,7 @@ import Container from "@/components/Container.vue";
border: 1px solid #e4e4e4;
border-radius: 4px;
font-size: 14px;
color: #000;
}
.table-header {