Prechádzať zdrojové kódy

增加自定义头部及样式调整

htc 1 rok pred
rodič
commit
f13429d050

+ 38 - 5
pages/home/index.vue

@@ -1,7 +1,14 @@
 <template>
-	<view class="page">
-		
+	<view class="page" :style="{'height':(h-th)+'px'}">
+		<u-navbar bgColor="transparent">
+			<view class="u-nav-slot" slot="left" style="display: flex;" @tap="show=true">
+				<text>{{name}}</text>
+				<u-icon name="arrow-down" size="28" :bold="true" color="#fff"></u-icon>
+			</view>
+		</u-navbar>
+		<view class="bg"></view>
 		<Tabbar :tabbarIndex="0"></Tabbar>
+		<u-picker :show="show" :columns="nameList" @close="show=false" @cancel="show=false" @confirm="confirm"></u-picker>
 	</view>
 </template>
 
@@ -9,17 +16,43 @@
 	export default {
 		data() {
 			return {
-				
+				name:'一家民宿',
+				nameList:[['一家民宿','我家民宿','他家民宿']],
+				show:false
 			}
 		},
 		methods: {
-			
+			confirm(e){
+				this.name = e.value[0];
+				this.show = false;
+			}
 		}
 	}
 </script>
 
 <style scoped lang="less">
 	.page{
-		
+		background: #F3F4F4;
+		padding-bottom: 40rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
+		.bg{
+			width: 100%;
+			height: 743rpx;
+			background: url(https://i.ringzle.com/file/20240107/8bc656fc64fd4386a6b336a7dc8c86d0.png) no-repeat;
+			background-size: 100%  100%;
+		}
+	}
+	
+	/deep/.u-nav-slot{
+		&>text{
+			font-size: 34rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+		.u-icon{
+			margin: 8rpx 0 0 20rpx;
+		}
 	}
 </style>

+ 6 - 2
pages/house/index.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="page">
+	<view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="房态" :showIcon="false"></c-nav-bar>
 		
 		<Tabbar :tabbarIndex="1"></Tabbar>
 	</view>
@@ -20,6 +21,9 @@
 
 <style scoped lang="less">
 	.page{
-		
+		background: #F3F4F4;
+		padding-bottom: 40rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
 	}
 </style>

+ 0 - 2
pages/login/forgot.vue

@@ -30,8 +30,6 @@
 	export default {
 		data() {
 			return {
-				h:this.$h,
-				mt:this.$mt,
 				phone:'',
 				time:59,
 				text:'获取验证码',

+ 18 - 4
pages/my/index.vue

@@ -1,6 +1,7 @@
 <template>
-	<view class="page">
-		
+	<view class="page" :style="{'height':(h-th)+'px'}">
+		<c-nav-bar title="我的" bgColor="transparent" :titleStyle="titleStyle" :showIcon="false"></c-nav-bar>
+		<view class="bg"></view>
 		<Tabbar :tabbarIndex="3"></Tabbar>
 	</view>
 </template>
@@ -9,7 +10,11 @@
 	export default {
 		data() {
 			return {
-				
+				titleStyle: {
+					fontSize: '34rpx',
+					fontWeight: "bold",
+					color: '#FFFFFF'
+				}
 			}
 		},
 		methods: {
@@ -20,6 +25,15 @@
 
 <style scoped lang="less">
 	.page{
-		
+		background: #F3F4F4;
+		padding-bottom: 40rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
+		.bg{
+			width: 100%;
+			height: 412rpx;
+			background: url(https://i.ringzle.com/file/20240107/fc66824bcef14a3b9e19f8b966a128c7.png) no-repeat;
+			background-size: 100%  100%;
+		}
 	}
 </style>

+ 6 - 2
pages/statistics/index.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="page">
+	<view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="统计" :showIcon="false"></c-nav-bar>
 		
 		<Tabbar :tabbarIndex="2"></Tabbar>
 	</view>
@@ -20,6 +21,9 @@
 
 <style scoped lang="less">
 	.page{
-		
+		background: #F3F4F4;
+		padding-bottom: 40rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
 	}
 </style>