将微信静默登录逻辑从App.vue迁移至Pinia的user store,实现状态集中管理 全局注册api模块并优化请求重试机制,增强错误处理和日志记录 移除App.vue中的冗余代码,简化页面组件的数据获取方式
33 lines
752 B
Vue
33 lines
752 B
Vue
<script>
|
|
export default {
|
|
onLaunch: function() {
|
|
console.log('App Launch')
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/* 每个页面公共css */
|
|
page {
|
|
background-color: #F3F4F6;
|
|
font-family: 'Inter', 'Noto Sans SC', sans-serif;
|
|
--brand-color: #064e3b;
|
|
--brand-light: #10B981;
|
|
}
|
|
|
|
/* 通用工具类 */
|
|
.bg-white { background-color: #ffffff; }
|
|
.rounded-2xl { border-radius: 32rpx; }
|
|
.shadow-sm { box-shadow: 0 2rpx 6rpx rgba(0,0,0,0.05); }
|
|
.flex-row { display: flex; flex-direction: row; }
|
|
.flex-col { display: flex; flex-direction: column; }
|
|
.items-center { align-items: center; }
|
|
.justify-between { justify-content: space-between; }
|
|
</style>
|