Browse Source

初始化

zhengkaixin 3 months ago
parent
commit
cf30dbaab7
2 changed files with 177 additions and 5 deletions
  1. 8 2
      pages/index/homePage.vue
  2. 169 3
      pages/index/index.vue

+ 8 - 2
pages/index/homePage.vue

@@ -3,7 +3,7 @@
 		<u-navbar v-show="false"
 		 title="首页" title-color="#101010"></u-navbar>
 		 
-		<view class="navbar" @click="goBack()">
+		<view class="navbar" >
 			智泊e家 运管端
 
 		</view>
@@ -66,9 +66,15 @@
 		data() {
 			return {
 				jpContentMap:{
-					body1:2
+					body1:0
 				}
 			}
+		},
+		onLoad() {
+			
+		},
+		onReady() {
+			
 		},
 		methods: {
 			

+ 169 - 3
pages/index/index.vue

@@ -1,15 +1,80 @@
 <template>
 	<view>
+		<u-navbar v-show="false"
+		 title="首页" title-color="#101010"></u-navbar>
+		 
+		<view class="navbar" >
+			智泊e家 运管端
+
+		</view>
+		<view class="tabs-box">
+			
+		</view>
+		<view class="main">
+			<view class="statistics">
+				<view class="title">
+					<view class="icon">
+						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
+					</view>
+					<view class="text">
+						设备监控度
+					</view>
+					<view class="check-all" @click="toEquipmentElectricity">
+						查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
+					</view>
+				</view>
+				
+				<view class="content"  >
+					<jpContent :status="jpContentMap.body1">
+						123
+					</jpContent>
+				</view>
+			</view>
+			
+			<view class="statistics">
+				<view class="title">
+					<view class="icon">
+						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
+					</view>
+					<view class="text">
+						在用场站
+					</view>
+				
+				</view>
+				
+				<view class="content"  >
+					<jpContent :status="jpContentMap.body1">
+						123
+					</jpContent>
+				</view>
+			</view>
+			
+		</view>
+		<tabbar :current="0"></tabbar>
 		
 	</view>
 </template>
 
 <script>
+	import Tabbar from '@/components/Tabbar.vue'
+	import jpContent from '@/components/JPcontent.vue'
+	
 	export default {
+		components: {
+			Tabbar,jpContent
+		},
 		data() {
 			return {
-				
+				jpContentMap:{
+					body1:0
+				}
 			}
+		},
+		onLoad() {
+			
+		},
+		onReady() {
+			
 		},
 		methods: {
 			
@@ -17,6 +82,107 @@
 	}
 </script>
 
-<style>
-
+<style scoped lang="scss">
+	// 导航栏
+	.navbar {
+		
+		
+		background-color: rgba(22, 119, 255, 1);
+		color: #fff;
+		line-height: 88rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 32rpx;
+		color: rgba(255, 255, 255, 1);
+		font-size: 36rpx;
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		z-index: 999999;
+		    font-weight: bold;
+		
+	}
+	.main {
+		border-radius: 16px 16px 0px 0px;
+		background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
+		margin-top: -24rpx;
+		padding: 32rpx ;
+		.statistics {
+			border-radius: 8px;
+			background-color: rgba(255, 255, 255, 1);
+			box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
+			margin-bottom: 24rpx;
+			padding: 40rpx;
+		
+			.title {
+				display: flex;
+				align-items: center;
+				margin-bottom: 16rpx;
+		
+				.img {
+					width: 36rpx;
+					height: 36rpx;
+					vertical-align: middle;
+					border-radius: 999px;
+		
+				}
+		
+				.change {
+					display: flex;
+					align-items: center;
+		
+					.change-img {
+						width: 32rpx;
+						height: 32rpx;
+						vertical-align: middle;
+					}
+		
+					text {
+		
+						margin-left: 8rpx;
+					}
+				}
+		
+		
+				.text {
+					color: rgba(16, 16, 16, 1);
+					font-size: 36rpx;
+					margin-left: 16rpx;
+					font-weight: bold;
+				}
+		
+				.change {
+					margin-left: 16rpx;
+					font-size: 24rpx;
+					color: #838383;
+		
+				}
+		
+				.check-all {
+					margin-left: auto;
+					color: rgba(131, 131, 131, 1);
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+	.tabs-box {
+		padding: 32rpx 0;
+		margin-top: 66rpx;
+		padding-right: 32rpx;
+		background-color: rgba(22, 119, 255, 1);
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	
+		.tabs {
+			width: 97%;
+		}
+		.more{
+			padding-right: 12rpx;
+		}
+	
+	}
 </style>