SEC_Warehouse/pages/index/index.vue

150 lines
2.6 KiB
Vue

<template>
<view class="page page-base">
<view class="top-nav top-nav-base">
<view class="title">智慧养老</view>
</view>
<view class="banner">
<view class="banner-left">
<text class="banner-title">智慧养老云助手</text>
<text class="banner-sub">一键开启智慧好生活</text>
</view>
<view class="banner-illus">
<view class="phone"></view>
</view>
</view>
<view class="site-row" @click="goConfig">
<text class="menu"></text>
<text class="site-text">请选择场所</text>
<text class="down"></text>
</view>
<view class="empty-area empty-state">
<view class="empty-box empty-state-box"></view>
<text class="empty-text empty-state-text">暂无数据</text>
</view>
<view class="fab" @click="goAdd">+</view>
</view>
</template>
<script>
import { ROUTES } from '@/constants/routes'
import { navigateTo } from '@/utils/navigation'
export default {
methods: {
goAdd() {
navigateTo(ROUTES.DEVICE_ADD)
},
goConfig() {
navigateTo(ROUTES.DEVICE_CONFIG)
}
}
}
</script>
<style>
@import '@/styles/common.css';
.page {
position: relative;
padding-bottom: 160rpx;
}
.title {
font-size: 48rpx;
font-weight: 700;
color: #222;
}
.banner {
margin: 0;
height: 380rpx;
background: #28cda0;
padding: 56rpx 52rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.banner-left {
display: flex;
flex-direction: column;
}
.banner-title {
font-size: 58rpx;
color: #ffffff;
font-weight: 700;
margin-bottom: 24rpx;
}
.banner-sub {
font-size: 46rpx;
color: #e9fff8;
font-weight: 600;
}
.banner-illus {
width: 220rpx;
height: 220rpx;
border-radius: 16rpx;
background: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.phone {
width: 120rpx;
height: 170rpx;
border: 8rpx solid rgba(255, 255, 255, 0.92);
border-radius: 22rpx;
}
.site-row {
height: 108rpx;
padding: 0 36rpx;
background: #ffffff;
display: flex;
align-items: center;
font-size: 46rpx;
color: #222;
}
.menu {
margin-right: 22rpx;
}
.site-text {
font-weight: 600;
}
.down {
margin-left: 10rpx;
color: #26c996;
}
.empty-area {
margin-top: 40rpx;
min-height: 760rpx;
}
.fab {
position: fixed;
right: 38rpx;
bottom: 220rpx;
width: 118rpx;
height: 118rpx;
border-radius: 59rpx;
background: #2cc998;
color: #ffffff;
font-size: 88rpx;
line-height: 110rpx;
text-align: center;
box-shadow: 0 12rpx 24rpx rgba(29, 177, 130, 0.3);
}
</style>