Преглед изворни кода

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pages.json
韦祥的电脑\Administrator пре 9 месеци
родитељ
комит
cb7c7f8b64
12 измењених фајлова са 1447 додато и 248 уклоњено
  1. 2 0
      App.vue
  2. 1 0
      components/uNavBar/index.vue
  3. 1 1
      http/index.js
  4. 1 1
      manifest.json
  5. 35 0
      pages.json
  6. 209 0
      pages/home/condition.vue
  7. 151 0
      pages/home/details.vue
  8. 252 8
      pages/home/index.vue
  9. 115 0
      pages/house/createOrder.vue
  10. 512 5
      pages/house/index.vue
  11. 68 233
      pages/login/index.vue
  12. 100 0
      pages/login/select.vue

+ 2 - 0
App.vue

@@ -6,6 +6,8 @@
 		onShow: function() {
 			console.log('App Show')
 			this.autoUpdate();
+			if(uni.getStorageSync('userInfo')) uni.reLaunch({ url:'/pages/home/index' })
+			else uni.reLaunch({ url:'/pages/login/index' })
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 1 - 0
components/uNavBar/index.vue

@@ -77,6 +77,7 @@
 						url
 					});
 				}
+				this.$emit('goBack',url)
 			},
 			toHome() {
 				uni.reLaunch({

+ 1 - 1
http/index.js

@@ -1,7 +1,7 @@
 import http from './interface'
 
 export const $http = (url, method, data, json, isAuth, isBuffer) => {
-	let authorization = uni.getStorageSync('authorization') || 'Basic cmluZ3psZTpyaW5nemxl';//Basic cmVucmVuaW86cmVucmVuaW8=
+	let authorization = uni.getStorageSync('authorization') || 'Basic cmVucmVuaW86cmVucmVuaW8=';
 	let access_token = uni.getStorageSync('access_token') || '';
 	//设置请求前拦截器
 	http.interceptor.request = (config) => {

+ 1 - 1
manifest.json

@@ -60,7 +60,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "",
+        "appid" : "wx4e19bb0abda24052",
         "__usePrivacyCheck__" : true,
         "setting" : {
             "urlCheck" : false,

+ 35 - 0
pages.json

@@ -20,6 +20,34 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/home/condition",
+			"style": {
+				"navigationBarTitleText": "房情表",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/home/details",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/login/index",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/login/select",
+			"style": {
+				"navigationBarTitleText": "选择门店",
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/house/index",
 			"style": {
@@ -27,6 +55,13 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/house/createOrder",
+			"style": {
+				"navigationBarTitleText": "新增订单",
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/statistics/index",
 			"style": {

+ 209 - 0
pages/home/condition.vue

@@ -0,0 +1,209 @@
+<template>
+	<view class="page" :style="{'height':h+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="房情表"></c-nav-bar>
+		<view class="table">
+			<view class="t_th">
+				<view class="tt_year b_rb" @tap="show=true">
+					<text>{{year}}年</text>
+					<u-icon name="arrow-down" size="24" color="#999999"></u-icon>
+				</view>
+				<view class="tt_title b_rb">数量</view>
+				<view class="tt_title b_rb">可售</view>
+				<view class="tt_title b_rb">占用</view>
+				<view class="tt_title b_rb">不可售</view>
+			</view>
+			<view class="t_item" v-for="(item,index) in list" :key="index">
+				<view class="ti_date b_rb" @tap="toDetails(item)">
+					<view :class="item.color">
+						<text>{{item.yr}}</text>
+						<text>{{item.week}}</text>
+					</view>
+					<u-icon name="arrow-right" size="24" color="#999999"></u-icon>
+				</view>
+				<view class="ti_num b_rb">{{item.num}}</view>
+				<view class="ti_num b_rb">{{item.ksNum}}</view>
+				<view class="ti_num b_rb">{{item.zyNum}}</view>
+				<view class="ti_num b_rb">{{item.bksNum}}</view>
+			</view>
+		</view>
+		<u-calendar :show="show" :monthNum="24" mode="single" @confirm="confirm"></u-calendar>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				year:new Date().getFullYear(),
+				weekCfg:{0:'周日',1:'周一',2:'周二',3:'周三',4:'周四',5:'周五',6:'周六'},
+				show:false,
+				startDate:new Date().Format('yyyy-MM-dd'),
+				list:[],
+				resData:[]
+			}
+		},
+		onLoad() {
+			this.getList();
+		},
+		methods: {
+			getList(){
+				this.resData = [];
+				for(let i=0;i<7;i++){
+					this.resData.push({
+						date:new Date(new Date().setDate(new Date(this.startDate).getDate()+i)).Format('yyyy-MM-dd'),
+						num:10,
+						ksNum:10,
+						zyNum:10,
+						bksNum:10
+					})
+				}
+				this.list = this.resData;
+				let n = new Date().Format('yyyy-MM-dd');
+				this.list.forEach(l=>{
+					let w = new Date(l.date).getDay();
+					l.yr = new Date(l.date).Format('MM-dd');
+					l.week = n==l.date?'今天':this.weekCfg[w];
+					l.color = n==l.date?'c_today':([6,0].includes(w)?'c_week':'c_normal');
+				})
+			},
+			confirm(e){
+				this.show = false;
+				this.year = new Date(e[0]).Format('yyyy');
+				this.startDate = e[0];
+				this.getList();
+			},
+			toDetails(item){
+				uni.navigateTo({
+					url:'/pages/home/details?item='+encodeURIComponent(JSON.stringify(item))
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		background: #F9FAFC;
+		.table{
+			width: 100%;
+			border-top: 1rpx solid #D1D1D1;
+			border-left: 1rpx solid #D1D1D1;
+			margin-top: 20rpx;
+			.t_th{
+				display: flex;
+				align-items: center;
+				justify-content: space-around;
+				&>view{
+					width: 25%;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					padding: 20rpx 0;
+					box-sizing: border-box;
+					&.tt_year{
+						text{
+							font-size: 24rpx;
+							font-family: PingFang SC, PingFang SC;
+							font-weight: 400;
+							color: #1F2425;
+							margin-right: 10rpx;
+						}
+					}
+					&.tt_title{
+						background: #FAFAFA;
+						font-size: 24rpx;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						color: #1F2425;
+					}
+				}
+			}
+		
+			.t_item{
+				display: flex;
+				align-items: center;
+				justify-content: space-around;
+				&>view{
+					width: 25%;
+					height: 106rpx;
+				}
+				.ti_date{
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					background: #FAFAFA;
+					box-sizing: border-box;
+					&>view{
+						display: flex;
+						flex-direction: column;
+						align-items: center;
+						margin-right: 20rpx;
+						text{
+							font-size: 24rpx;
+							font-family: PingFang SC, PingFang SC;
+							font-weight: 400;
+							color: #245BED;
+						}
+					}
+				}
+				.ti_num{
+					box-sizing: border-box;
+					background: #ffffff;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					font-size: 24rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #1F2425;
+				}
+			}
+		}
+		
+		.b_rb{
+			border-right: 1rpx solid #D1D1D1;
+			border-bottom: 1rpx solid #D1D1D1;
+		}
+		
+		.c_today{
+			text{
+				color: #245BED !important;
+			}
+		}
+		.c_week{
+			text{
+				color: #FF0000 !important;
+			}
+		}
+		.c_normal{
+			text{
+				color: #1F2425 !important;
+			}
+		}
+	}
+	
+	::v-deep .u-transition{
+		.u-calendar-month__days__day{
+			height: 104rpx !important;
+		}
+		.u-calendar__confirm .u-button{
+			width: calc(100% - 24rpx) !important;
+			height: 88rpx !important;
+			background: #0DBFFD !important;
+			border-radius: 44rpx !important;
+		}
+		.u-calendar__confirm .u-button text{
+			font-size: 32rpx !important;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF !important;
+		}
+		.u-calendar scroll-view{
+			height: 600rpx !important;
+		}
+		.u-icon__icon{
+			font-size: 14px !important;
+			line-height: 14px !important;
+		}
+	}
+</style>

+ 151 - 0
pages/home/details.vue

@@ -0,0 +1,151 @@
+<template>
+	<view class="page" :style="{'height':h+'px','padding-top':mt+'px'}">
+		<c-nav-bar :title="title"></c-nav-bar>
+		<view class="table">
+			<view class="t_th">
+				<view class="b_grey b_rb">房型</view>
+				<view class="b_grey b_rb">数量</view>
+				<view class="b_grey b_rb">可售</view>
+				<view class="b_grey b_rb">占用</view>
+				<view class="b_grey b_rb">不可售</view>
+			</view>
+			<view v-if="list.length>0" class="t_item" v-for="(item,index) in list" :key="index">
+				<view class="b_grey b_rb">{{item.title}}</view>
+				<view class="b_rb" :class="(index==list.length-1||index==list.length-2)?'b_grey':''">{{item.num}}</view>
+				<view class="b_rb" :class="(index==list.length-1||index==list.length-2)?'b_grey':''">{{item.ksNum}}</view>
+				<view class="b_rb" :class="(index==list.length-1||index==list.length-2)?'b_grey':''">{{item.zyNum}}</view>
+				<view class="b_rb" :class="(index==list.length-1||index==list.length-2)?'b_grey':''">{{item.bksNum}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				title:'',
+				item:null,
+				list:[]
+			}
+		},
+		onLoad(option) {
+			if(option.item){
+				this.item = JSON.parse(decodeURIComponent(option.item));
+				this.title = this.item.yr+'房情表';
+				this.getList();
+			} 
+		},
+		methods: {
+			getList(){
+				let resData = [
+					{
+						title:'大床房',
+						num:10,
+						ksNum:10,
+						zyNum:10,
+						bksNum:0,
+					},
+					{
+						title:'海景房',
+						num:10,
+						ksNum:10,
+						zyNum:10,
+						bksNum:0,
+					},
+					{
+						title:'标准间',
+						num:10,
+						ksNum:10,
+						zyNum:10,
+						bksNum:0,
+					},
+					{
+						title:'家庭房',
+						num:10,
+						ksNum:10,
+						zyNum:10,
+						bksNum:0,
+					}
+				];
+				let allNums = resData.reduce((cur,pre)=>cur+pre.num,0);
+				let ksNums = resData.reduce((cur,pre)=>cur+pre.ksNum,0);
+				let zyNums = resData.reduce((cur,pre)=>cur+pre.zyNum,0);
+				let bksNums = resData.reduce((cur,pre)=>cur+pre.bksNum,0);
+				resData.push({
+					title:'占房屋总数的比例',
+					num:'-',
+					ksNum:(ksNums/allNums*100).toFixed(2)+'%',
+					zyNum:(zyNums/allNums*100).toFixed(2)+'%',
+					bksNum:(bksNums/allNums*100).toFixed(2)+'%'
+				})
+				resData.push({
+					title:'总计',
+					num:allNums,
+					ksNum:ksNums,
+					zyNum:zyNums,
+					bksNum:bksNums
+				})
+				this.list = resData;
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		background: #F9FAFC;
+		.table{
+			width: 100%;
+			border-top: 1rpx solid #D1D1D1;
+			border-left: 1rpx solid #D1D1D1;
+			margin-top: 20rpx;
+			.t_th{
+				display: flex;
+				align-items: center;
+				justify-content: space-around;
+				&>view{
+					width: 25%;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					padding: 20rpx 0;
+					box-sizing: border-box;
+					font-size: 24rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #1F2425;
+				}
+			}
+		
+			.t_item{
+				display: flex;
+				align-items: center;
+				justify-content: space-around;
+				&>view{
+					width: 25%;
+					height: 106rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					box-sizing: border-box;
+					background: #ffffff;
+					font-size: 24rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #1F2425;
+					text-align: center;
+				}
+			}
+		}
+		
+		.b_grey{
+			background: #FAFAFA !important;
+		}
+		
+		.b_rb{
+			border-right: 1rpx solid #D1D1D1;
+			border-bottom: 1rpx solid #D1D1D1;
+		}
+	}
+</style>

+ 252 - 8
pages/home/index.vue

@@ -8,15 +8,15 @@
 		</u-navbar>
 		<view class="bg" :style="{'padding-top':(mt+30)+'px'}">
 			<view class="b_money">
-				<text>{{orderMoney.toFixed(2)}}</text>
+				<text>{{resData.orderMoney.toFixed(2)}}</text>
 				<text>今日订单金额</text>
 			</view>
 			<view class="b_items">
-				<view>
+				<view @tap="toTurn">
 					<text>{{resData.yrzNum}}</text>
 					<text>已入住</text>
 				</view>
-				<view>
+				<view @tap="toTurn">
 					<text>{{resData.drzNum}}</text>
 					<text>待入住</text>
 				</view>
@@ -32,11 +32,11 @@
 					<text>{{resData.zrddNum}}</text>
 					<text>昨日订单</text>
 				</view>
-				<view>
+				<view @tap="toTurn">
 					<text>{{resData.zrscNum}}</text>
 					<text>昨日售出</text>
 				</view>
-				<view>
+				<view @tap="toTurn">
 					<text>{{resData.zrkfNum}}</text>
 					<text>昨日空房</text>
 				</view>
@@ -46,6 +46,32 @@
 				</view>
 			</view>
 		</view>
+		<view class="title">
+			<text>今日新增</text>
+			<view>
+				<text>全部</text>
+				<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
+			</view>
+		</view>
+		<view class="card" v-for="(item,index) in list" :key="index">
+			<view class="c_top">
+				<text>订单号:{{item.no}}</text>
+				<text :class="statusStyle[item.status]||'s_default'">{{statusCfg[item.status]}}</text>
+			</view>
+			<view class="c_middle">
+				<image :src="item.img"></image>
+				<view class="cm_info">
+					<view class="cmi_title">{{item.name}}</view>
+					<view class="cmi_pre">{{item.person}}</view>
+					<view class="cmi_pre">{{item.phone}}</view>
+					<view class="cmi_pre">{{item.date}}<span>{{item.nights}}</span></view>
+				</view>
+				<view class="cm_price">¥{{item.price.toFixed(2)}}</view>
+			</view>
+			<view class="c_bottom">
+				<view class="btn" :class="item.status==0||item.status==4?'btn_xq':''">{{btnTextCfg[item.status]}}</view>
+			</view>
+		</view>
 		<Tabbar :tabbarIndex="0"></Tabbar>
 		<u-picker :show="show" :columns="nameList" @close="show=false" @cancel="show=false" @confirm="confirm"></u-picker>
 	</view>
@@ -58,8 +84,9 @@
 				name:'一家民宿',
 				nameList:[['一家民宿','我家民宿','他家民宿']],
 				show:false,
-				orderMoney:66614,
+				list:[],
 				resData:{
+					orderMoney:66614,
 					yrzNum:68,
 					drzNum:0,
 					dqrNum:12,
@@ -67,14 +94,88 @@
 					zrddNum:48,
 					zrscNum:48,
 					zrkfNum:20,
-					rzl:'69.65%'
-				}
+					rzl:'69.65%',
+					list:[//status:0 待支付、1 待确认、2 已预订、3 已入住、4 已取消
+						{
+							no:'A20231213102359619119',
+							status:2,
+							img:'../../static/room1.png',
+							name:'海景房-305',
+							person:'李琳',
+							phone:'13911924328',
+							date:'03/11 - 03/12',
+							price:1288,
+							nights:'(共两晚)'
+						},
+						{
+							no:'A20231213102359619119',
+							status:3,
+							img:'../../static/room2.png',
+							name:'海景房-306',
+							person:'郑一璇',
+							phone:'15753988251',
+							date:'03/11 - 03/12',
+							price:1288,
+							nights:'(共两晚)'
+						},
+						{
+							no:'A20231213102359619119',
+							status:4,
+							img:'../../static/room3.png',
+							name:'海景房-307',
+							person:'钱萌',
+							phone:'13710484614',
+							date:'03/11 - 03/12',
+							price:1288,
+							nights:'(共两晚)'
+						},
+						{
+							no:'A20231213102359619119',
+							status:1,
+							img:'../../static/room4.png',
+							name:'海景房-308',
+							person:'赵健民',
+							phone:'15877425550',
+							date:'03/11 - 03/12',
+							price:1288,
+							nights:'(共两晚)'
+						},
+						{
+							no:'A20231213102359619119',
+							status:0,
+							img:'../../static/room5.png',
+							name:'海景房-309',
+							person:'李琳',
+							phone:'13911924328',
+							date:'03/11 - 03/12',
+							price:1288,
+							nights:'(共两晚)'
+						}
+					]
+				},
+				statusCfg:{0:'待支付',1:'待确认',2:'已预订',3:'已入住',4:'已取消'},
+				statusStyle:{0:'s_dzf',1:'s_dqr',2:'s_yyd',3:'s_yrz',4:'s_yqx'},
+				btnTextCfg:{0:'详情',1:'确认订单',2:'办理入住',3:'办理退房',4:'详情'}
 			}
 		},
+		onLoad() {
+			this.getList();
+		},
+		onReachBottom() {
+			console.log('触底啦~');
+		},
 		methods: {
 			confirm(e){
 				this.name = e.value[0];
 				this.show = false;
+			},
+			getList(){
+				this.list = this.resData.list;
+			},
+			toTurn(){
+				uni.navigateTo({
+					url:'/pages/home/condition'
+				})
 			}
 		}
 	}
@@ -134,6 +235,149 @@
 				}
 			}
 		}
+		
+		.title{
+			width: 100%;
+			padding: 30rpx 30rpx 10rpx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			&>text{
+				font-size: 32rpx;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 800;
+				color: #333333;
+			}
+			&>view{
+				display: flex;
+				align-items: center;
+				text{
+					font-size: 24rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #999999;
+					margin-right: 10rpx;
+				}
+			}
+		}
+	
+		.card{
+			width: calc(100% - 60rpx);
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 20rpx 20rpx;
+			margin: 20rpx 30rpx 0;
+			.c_top{
+				width: 100%;
+				padding: 30rpx;
+				border-bottom: 1rpx solid #F1F1F1;
+				box-sizing: border-box;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				text{
+					font-size: 28rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					&:last-child{
+						font-size: 24rpx;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+					}
+				}
+			}
+			.c_middle{
+				width: 100%;
+				padding: 30rpx;
+				border-bottom: 1rpx solid #F1F1F1;
+				box-sizing: border-box;
+				display: flex;
+				position: relative;
+				image{
+					width: 180rpx;
+					height: 180rpx;
+					border-radius: 20rpx;
+				}
+				.cm_info{
+					padding-left: 20rpx;
+					.cmi_title{
+						font-size: 28rpx;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: bold;
+						color: #333333;
+						padding-bottom: 11rpx;
+					}
+					.cmi_pre{
+						margin-top: 10rpx;
+						display: flex;
+						align-items: center;
+						font-size: 24rpx;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 400;
+						color: #777777;
+						span{
+							margin-left: 20rpx;
+						}
+					}
+				}
+				.cm_price{
+					font-size: 32rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: bold;
+					color: #F9423A;
+					position: absolute;
+					top: 50%;
+					margin-top: -22.5rpx;
+					right: 30rpx;
+				}
+			}
+			
+			.c_bottom{
+				width: 100%;
+				padding: 30rpx;
+				box-sizing: border-box;
+				display: flex;
+				justify-content: flex-end;
+				.btn{
+					width: 160rpx;
+					height: 56rpx;
+					background: #1372FF;
+					border-radius: 64rpx 64rpx 64rpx 64rpx;
+					line-height: 56rpx;
+					text-align: center;
+					font-size: 24rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+					&.btn_xq{
+						background: #FFFFFF;
+						border: 1rpx solid #D1D1D1;
+						font-size: 24rpx;
+						color: #999999;
+					}
+				}
+			}
+		}
+	
+		.s_dzf{
+			color: #F9423A !important;
+		}
+		.s_dqr{
+			color: #FF9100 !important;
+		}
+		.s_yyd{
+			color: #39CE77 !important;
+		}
+		.s_yrz{
+			color: #1372FF !important;
+		}
+		.s_yqx{
+			color: #4C5F76 !important;
+		}
+		.s_default{
+			color: #111111 !important;
+		}
 	}
 	
 	/deep/.u-nav-slot{

+ 115 - 0
pages/house/createOrder.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="新增订单" :showIcon="false"></c-nav-bar>
+		<view class="box">
+			<view class="tit">预订信息</view>
+
+			<u-cell-group :border="false"
+				customStyle="background-color: #fff;border-radius: 16rpx;width: 94%;margin:0 auto;">
+				<u-cell>
+					<text slot="icon" style="font-size: 30rpx">姓名</text>
+					<view slot="title" class="title">
+						<u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
+							placeholder="请输入姓名" v-model="dataForm.guestName"></u--input>
+					</view>
+				</u-cell>
+				<u-cell>
+					<text slot="icon" style="font-size: 30rpx">手机号码</text>
+					<view slot="title" class="title">
+						<u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
+							placeholder="请输入手机号码" v-model="dataForm.guestPhone"></u--input>
+					</view>
+				</u-cell>
+				<u-cell isLink="true" @click="showLaiyuan=true">
+					<text slot="icon" style="font-size: 30rpx">订单来源</text>
+					<view slot="title" class="title">
+						{{dataForm.guestSourceName}}
+					</view>
+				</u-cell>
+			</u-cell-group>
+		</view>
+		<u-picker :itemHeight="88" :immediateChange="true" :show="showLaiyuan" :columns="laiyuan" title="来源选择"
+			keyName="guestSource" :defaultIndex="passengerDefault" @cancel="areaShow=false;"
+			@confirm="passengerConfirm"></u-picker>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				showLaiyuan: false,
+				passengerDefault: [0],
+				dataForm: {
+					arriveDate: "",
+					detailFormList: [{
+						breakfastAmount: 0,
+						checkInPersonList: [],
+						checkInType: 0,
+						id: 0,
+						otherAmount: 0,
+						roomAmount: 0,
+						roomIds: "",
+						roomNumber: "",
+					}, ],
+					guestName: "",
+					guestPhone: "",
+					guestSourceId: null,
+					guestSourceName: null,
+					homestayId: '1711268640588517378',
+					houseBaseId: 0,
+					leaveDate: "",
+					num: 0,
+					orderStatus: null,
+					remarks: "",
+				},
+				roomId: '',
+				laiyuan: []
+			}
+		},
+		onLoad(opt) {
+			this.roomId = opt.roomId.split(',');
+			this.getInfo();
+			this.getLaiyuan();
+		},
+		methods: {
+			getLaiyuan() {
+				this.$api.get("/merchant/hotel/room/state/getSourceDownBox", {
+						homestayId: '1711268640588517378',
+					})
+					.then((res) => {
+						if (res.data.code == 0) {
+							this.laiyuan = [res.data.data];
+						}
+					});
+			},
+			getInfo() {
+				this.$api.post('/merchant/hotel/order/getRoomInfoList', this.roomId).then(res => {
+					console.log(res)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.page {
+		background: #F3F4F4;
+		padding-bottom: 260rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
+		overflow-x: auto;
+	}
+	.box{
+		background-color: #fff;
+		margin: 0 auto 20rpx;
+		border-radius: 10rpx;
+		width: 96%;
+		padding: 0 30rpx;
+	}
+	.tit {
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #333;
+	}
+</style>

+ 512 - 5
pages/house/index.vue

@@ -1,29 +1,536 @@
 <template>
 	<view class="page" :style="{'height':(h-th)+'px','padding-top':mt+'px'}">
-		<c-nav-bar title="房态" :showIcon="false"></c-nav-bar>
-		
+		<c-nav-bar title="房态" :showIcon="false" :titleStyle="titleStyle"></c-nav-bar>
+		<view class="content">
+			<view class="date">
+				<view class="item">
+					<u-icon name="calendar-fill" color="#B9C2D2" size="40" style="margin-bottom:10rpx;"></u-icon>
+					<text style="font-size: 24rpx;">2024</text>
+				</view>
+				<view class="item" v-for="(item,keynme,index) in xdata" :key="index">
+					<text>{{item.rentDate.substring(5)}}</text>
+					<text>{{weeks[item.rentWeek]}}</text>
+					<text>剩{{item.spareRooms}}</text>
+				</view>
+			</view>
+			<view class="floorData" v-if="leftData.length!=0">
+				<view v-for="(item,key,i) in leftData" :key="i" style="margin-bottom: 16rpx;">
+					<view class="head" v-if="indexArr[i]==key.split('-')[0]">
+						<text>{{key.split('-')[0]}}F</text>
+						<view class="rightIcon" @click="open(i,key.split('-')[0],false)" v-if="opens[i]">
+							<text>收起</text>
+							<u-icon name="arrow-up-fill" size="18" style="margin-left: 10rpx;"></u-icon>
+						</view>
+						<view class="rightIcon" @click="open(i,key.split('-')[0],true)" v-else>
+							<text>展开</text>
+							<u-icon name="arrow-down-fill" size="18" style="margin-left: 10rpx;"></u-icon>
+						</view>
+					</view>
+					<template v-if="opens[i]">
+						<view class="roomType">{{key.split('-')[1]}}</view>
+						<view class="table">
+							<view class="tr" v-for="(item2,index2) in item" :key="index2">
+								<view class="td">{{item2.roomNumber}}</view>
+								<view class="td" v-for="(roomData,ind) in xdata" :key="ind"
+									:class="'s'+delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status')">
+									<!-- 空置房-->
+									<template
+										v-if="delDataStatus(item2.roomNumber,item2.houseBaseId,roomData.roomDataList,'status') == 1">
+										<view
+											@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind)"
+											class="cellBox">
+											{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'price')}}
+										</view>
+									</template>
+									<template v-else>
+										<view @click="tabCli(item2.roomNumber,item2.houseBaseId,roomData.roomDataList)"
+											class="tdP">
+											<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'guestName')}}</text>
+											<text>{{item2.roomNumber|delDataStatus(item2.houseBaseId,roomData.roomDataList,'status')}}</text>
+										</view>
+									</template>
+									<!-- 点击时状态 -->
+									<view class="cover" v-if="checkPosition.indexOf(i + '-'+index2+ '-'+ ind) > -1"
+										@click="check(item2.roomNumber,item2.houseBaseId,roomData,i + '-'+index2+ '-'+ ind)">
+										<u-icon name="checkbox-mark" size="36" color="#fff"></u-icon>
+									</view>
+								</view>
+							</view>
+						</view>
+					</template>
+				</view>
+			</view>
+		</view>
+		<view class="opration" v-if="checkDataRoomId.length!=0">
+			<text @click="areaShow=true">关房</text>
+			<text @click="createOrder()">新增</text>
+		</view>
 		<Tabbar :tabbarIndex="1"></Tabbar>
+		<!-- 关房 -->
+		<u-picker :itemHeight="88" :immediateChange="true" :show="areaShow" :columns="areaTxt" title="房态选择"
+			:defaultIndex="passengerDefault" @cancel="areaShow=false;clearData();" @confirm="passengerConfirm"></u-picker>
 	</view>
 </template>
 
 <script>
+	var that;
 	export default {
 		data() {
 			return {
-				
+				areaShow: false,
+				passengerDefault: [0],
+				areaTxt: [
+					['清洁中', '暂停使用', '保留房', '空置房']
+				],
+				area: [{
+					label: '清洁中',
+					id: 4
+				}, {
+					label: '暂停使用',
+					id: 5
+				}, {
+					label: '保留房',
+					id: 6
+				}, {
+					label: '空置房',
+					id: 0
+				}],
+				titleStyle: {
+					fontSize: '34rpx',
+					fontWeight: "bold",
+				},
+				dateArr: [1, 2, 3, 4, 5],
+				xdata: [], //纵向列
+				leftData: [], //横向列,
+				indexArr: [], //楼层索引,
+				opens: [],
+				statusTxt: {
+					'-1': '待确定',
+					'1': '已预订',
+					'2': '已入住',
+					'3': '已退房',
+					'4': '清洁中',
+					'5': '暂停使用',
+					'6': '保留房',
+				},
+				weeks: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
+				checkPosition: [],
+				checkDataDate: [],
+				checkPrice: [],
+				checkDataRoomId: [],
+				checkStatus:''
 			}
 		},
+		onLoad() {
+			that = this;
+			this.getLeftData();
+			this.getData();
+		},
+		filters: {
+			delDataStatus(roomNumber, id, roomId, name) {
+				for (let i = 0; i < roomId.length; i++) {
+					if (id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
+						if (name == "status") {
+							return that.statusTxt[roomId[i][name]]
+						} else {
+							return roomId[i][name] || ''
+						}
+
+					}
+				}
+			},
+		},
 		methods: {
-			
+			init() {
+				this.getLeftData();
+				this.getData();
+				this.$forceUpdate();
+			},
+			//关房
+			tabCli(roomNumber, id, roomId) {
+				this.clearData();
+				if (roomNumber) {
+					let obj = {};
+					for (let i = 0; i < roomId.length; i++) {
+						if (id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
+							obj = roomId[i];
+						}
+					}
+					if(obj.status==2||obj.status==3){
+						//到详情
+					}else{
+						//更改状态
+						this.areaShow = true;
+						this.checkDataRoomId = [obj.id];
+						this.checkStatus = obj.status;
+					}
+				}
+			},
+			//确定关房
+			passengerConfirm(e) {
+				let status = this.area[e.indexs[0]].id;
+				this.$api.post('/merchant/hotel/room/state/updRoomState', {
+					roomIds: this.checkDataRoomId,
+					status: status
+				}).then(res => {
+					if (res.data.code == 0) {
+						console.log(res.data)
+						this.clearData();
+						this.areaShow = false;
+						this.init()
+					}
+
+				})
+			},
+			//新增订单
+			createOrder(){
+				uni.navigateTo({
+					url:'/pages/house/createOrder?roomId='+this.checkDataRoomId
+				})
+			},
+			//展开收起
+			open(i, F, val) {
+				this.opens[i] = !this.opens[i];
+				let list = this.leftData;
+				for (var i = 0; i < Object.keys(list).length; i++) {
+					var index = i; // 索引
+					var key = Object.keys(list)[i].split('-')[0]; // key
+					if (F == key) {
+						this.opens[index] = val;
+					}
+				}
+				this.$forceUpdate();
+			},
+			delDataStatus(roomNumber, id, roomId, name) {
+				for (let i = 0; i < roomId.length; i++) {
+					if (id == roomId[i].houseBaseId && roomNumber == roomId[i].roomNumber) {
+						return roomId[i][name] + 1;
+					}
+				}
+			},
+			clearData() {
+				setTimeout(() => {
+					this.checkDataDate = [];
+					this.checkPrice = [];
+					this.checkDataRoomId = [];
+					this.checkPosition = [];
+				}, 1500);
+			},
+			//选择房间
+			check(roomNumber, id, item, position) {
+				for (let i = 0; i < item.roomDataList.length; i++) {
+					if (
+						id == item.roomDataList[i].houseBaseId &&
+						roomNumber == item.roomDataList[i].roomNumber
+					) {
+						//宫格位置标识
+						if (item.roomDataList[i].status == 0) {
+							if (this.checkPosition.indexOf(position) < 0) {
+								this.checkPosition.push(position);
+							} else {
+								let index = this.checkPosition.findIndex(
+									(pos) => pos == position
+								); //选中的索引位置
+								this.checkPosition.splice(index, 1);
+							}
+							//房间id
+							if (this.checkDataRoomId.indexOf(item.roomDataList[i].id) < 0) {
+								this.checkDataRoomId.push(item.roomDataList[i].id);
+							} else {
+								let index = this.checkDataRoomId.findIndex(
+									(roomId) => roomId == item.roomDataList[i].id
+								);
+								this.checkDataRoomId.splice(index, 1);
+							}
+							//日期
+							if (this.checkPosition.indexOf(position) > -1) {
+								this.checkDataDate.push(item.rentDate);
+								this.checkPrice.push(item.roomDataList[i].price)
+							} else {
+								let index = this.checkDataDate.findIndex(
+									(date) => date == item.rentDate
+								);
+								this.checkDataDate.splice(index, 1);
+								//价格
+								let index2 = this.checkPrice.findIndex(
+									(price) => price == item.price
+								);
+								this.checkPrice.splice(index2, 1);
+							}
+							if (this.checkPosition.length == 0) {
+								this.checkDataDate = [];
+								this.checkPrice = [];
+							}
+							console.log(this.checkDataDate);
+							console.log(this.checkDataRoomId)
+						}
+					}
+				}
+			},
+			getLeftData() {
+				this.$api.get('/merchant/hotel/room/state/getHouseCategoryData/1711268640588517378').then(res => {
+					console.log(res)
+					if (res.data.code == 0) {
+						// for (let i; i < res.data.data.length; i++) {
+						// 	res.data.data[i].open = true;
+						// }
+						for (let i in res.data.data) {
+							let F = i.split('-')[0];
+							if (this.indexArr.indexOf(F) < 0) {
+								this.indexArr.push(F);
+								this.opens.push(true)
+							} else {
+								this.indexArr.push('');
+								this.opens.push(true)
+							}
+						}
+						this.leftData = res.data.data;
+						console.log(this.leftData)
+						console.log(this.indexArr)
+					}
+				})
+			},
+			getData() {
+				this.$api.get('/merchant/hotel/room/state/getDateRoomList', {
+					homestayId: '1711268640588517378',
+					nowDate: '',
+					status: ''
+				}).then(res => {
+					if (res.data.code == 0) {
+						this.xdata = res.data.data;
+					}
+					console.log(res)
+				})
+			}
 		}
 	}
 </script>
 
 <style scoped lang="less">
-	.page{
+	.opration {
+		height: 140rpx;
+		padding: 0 30rpx;
+		background-color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		z-index: 9;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		text {
+			display: inline-block;
+			width: 160rpx;
+			text-align: center;
+			line-height: 56rpx;
+			border: 1rpx solid #D1D1D1;
+			height: 56rpx;
+			border-radius: 64rpx;
+			font-size: 24rpx;
+			color: #999;
+
+			&:last-child {
+				background-color: #1372FF;
+				color: #fff;
+				border: 0;
+			}
+		}
+	}
+
+	.page {
 		background: #F3F4F4;
 		padding-bottom: 40rpx;
 		box-sizing: border-box;
 		overflow-y: auto;
+		overflow-x: auto;
+	}
+
+	.date {
+		display: flex;
+
+		border: 1rpx solid #E9F0F5;
+		margin-bottom: 30rpx;
+
+		.item {
+			min-width: 130rpx;
+			width: 130rpx;
+			height: 136rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			font-size: 20rpx;
+			border-right: 1rpx solid #E9F0F5;
+			background-color: #fff;
+
+			&:last-child {
+				border: 0;
+			}
+
+			text {
+				&:nth-child(2) {
+					margin: 6rpx 0;
+				}
+			}
+		}
+	}
+
+	.floorData {
+
+		.head,
+		.roomType {
+			padding: 0 30rpx;
+			display: flex;
+			justify-content: space-between;
+		}
+
+		.head {
+			&>text {
+				&:first-child {
+					font-size: 32rpx;
+				}
+			}
+
+			.rightIcon {
+				display: flex;
+				align-items: center;
+				font-size: 24rpx;
+				color: #1F2425;
+			}
+		}
+
+		.roomType {
+			color: #333;
+			font-size: 24rpx;
+			position: relative;
+			padding-left: 44rpx;
+			margin: 20rpx 0 16rpx;
+
+			&::after {
+				position: absolute;
+				content: "";
+				height: 24rpx;
+				width: 5rpx;
+				background-color: #1372FF;
+				left: 30rpx;
+				top: 4rpx;
+				z-index: 1;
+			}
+		}
+
+		.table {
+			border: 1rpx solid #E9F0F5;
+			width: auto;
+			min-width: 100%;
+
+			.tr {
+				border-bottom: 1rpx solid #E9F0F5;
+				display: flex;
+				align-items: center;
+				background-color: #fff;
+
+				&:last-child {
+					border: 0;
+				}
+
+				.td {
+					position: relative;
+					width: 130rpx;
+					min-width: 130rpx;
+					height: 83rpx;
+					border-right: 1rpx solid #E9F0F5;
+					background-color: #fff;
+					color: #1F2425;
+					font-size: 20rpx;
+
+					.tdP,.cellBox {
+						display: flex;
+						height: 100%;
+						flex-direction: column;
+						align-items: center;
+						justify-content: center;
+					}
+
+
+
+					&:last-child {
+						border: 0;
+					}
+
+					//已预订
+					&.s2 {
+						background-color: rgba(29, 202, 104, 0.1);
+						color: rgb(29, 202, 104);
+
+						text {
+							&:first-child {
+								margin-bottom: 6rpx;
+								color: #1F2425;
+							}
+						}
+					}
+
+					// 已入住
+					&.s3 {
+						color: rgb(19, 114, 255);
+						background-color: rgba(19, 114, 255, 0.1);
+
+						text {
+							&:first-child {
+								margin-bottom: 6rpx;
+								color: #1F2425;
+							}
+						}
+					}
+
+					// 已退房
+					&.s4 {
+						color: rgb(219, 41, 195);
+						background-color: rgba(219, 41, 195, 0.1);
+					}
+
+					//待确定
+					&.s5 {
+						color: rgb(25, 185, 197);
+						background-color: rgba(25, 185, 197, 0.1);
+					}
+
+					//清洁中
+					&.s6 {
+						color: rgb(237, 86, 86);
+						background-color: rgba(237, 86, 86, 0.1);
+					}
+
+					//暂停使用
+					&.s7 {
+						color: rgb(41, 60, 115);
+						background-color: rgba(41, 60, 115, 0.1);
+					}
+
+					//保留房
+					&.s8 {
+						color: rgb(132, 68, 244);
+						background-color: rgba(132, 68, 244, 0.1);
+					}
+				}
+			}
+
+			.cover {
+				position: absolute;
+				top: 0;
+				left: 0;
+				bottom: 0;
+				right: 0;
+				background-color: #1372FF;
+				color: #fff;
+				text-align: center;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+			}
+		}
 	}
 </style>

+ 68 - 233
pages/login/index.vue

@@ -1,109 +1,58 @@
 <template>
-	<view class="page">
-		<view class="bg">
-			<view class="title">您好!欢迎使用<br>游嵊泗商家服务平台</view>
-		</view>
+	<view class="page" :style="{'min-height':h+'px'}">
 		<view class="box">
+			<image src="https://i.ringzle.com/file/20240109/d6c4691423cf40c2bdf9210d389cdd1e.png"></image>
+			<view class="text">您好!欢迎使用<br>游嵊泗商家服务平台</view>
 			<view class="login">
-				<view class="tabs">
-					<view :class="tidx==0?'active':''" @tap="changeTab(0)">账号登录</view>
-					<view :class="tidx==1?'active':''" @tap="changeTab(1)">验证码登录</view>
-				</view>
-				<view class="card" v-if="tidx==0">
-					<view class="t_item">
-						<text>账号</text>
-						<input type="text" placeholder="请输入您的账号" placeholder-style="{color:#999999}" v-model="account" @blur="setAccount" @confirm="setAccount">
-					</view>
-					<view class="t_item">
-						<text>密码</text>
-						<input type="password" placeholder="请输入您的密码" placeholder-style="{color:#999999}" v-model="password" @blur="setPassword" @confirm="setPassword">
-					</view>
-				</view>
-				<view class="card" v-if="tidx==1">
-					<view class="t_item">
-						<text>手机号</text>
-						<input type="tel" placeholder="请输入您的手机号" placeholder-style="{color:#999999}" v-model="phone" @blur="setPhone" @confirm="setPhone">
-					</view>
-					<view class="t_item">
-						<text>验证码</text>
-						<view class="ti_code">
-							<input type="number" placeholder="请输入验证码" placeholder-style="{color:#999999}" v-model="code" @blur="setCode" @confirm="setCode">
-							<view class="tic_text">
-								<text @tap="sendCode" :class="text=='获取验证码'?'active':''">{{text}}</text>
-								<span v-if="text!='获取验证码'">{{time}}S</span>
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="forget" @tap="toForgot">忘记密码?</view>
-			</view>
-			<view class="to_login" @tap="toLogin">登录</view>
-			<view class="agreement">
-				登录即代表已阅读并同意<span>《用户协议》</span>
+				<button open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">登录</button>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	var timer;
 	export default {
 		data() {
 			return {
-				tidx:0,
-				text:'获取验证码',
-				time:59,
-				account:'',
-				password:'',
-				phone:'',
-				code:''
+				
 			}
 		},
+		onLoad() {
+			uni.clearStorageSync();
+		},
 		methods: {
-			changeTab(idx){
-				this.tidx = idx;
-			},
-			setAccount(e){
-				this.account = e.target.value;
+			//获取手机号进行登录
+			decryptPhoneNumber(e){
+				if(e.detail.code) this.wxLogin(e.detail.code);
 			},
-			setPassword(e){
-				this.password = e.target.value;
-			},
-			setPhone(e){
-				this.phone = e.target.value;
-			},
-			setCode(e){
-				this.code = e.target.value;
-			},
-			sendCode(){
-				if(this.text!='获取验证码') return;
-				this.text = '重新发送';
-				timer = setInterval(()=>{
-					this.time--;
-					if(this.time==0){
-						this.text = '获取验证码';
-						this.time = 59;
-						clearInterval(timer);
+			//登录
+			wxLogin(code){
+				uni.showLoading({ title:'登录中' });
+				let that = this;
+				wx.login({
+					success(res){
+						that.$api.post('/auth/oauth/token',{
+							code:res.code,
+							phoneCode:code,
+							grant_type:'merchantWeChat',
+							captcha:'aaa'
+						},false).then(result=>{
+							if(result.data.code===0){
+								uni.setStorageSync('authorization',result.data.token_type+' '+result.data.access_token);
+								uni.setStorageSync('access_token',result.data.access_token);
+								that.$api.get('/sys/user/info').then(resu=>{
+									if(resu.data.code===0){
+										that.$showToast('登录成功');
+										setTimeout(()=>{
+											uni.reLaunch({
+												url:'/pages/login/select?userInfo='+encodeURIComponent(JSON.stringify(resu.data.data))
+											})
+										},1500)
+									}else that.$showToast(resu.data.msg)
+								})
+							}else that.$showToast(result.data.msg)
+						})
 					}
-				},1000)
-			},
-			toForgot(){
-				uni.navigateTo({
-					url:'/pages/login/forgot'
-				})
-			},
-			toLogin(){
-				if(this.tidx==0){
-					if(!this.account) return this.$showToast('请输入您的账号');
-					if(!this.password) return this.$showToast('请输入您的密码');
-				}
-				if(this.tidx==1){
-					if(!/^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(this.phone)) return this.$showToast('请输入正确的手机号');
-					if(!this.code) return this.$showToast('请输入验证码');
-				}
-				
-				uni.reLaunch({
-					url:'/pages/home/index'
 				})
 			}
 		}
@@ -112,157 +61,43 @@
 
 <style scoped lang="less">
 	.page{
-		.bg{
-			width: 100%;
-			height: 574rpx;
-			background: url(https://i.ringzle.com/file/20240106/d96376ae556b4f298abee861105b71b4.png) no-repeat;
-			background-size: 100% 100%;
-			padding: 237rpx 0 0 40rpx;
-			box-sizing: border-box;
-			position: relative;
-			z-index: 1;
-			.title{
-				font-size: 40rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 800;
-				color: #FFFFFF;
-				line-height: 72rpx;
-			}
-		}
-		
+		background: url(https://i.ringzle.com/file/20240109/472b6b7b9ea44652b85e73c796876378.png) no-repeat;
+		background-size: 100% 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
 		.box{
-			width: 100%;
-			background: #FFFFFF;
-			border-radius: 60rpx 60rpx 0rpx 0rpx;
-			padding: 85rpx 30rpx 96rpx;
-			box-sizing: border-box;
-			margin-top: -149rpx;
-			position: relative;
-			z-index: 2;
-			.login{
-				width: 100%;
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				.tabs{
-					display: flex;
-					align-items: center;
-					&>view{
-						padding-bottom: 16rpx;
-						font-size: 40rpx;
-						font-family: PingFang SC, PingFang SC;
-						font-weight: 800;
-						color: #999999;
-						position: relative;
-						&.active{
-							color: #333333;
-							&::after{
-								content: '';
-								width: 80rpx;
-								height: 6rpx;
-								background: #1372FF;
-								border-radius: 4rpx 4rpx 4rpx 4rpx;
-								position: absolute;
-								left: 50%;
-								margin-left: -40rpx;
-								bottom: 0;
-							}
-						}
-						&:last-child{
-							margin-left: 60rpx;
-						}
-					}
-				}
-				.card{
-					padding-top: 20rpx;
-					.t_item{
-						margin-top: 40rpx;
-						display: flex;
-						flex-direction: column;
-						padding-bottom: 20rpx;
-						border-bottom: 1rpx solid #D1D1D1;
-						text{
-							font-size: 32rpx;
-							font-family: PingFang SC, PingFang SC;
-							font-weight: 800;
-							color: #333333;
-						}
-						input{
-							border: none;
-							font-size: 28rpx;
-							font-family: PingFang SC, PingFang SC;
-							font-weight: 400;
-							color: #333333;
-							margin-top: 30rpx;
-						}
-						.ti_code{
-							display: flex;
-							align-items: center;
-							justify-content: space-between;
-							input{
-								width: calc(100% - 200rpx);
-							}
-							.tic_text{
-								display: flex;
-								align-items: center;
-								margin-top: 30rpx;
-								text{
-									font-size: 28rpx;
-									font-family: PingFang SC, PingFang SC;
-									font-weight: 400;
-									color: #999999;
-									&.active{
-										color: #1372FF;
-									}
-								}
-								span{
-									font-size: 28rpx;
-									font-family: PingFang SC, PingFang SC;
-									font-weight: 400;
-									color: #1372FF;
-									margin-left: 10rpx;
-								}
-							}
-						}
-					}
-				}
+			width: calc(100% - 180rpx);
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			image{
+				width: 480rpx;
+				height: 520rpx;
 			}
-			
-			.forget{
-				width: 100%;
-				box-sizing: border-box;
-				text-align: right;
-				margin-top: 30rpx;
-				font-size: 24rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
-				color: #1372FF;
-			}
-			
-			.to_login{
-				width: 100%;
-				height: 96rpx;
-				background: #1372FF;
-				border-radius: 48rpx 48rpx 48rpx 48rpx;
-				line-height: 96rpx;
+			.text{
 				text-align: center;
-				margin-top: 80rpx;
-				font-size: 34rpx;
+				font-size: 56rpx;
 				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
+				font-weight: 800;
 				color: #FFFFFF;
-				letter-spacing: 2rpx;
+				line-height: 96rpx;
 			}
-			
-			.agreement{
+			.login{
+				margin-top: 80rpx;
 				width: 100%;
-				text-align: center;
-				margin-top: 303rpx;
-				font-size: 24rpx;
-				font-family: PingFang SC, PingFang SC;
-				font-weight: 400;
-				color: #999999;
-				span{
-					color: #1372FF;
+				height: 96rpx;
+				button{
+					width: 100%;
+					height: 100%;
+					background: #FFFFFF;
+					border-radius: 48rpx 48rpx 48rpx 48rpx;
+					line-height: 96rpx;
+					text-align: center;
+					font-size: 34rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 400;
+					color: #145EE6;
 				}
 			}
 		}

+ 100 - 0
pages/login/select.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="page" :style="{'height':h+'px','padding-top':mt+'px'}">
+		<c-nav-bar title="选择门店" backUrl="/pages/login/index" @goBack="goBack" :showHome="false"></c-nav-bar>
+		<view class="card" v-for="(item,index) in list" :key="index" @tap="toHome(item)">
+			<view>
+				<text>{{item.name}}</text>
+				<text>{{item.type}}</text>
+			</view>
+			<view>进店</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				userInfo:null,
+				list:[]
+			}
+		},
+		onLoad(option) {
+			if(option.userInfo) this.userInfo = JSON.parse(decodeURIComponent(option.userInfo));
+			this.getList();
+		},
+		methods: {
+			goBack(e){
+				uni.clearStorageSync();
+			},
+			getList(){
+				this.list = [
+					{ name:'一家民宿', type:'酒店民宿' },
+					{ name:'石柱村渔家乐', type:'渔家乐' },
+					{ name:'周游嵊泗', type:'旅行社' }
+				]
+			},
+			toHome(item){
+				uni.setStorageSync('userInfo',this.userInfo);
+				uni.reLaunch({
+					url:'/pages/home/index'
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.page{
+		background: #F3F4F4;
+		padding-bottom: 20rpx;
+		box-sizing: border-box;
+		overflow-y: auto;
+		.card{
+			width: calc(100% - 60rpx);
+			height: 180rpx;
+			background: #FFFFFF;
+			border-radius: 10rpx 10rpx 10rpx 10rpx;
+			margin: 20rpx 30rpx 0;
+			padding: 0 30rpx 0 60rpx;
+			box-sizing: border-box;
+			background: url(https://i.ringzle.com/file/20240109/1ee084be17f74dde94617dcb7f7c8af3.png) no-repeat;
+			background-size: 100% 100%;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			&>view{
+				&:first-child{
+					display: flex;
+					flex-direction: column;
+					text{
+						font-size: 32rpx;
+						font-family: PingFang SC, PingFang SC;
+						font-weight: 800;
+						color: #1E3A62;
+						&:last-child{
+							font-size: 24rpx;
+							font-family: PingFang SC, PingFang SC;
+							font-weight: 400;
+							color: #1E3A62;
+							margin-top: 10rpx;
+						}
+					}
+				}
+				&:last-child{
+					width: 140rpx;
+					height: 56rpx;
+					border-radius: 36rpx 36rpx 36rpx 36rpx;
+					border: 1rpx solid #70849F;
+					background: transparent;
+					line-height: 56rpx;
+					text-align: center;
+					font-size: 28rpx;
+					font-family: PingFang SC, PingFang SC;
+					font-weight: 800;
+					color: #1E3A62;
+				}
+			}
+		}
+	}
+</style>