72 lines
1.4 KiB
Vue
72 lines
1.4 KiB
Vue
<template>
|
|
<view class="page">
|
|
<custom-navbar
|
|
ref="customNavbar"
|
|
title="基础页面"
|
|
/>
|
|
<tile-grid/>
|
|
<view class="header" :style="{ backgroundColor: CommonEnum.BASE_COLOR }">
|
|
<!-- 状态展示 -->
|
|
<status-display
|
|
v-if="loading"
|
|
type="loading"
|
|
loading-text="加载中..."
|
|
/>
|
|
<!-- 页面内容将在这里添加 -->
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import CommonEnum from "../../enum/common";
|
|
import StatusDisplay from "../../components/status-display/status-display.vue";
|
|
|
|
export default {
|
|
components: {
|
|
StatusDisplay
|
|
},
|
|
data() {
|
|
return {
|
|
CommonEnum,
|
|
loading: false
|
|
}
|
|
},
|
|
onLoad() {
|
|
// 页面加载时获取数据
|
|
this.loadPageData()
|
|
},
|
|
methods: {
|
|
// 加载页面数据
|
|
async loadPageData() {
|
|
this.loading = true
|
|
try {
|
|
// TODO: 调用页面数据API
|
|
// const response = await getPageData()
|
|
// 模拟加载
|
|
setTimeout(() => {
|
|
this.loading = false
|
|
}, 1000)
|
|
} catch (error) {
|
|
console.error('获取页面数据失败:', error)
|
|
this.loading = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
background: #F5F0E7;
|
|
}
|
|
.header {
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
flex-direction: column;
|
|
padding: 0 15rpx;
|
|
padding-bottom: 40rpx;
|
|
}
|
|
</style> |