77 lines
1.3 KiB
Vue
77 lines
1.3 KiB
Vue
<script>
|
|
export default {
|
|
onLaunch: function() {
|
|
// 检查是否已登录
|
|
const token = uni.getStorageSync('token')
|
|
if (!token) {
|
|
// 未登录,跳转到登录页
|
|
uni.reLaunch({
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
},
|
|
onShow: function() {
|
|
|
|
},
|
|
onHide: function() {
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/* 全局样式 */
|
|
page, body {
|
|
background-color: #F8F9FA;
|
|
color: #333333;
|
|
font-size: 28rpx;
|
|
line-height: 1.6;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* 通用容器 */
|
|
view {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 移除所有按钮的默认边框和阴影 */
|
|
button {
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
outline: none !important;
|
|
}
|
|
|
|
button::after {
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
button:active {
|
|
background: none !important;
|
|
}
|
|
|
|
/* 主按钮样式 */
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #FF7A00 0%, #FF9500 100%) !important;
|
|
color: #FFFFFF !important;
|
|
border: none !important;
|
|
box-shadow: 0 4rpx 12rpx rgba(255, 122, 0, 0.3);
|
|
}
|
|
|
|
/* 次要按钮样式 */
|
|
.btn-secondary {
|
|
background: #F5F5F5 !important;
|
|
color: #666666 !important;
|
|
border: 2rpx solid #E0E0E0 !important;
|
|
}
|
|
|
|
/* 线框按钮样式 */
|
|
.btn-outline {
|
|
background: transparent !important;
|
|
color: #FF7A00 !important;
|
|
border: 2rpx solid #FF7A00 !important;
|
|
}
|
|
</style>
|