Browse Source

更新弹框样式和部分bug

zhuxiuping 3 years ago
parent
commit
78e4014055

+ 5 - 1
App.vue

@@ -3,8 +3,12 @@
 		onLaunch: function() {
 		onLaunch: function() {
 			console.log('App Launch')
 			console.log('App Launch')
 			// console.log(localStorage.getItem('token')=='null')
 			// console.log(localStorage.getItem('token')=='null')
-			if(localStorage.getItem('token')=='null') {
+			if(localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='null') {
 				window.location.href ='https://open.wecard.qq.com/connect/oauth/authorize?app_key=4FD5599032819781&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=http%3A%2F%2Fchuanghai-dev.natapp1.cc%2Fihotel%2FhotelUser%2FweixiaoAuth&state=http%3A%2F%2Fchuanghai-dev.natapp1.cc%2Fihotel%2FhotelUser%2FweixiaoAuth';
 				window.location.href ='https://open.wecard.qq.com/connect/oauth/authorize?app_key=4FD5599032819781&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=http%3A%2F%2Fchuanghai-dev.natapp1.cc%2Fihotel%2FhotelUser%2FweixiaoAuth&state=http%3A%2F%2Fchuanghai-dev.natapp1.cc%2Fihotel%2FhotelUser%2FweixiaoAuth';
+			} else if (localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='获取用户信息失败') {
+				uni.navigateTo({
+					url:'pages/huoquanshibai/huoquanshibai'
+				})
 			}
 			}
 			
 			
 		},
 		},

+ 2 - 0
main.js

@@ -6,7 +6,9 @@ import axios from "axios"
 import qs from 'qs'
 import qs from 'qs'
 import getUrlKey from './utils/getToken.js'
 import getUrlKey from './utils/getToken.js'
 localStorage.setItem('token',getUrlKey('token'))
 localStorage.setItem('token',getUrlKey('token'))
+localStorage.setItem('errorMsg',getUrlKey('errorMsg'))
 console.log(localStorage.getItem('token'))
 console.log(localStorage.getItem('token'))
+console.log(localStorage.getItem('errorMsg'))
 
 
 //引入公共接口
 //引入公共接口
 import {myRequest} from './utils/api.js'
 import {myRequest} from './utils/api.js'

+ 6 - 0
pages.json

@@ -42,6 +42,12 @@
 		}
 		}
 	},
 	},
 	{
 	{
+		"path": "pages/huoquanshibai/huoquanshibai",
+		"style":{
+			"navigationBarTitleText": "获权失败"
+		}
+	},
+	{
 		"path": "pages/gongyuxiangqing/gongyuxiangqing",
 		"path": "pages/gongyuxiangqing/gongyuxiangqing",
 		"style":{
 		"style":{
 			"navigationBarTitleText": "公寓详情"
 			"navigationBarTitleText": "公寓详情"

+ 59 - 0
pages/huoquanshibai/huoquanshibai.vue

@@ -0,0 +1,59 @@
+<template>
+	<view class="content">
+		<view class="text-area">
+			<text class="top-line"></text>
+				<view class="item">
+					<!-- <image src="../../static/success.png" class="success-img"></image> -->
+					<text class="success-text">获权失败</text>
+				</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style>
+	.content {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+		}
+		
+		.text-area {
+			display: flex;
+			justify-content: center;
+		}
+		.top-line{
+			margin-top: 0rpx;
+			margin-left: 0;
+			position: absolute;
+			width: 750rpx;
+			height: 1rpx;
+			background: #CCCCCC;
+		}
+		.item{
+			margin-top: 400rpx;
+			text-align: center;
+			width: 750rpx;
+			height: 1206rpx;
+		}
+		.success-img{
+			margin-left: 242rpx;
+			margin-top: 73rpx;
+			width: 261rpx;
+			height: 266rpx;
+		}
+		.success-text{
+			margin-left: 276rpx;
+			margin-top: 433rpx;
+			font-size: 49rpx;
+			font-family: Microsoft YaHei-3970(82674968);
+			font-weight: 400;
+			color: #333333;
+		}
+</style>

+ 29 - 0
pages/index/css/index.css

@@ -356,6 +356,25 @@
 	color: rgba(128, 128, 128, 1);
 	color: rgba(128, 128, 128, 1);
 	font-size: 28rpx;
 	font-size: 28rpx;
 	font-weight: 400;
 	font-weight: 400;
+	width: 561rpx;
+	height: 217rpx;
+	overflow-y: auto;
+}
+.popup_txt_in{
+	width: 551rpx;
+	height: 217rpx;
+}
+.popup_txt::-webkit-scrollbar {/*滚动条整体样式*/
+    width: 9rpx;
+    height: 240rpx;
+    background-color: #707371;
+}
+.popup_txt::-webkit-scrollbar-thumb {/*滚动条整体样式*/
+    background-color: #707371;
+    border-radius: 5px;
+}
+.popup_txt::-webkit-scrollbar-track {/*滚动条里面轨道*/
+    background: #cac9d3;
 }
 }
 /* 办理续住弹窗 */
 /* 办理续住弹窗 */
 .popup_bg_xu{
 .popup_bg_xu{
@@ -454,6 +473,16 @@
 	justify-content: center;
 	justify-content: center;
 	padding: 15rpx;
 	padding: 15rpx;
 	height: 150rpx;
 	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
+}
+.kuang_txt_tui{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
 	width: 180rpx;
 	width: 180rpx;
 	line-height: 150rpx;
 	line-height: 150rpx;
 	text-align: center;
 	text-align: center;

+ 82 - 44
pages/index/index.vue

@@ -9,7 +9,7 @@
 			<text class="uni-title">墨轩湖姬子公寓(南昌交通学院)</text>
 			<text class="uni-title">墨轩湖姬子公寓(南昌交通学院)</text>
 			<text class="uni-sub-title">2021年装修 | 智能门锁 | 房间wifi | 免费停车</text>
 			<text class="uni-sub-title">2021年装修 | 智能门锁 | 房间wifi | 免费停车</text>
 			<text class="uni-extra" @click="navigateToXiangqing">设施/详情></text>
 			<text class="uni-extra" @click="navigateToXiangqing">设施/详情></text>
-			<text class="uni-body">宜春市靖安县北高速路口什么路899号</text>
+			<text class="uni-body">江西省宜春市靖安县墨轩湖大道1号</text>
 			<image class="uni-phone" @click="telphone(phone)" src="../../static/index/index_phone.svg"></image>
 			<image class="uni-phone" @click="telphone(phone)" src="../../static/index/index_phone.svg"></image>
 			<a href="https://uri.amap.com/marker?position=115.387261,28.788671&name=南昌交通学院智慧公寓">
 			<a href="https://uri.amap.com/marker?position=115.387261,28.788671&name=南昌交通学院智慧公寓">
 				<image class="uni-map" @click="mapDaohang('115.387261','28.788671')" src="../../static/index/index_map.svg"></image>
 				<image class="uni-map" @click="mapDaohang('115.387261','28.788671')" src="../../static/index/index_map.svg"></image>
@@ -22,7 +22,7 @@
 		    <image src="../../static/index/xuzhi.png" class="img-btn" height="100%" width="100%"></image>
 		    <image src="../../static/index/xuzhi.png" class="img-btn" height="100%" width="100%"></image>
 			<text class="list-txt">入住须知</text>
 			<text class="list-txt">入住须知</text>
 		  </view>
 		  </view>
-		  <view class="item-list-one" @click="navigateToDairuzhu">
+		  <view class="item-list-one" @click="navigateToDairuzhu('warn')">
 		    <image src="../../static/index/ruzhu.png" class="img-btn"></image>
 		    <image src="../../static/index/ruzhu.png" class="img-btn"></image>
 		    <text class="list-txt">办理入住</text>
 		    <text class="list-txt">办理入住</text>
 		  </view>
 		  </view>
@@ -30,16 +30,20 @@
 		    <image src="../../static/index/index_xuzhu.svg" class="img-btn"></image>
 		    <image src="../../static/index/index_xuzhu.svg" class="img-btn"></image>
 		    <text class="list-txt">办理续住</text>
 		    <text class="list-txt">办理续住</text>
 		  </view> -->
 		  </view> -->
-		  <view class="item-list-one" @click="navigateToTuifang">
+		  <view class="item-list-one" @click="navigateToTuifang('warn')">
 		    <image src="../../static/index/tuifang.png" class="img-btn"></image>
 		    <image src="../../static/index/tuifang.png" class="img-btn"></image>
 		    <text class="list-txt">办理退房</text>
 		    <text class="list-txt">办理退房</text>
 		  </view>
 		  </view>
 		</view>
 		</view>
 		<!-- 退房失败时弹框 -->
 		<!-- 退房失败时弹框 -->
-		<uni-popup ref="popup_tui" type="center" width="300rpx" height="300rpx" background-color="#fff">
-			<view class="kuang_txt">
+		<!-- <uni-popup ref="popup_tui" type="center" width="300rpx" height="300rpx" background-color="#fff">
+			<view class="kuang_txt_tui">
 				<text>请先订房</text>
 				<text>请先订房</text>
 			</view>
 			</view>
+		</uni-popup> -->
+		<uni-popup ref="popup_tui" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" content="请先订房!" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
 		</uni-popup>
 		</uni-popup>
 		<!-- 第三层订房 -->
 		<!-- 第三层订房 -->
 		<view class="room-list">
 		<view class="room-list">
@@ -90,6 +94,16 @@
 			</view>
 			</view>
 			
 			
 		</view>
 		</view>
+		<!-- 订房时弹框 -->
+		<!-- <uni-popup ref="popup_order" type="center" width="300rpx" height="300rpx" background-color="#fff">
+			<view class="kuang_txt">
+				<text>{{order_txt}}</text>
+			</view>
+		</uni-popup> -->
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" :content="order_txt" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
 		<!-- 房间样式弹窗页面 -->
 		<!-- 房间样式弹窗页面 -->
 		<uni-popup ref="popup" type="dialog" :mask-click="false">
 		<uni-popup ref="popup" type="dialog" :mask-click="false">
 			<view class="popup_bg">
 			<view class="popup_bg">
@@ -104,7 +118,7 @@
 					</swiper-item>
 					</swiper-item>
 				</swiper>
 				</swiper>
 				<text class="popup_title2">便利设施</text>
 				<text class="popup_title2">便利设施</text>
-				<view class="popup_txt">{{typeText}}</view>
+				<view class="popup_txt"><view class="popup_txt_in">{{typeText}}</view></view>
 			</view>
 			</view>
 		</uni-popup>
 		</uni-popup>
 		<!-- 有一个可续住订单时办理续住弹窗页面 -->
 		<!-- 有一个可续住订单时办理续住弹窗页面 -->
@@ -201,6 +215,7 @@
 					date:'',
 					date:'',
 					endDate:''
 					endDate:''
 				},
 				},
+				msgType: 'warn',
 				distance: 0, //"距离"
 				distance: 0, //"距离"
 				startTime:'',//默认到店日期
 				startTime:'',//默认到店日期
 				endTime:'',//默认离店日期
 				endTime:'',//默认离店日期
@@ -232,7 +247,12 @@
 				markers: [],
 				markers: [],
 				markerHeight: 30,
 				markerHeight: 30,
 				xuzhu_type:[],// 办理续住判断条件
 				xuzhu_type:[],// 办理续住判断条件
-				xuzhu_panduan:[]// 办理续住判断条件赋值
+				xuzhu_panduan:[],// 办理续住判断条件赋值
+				tui_type:[],// 办理退房判断条件
+				tui_panduan:[],// 办理退房判断条件赋值
+				dai_type:[],// 办理入住判断条件
+				dai_panduan:[],// 办理入住判断条件赋值
+				order_txt:'',//订房事故时信息
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -356,6 +376,8 @@
 			getOrderPage() {
 			getOrderPage() {
 			  let _self = this
 			  let _self = this
 			  _self.xuzhu_type=[]
 			  _self.xuzhu_type=[]
+			  _self.tui_type=[]
+			  _self.dai_type=[]
 			  this.$axios.get("/ihotel/hotelOrder/user/order/page?curPage=1&pageSize=100",
 			  this.$axios.get("/ihotel/hotelOrder/user/order/page?curPage=1&pageSize=100",
 			  {
 			  {
 				  headers:{
 				  headers:{
@@ -367,6 +389,8 @@
 				  res.data.list.forEach(data => {
 				  res.data.list.forEach(data => {
 					if (data.flag !== '-1') {
 					if (data.flag !== '-1') {
 					  _self.xuzhu_type.push(data.orderStatu)
 					  _self.xuzhu_type.push(data.orderStatu)
+					  _self.tui_type.push(data.orderStatu)
+					  _self.dai_type.push(data.orderStatu)
 					  // console.log(_self.xuzhu_type)
 					  // console.log(_self.xuzhu_type)
 					}
 					}
 				  })
 				  })
@@ -392,51 +416,60 @@
 			navigateToOrderRoom(enableNum,id,typeName) {
 			navigateToOrderRoom(enableNum,id,typeName) {
 				let _self = this
 				let _self = this
 				_self.roomType = []
 				_self.roomType = []
-				this.$axios.get("/ihotel/hotelOrder/user/order/confirm?startTime="+this.startDate.substring(0,10)+"&endTime="+this.endDate.substring(0,10)+'&roomTypeId='+id).then(res => {
-					res = res.data
-					if (res.success) {
-						// console.log(res)
-					  this.payMount=res.data.totalAmount
-					  this.freeRoom=res.data.freeNum
-					  this.ruzhu_num=res.data.nums
-					  if (enableNum>=1){
-							uni.navigateTo({
-							  url: "../order_room/order_room?roomTypeId="+id +"&enableStartTime="+this.startDate+"&enableEndTime="+this.endDate+"&startTime="+this.startTime+"&endTime="+this.endTime+"&typeName="+typeName+"&payMount="+this.payMount+"&freeRoom="+this.freeRoom+'&ruzhu_num='+this.ruzhu_num,
-							});
-						}
-						this.getRoomType()
-					} else {
-					  alert(res.message)
-					}
-				});
+				if (enableNum>=1){
+					uni.navigateTo({
+					  url: "../order_room/order_room?roomTypeId="+id +"&enableStartTime="+this.startDate+"&enableEndTime="+this.endDate+"&startTime="+this.startTime+"&endTime="+this.endTime+"&typeName="+typeName,
+					});
+				}
+				this.getRoomType()
 				
 				
 				
 				
 			},
 			},
 			//办理入住跳转
 			//办理入住跳转
-			navigateToDairuzhu(){
-				uni.navigateTo({
-					url: "../my_orderlist/my_orderlist?Inv=2",
-				})
+			navigateToDairuzhu(type){
+				this.dai_panduan=[]
+				setTimeout(() => {
+					this.getOrderPage()
+				},1)
+				setTimeout(() => {
+					for (let i=0;i<this.dai_type.length;i++){
+						this.dai_type.forEach(val => {
+							if(val[i]==2) {
+								this.dai_panduan.push(val)
+							}
+						})
+					}
+					if(this.dai_panduan.length>=1) {
+						uni.navigateTo({
+							url:"../my_orderlist/my_orderlist?Inv=2"
+						})
+					}else if(this.dai_panduan.length<1) {
+						this.msgType = type
+						this.order_txt='请先订房!'
+						this.$refs.popup_order.open()
+					}
+				},150)
 			},
 			},
 			//办理退房
 			//办理退房
-			navigateToTuifang(){
-				this.xuzhu_panduan=[]
+			navigateToTuifang(type){
+				this.tui_panduan=[]
 				setTimeout(() => {
 				setTimeout(() => {
 					this.getOrderPage()
 					this.getOrderPage()
 				},1)
 				},1)
 				setTimeout(() => {
 				setTimeout(() => {
-					for (let i=0;i<this.xuzhu_type.length;i++){
-						this.xuzhu_type.forEach(val => {
+					for (let i=0;i<this.tui_type.length;i++){
+						this.tui_type.forEach(val => {
 							if(val[i]==3) {
 							if(val[i]==3) {
-								this.xuzhu_panduan.push(val)
+								this.tui_panduan.push(val)
 							}
 							}
 						})
 						})
 					}
 					}
-					if(this.xuzhu_panduan.length>1) {
+					if(this.tui_panduan.length>=1) {
 						uni.navigateTo({
 						uni.navigateTo({
 							url:"../my_orderlist/my_orderlist?Inv=3"
 							url:"../my_orderlist/my_orderlist?Inv=3"
 						})
 						})
-					}else if(this.xuzhu_panduan.length<1) {
+					}else if(this.tui_panduan.length<1) {
+						this.msgType = type
 						this.$refs.popup_tui.open()
 						this.$refs.popup_tui.open()
 					}
 					}
 				},150)
 				},150)
@@ -500,15 +533,20 @@
 				if(e.range.before!=''&&e.range.after=='') {
 				if(e.range.before!=''&&e.range.after=='') {
 					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
 					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
 				} else if(e.range.before!=''&&e.range.after!=''){
 				} else if(e.range.before!=''&&e.range.after!=''){
-					this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
-				}
-				this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
-				this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
-				this.startDate = e.range.before +' 14:00:00'
-				this.endDate =  e.range.after +' 12:00:00'
-				this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
-				if(this.endDate !=' 12:00:00') {
-					this.getRoomType()
+					if((new Date(e.range.after).getTime())<(new Date(e.range.before).getTime())) {
+						this.order_txt='离店日期不能小于到店日期'
+						this.$refs.popup_order.open()
+					}else{
+						this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
+						this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
+						this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
+						this.startDate = e.range.before +' 14:00:00'
+						this.endDate =  e.range.after +' 12:00:00'
+						this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
+						if(this.endDate !=' 12:00:00') {
+							this.getRoomType()
+						}
+					}
 				}
 				}
 				
 				
 			},
 			},

+ 19 - 0
pages/my_orderlist/css/my_orderlist.css

@@ -13,6 +13,14 @@
 	top: 0;
 	top: 0;
 	width: 100%;
 	width: 100%;
 	white-space: nowrap;
 	white-space: nowrap;
+	overflow-y: hidden;
+	overflow-x: auto;
+	border: 1rpx solid #fdfdfc;
+}
+.inv-h-w::-webkit-scrollbar-thumb {
+	/*滚动条里面小方块*/
+	border-radius: 5px;
+	background: blue;
 }
 }
 
 
 .inv-h {
 .inv-h {
@@ -292,4 +300,15 @@
 	font-weight: 400;
 	font-weight: 400;
 	text-align: center;
 	text-align: center;
 	line-height: 100rpx;
 	line-height: 100rpx;
+}
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
 }
 }

+ 102 - 32
pages/my_orderlist/my_orderlist.vue

@@ -33,9 +33,9 @@
 				<uni-countdown v-if="item.orderStatu == 1" class="room-count" color="#FF5733" :show-day="false" :second="timeupSecond" @timeup="timeup(item.createTime)" />
 				<uni-countdown v-if="item.orderStatu == 1" class="room-count" color="#FF5733" :show-day="false" :second="timeupSecond" @timeup="timeup(item.createTime)" />
 				<text v-if="item.orderStatu == 1" class="room-count-txt">之后取消</text>
 				<text v-if="item.orderStatu == 1" class="room-count-txt">之后取消</text>
 				<view class="room-button" v-if="item.orderStatu != 4 && item.orderStatu != 2 && item.orderStatu != 3">
 				<view class="room-button" v-if="item.orderStatu != 4 && item.orderStatu != 2 && item.orderStatu != 3">
-					<text v-if="item.orderStatu == 0" @click="getOrderDelete(item.id)">删除</text>
-					<text v-if="item.orderStatu == 1" @click="getOrderCancel(item.id)">取消订单</text>
-					<text v-if="item.orderStatu == 5" @click="getOrderDelete(item.id)">删除</text>
+					<text v-if="item.orderStatu == 0" @click="openDel(item.id,'warn')">删除</text>
+					<text v-if="item.orderStatu == 1" @click="openQu(item.id,'warn')">取消订单</text>
+					<text v-if="item.orderStatu == 5" @click="openDel(item.id,'warn')">删除</text>
 					<!-- <text v-if="item.orderStatu == 2">取消订单</text> -->
 					<!-- <text v-if="item.orderStatu == 2">取消订单</text> -->
 					<!-- <text v-if="item.orderStatu == 3" @click="navigateToXuzhu">续住</text> -->
 					<!-- <text v-if="item.orderStatu == 3" @click="navigateToXuzhu">续住</text> -->
 				</view>
 				</view>
@@ -43,14 +43,22 @@
 					<text v-if="item.orderStatu == 0" @click="navigateToZaici(item.enableStartTime,item.enableEndTime,item.roomTypeId)">再次预定</text>
 					<text v-if="item.orderStatu == 0" @click="navigateToZaici(item.enableStartTime,item.enableEndTime,item.roomTypeId)">再次预定</text>
 					<text v-if="item.orderStatu == 1" @click="getOrderPay(item.id)">支付</text>
 					<text v-if="item.orderStatu == 1" @click="getOrderPay(item.id)">支付</text>
 					<text v-if="item.orderStatu == 4" @click="navigateToJiezhang(item.id)">去处理</text>
 					<text v-if="item.orderStatu == 4" @click="navigateToJiezhang(item.id)">去处理</text>
-					<text v-if="item.orderStatu == 5" @click="navigateToWanchengZaici()">再次预定</text>
-					<text v-if="item.orderStatu == 2" @click="getOrderHold(item.id)">办理入住</text>
-					<text v-if="item.orderStatu == 3" @click="getOrderReturn(item.id)">退房</text>
+					<text v-if="item.orderStatu == 5" @click="navigateToWanchengZaici(item.roomTypeId)">再次预定</text>
+					<text v-if="item.orderStatu == 2" @click="openRu(item.id,'warn')">办理入住</text>
+					<text v-if="item.orderStatu == 3" @click="openTui(item.id,'warn')">退房</text>
 					
 					
 				</view>
 				</view>
 				<view class="room-line"  v-if="index<(troom.length-1)"></view>
 				<view class="room-line"  v-if="index<(troom.length-1)"></view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<!-- 提示时弹框 -->
+		<uni-popup ref="popup_order2" type="dialog">
+			<uni-popup-dialog :type="msgType2" cancelText="关闭" confirmText="确定" :content='order_txt2' @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" :content='order_txt'></uni-popup-dialog>
+		</uni-popup>
 		<!-- 办理续住弹窗 -->
 		<!-- 办理续住弹窗 -->
 		<uni-popup ref="popup_xuzhu" type="dialog" :mask-click="false">
 		<uni-popup ref="popup_xuzhu" type="dialog" :mask-click="false">
 			<view class="popup_bg_xu">
 			<view class="popup_bg_xu">
@@ -142,8 +150,15 @@
 					selected: [],
 					selected: [],
 					startDate:'',
 					startDate:'',
 					date:'',
 					date:'',
-					endDate:''
+					endDate:'',
+					order_txt:'',//提交订单时信息
 				},
 				},
+				msgType:'warn',
+				msgType2:'warn',
+				order_txt:'',//
+				order_txt2:'',//
+				tankuang:false,//弹框是否确定
+				order_txt_id:'',
 			}
 			}
 		},
 		},
 		filters:{
 		filters:{
@@ -218,6 +233,53 @@
 					}
 					}
 				  });
 				  });
 			},
 			},
+			//待确认的弹框操作
+			dialogConfirm() {
+				this.$refs.popup_order2.close()
+				this.tankuang=true
+				if(this.tankuang==true) {
+					if(this.order_txt2=='确定删除?') {
+						this.getOrderDelete(this.order_txt_id)
+					} else if(this.order_txt2=='确定退房?') {
+						this.getOrderReturn(this.order_txt_id)
+					} else if(this.order_txt2=='确定入住?') {
+						this.getOrderHold(this.order_txt_id)
+					} else if(this.order_txt2=='确定取消订单?') {
+						this.getOrderCancel(this.order_txt_id)
+					}
+				} 
+			},
+			dialogClose(){
+				this.$refs.popup_order2.close()
+			},
+			//删除弹框
+			openDel(id,type){
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定删除?'
+				this.$refs.popup_order2.open()
+			},
+			//退房弹框
+			openTui(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定退房?'
+				this.$refs.popup_order2.open()
+			},
+			//入住弹框
+			openRu(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定入住?'
+				this.$refs.popup_order2.open()
+			},
+			//取消订单弹框
+			openQu(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定取消订单?'
+				this.$refs.popup_order2.open()
+			},
 			// 支付订单
 			// 支付订单
 			getOrderPay(id) {
 			getOrderPay(id) {
 				  let _self = this
 				  let _self = this
@@ -238,65 +300,76 @@
 						}
 						}
 						
 						
 					} else {
 					} else {
-						alert(res.message)
-					  console.log('支付失败')
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+						console.log('支付失败')
 					}
 					}
 				  });
 				  });
 			},
 			},
 			// 办理退房
 			// 办理退房
-			getOrderReturn(id) {
+			getOrderReturn(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/return/${id}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						console.log(res)
-						alert('退房成功')
+						this.order_txt='退房成功'
+						this.$refs.popup_order.open()
 						this.getOrderPage()
 						this.getOrderPage()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
+					
 				});
 				});
+				this.tankuang==false
 			},
 			},
 			// 办理入住
 			// 办理入住
-			getOrderHold(id) {
+			getOrderHold(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/hold/${id}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('办理入住成功')
+						this.order_txt='办理入住成功'
+						this.$refs.popup_order.open()
 						this.getOrderPage()
 						this.getOrderPage()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
 			// 删除订单
 			// 删除订单
-			getOrderDelete(id) {
+			getOrderDelete(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.delete(`/ihotel/hotelOrder/user/order/${id}`,).then(res => {
+				this.$axios.delete(`/ihotel/hotelOrder/user/order/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('删除订单成功')
+						this.order_txt='删除订单成功'
+						this.$refs.popup_order.open()
 						this.getOrderPage()
 						this.getOrderPage()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
+				this.tankuang==false
 			},
 			},
 			// 待支付取消订单
 			// 待支付取消订单
-			getOrderCancel(id) {
+			getOrderCancel(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/cancel/${id}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/cancel/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('取消成功')
+						this.order_txt='取消成功'
+						this.$refs.popup_order.open()
 						this.getOrderPage()
 						this.getOrderPage()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
@@ -307,9 +380,9 @@
 				})
 				})
 			},
 			},
 			// 订单已完成再次预订
 			// 订单已完成再次预订
-			navigateToWanchengZaici(){
-				uni.navigateBack({
-					delta:5
+			navigateToWanchengZaici(roomTypeId){
+				uni.navigateTo({
+					url:'../order_room/order_room?roomTypeId='+roomTypeId
 				})
 				})
 			},
 			},
 			//处理结账
 			//处理结账
@@ -366,9 +439,6 @@
 						seconds = '0' + seconds;
 						seconds = '0' + seconds;
 					  }
 					  }
 					  var timer = minutes + ":" + seconds;
 					  var timer = minutes + ":" + seconds;
-					  // that.setData({
-					  //   timer: timer
-					  // })
 					}
 					}
 				}, 1000);
 				}, 1000);
 				if(that.timeupSecond==0) {
 				if(that.timeupSecond==0) {

+ 6 - 3
pages/myself/myself.vue

@@ -1,7 +1,8 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		<view class="person">
 		<view class="person">
-			<image class="person_touxiang" src="../../static/my/touxiang.svg"></image>
+			<image class="person_touxiang" v-if="touxiang==''" src="../../static/my/touxiang.svg"></image>
+			<image class="person_touxiang" v-else :src="touxiang"></image>
 			<text class="person_name">{{cardName}}
 			<text class="person_name">{{cardName}}
 				<text class="person_identity">
 				<text class="person_identity">
 					<text v-if="cardIdentity==0">其他</text>
 					<text v-if="cardIdentity==0">其他</text>
@@ -10,7 +11,7 @@
 					<text v-if="cardIdentity==5">校友</text>
 					<text v-if="cardIdentity==5">校友</text>
 				</text>
 				</text>
 			</text>
 			</text>
-			<text class="person_phone">卡号:{{cardNum}}</text>
+			<text class="person_phone">{{cardNum}}</text>
 		</view>
 		</view>
 		<!-- 第二部分,我的订单 -->
 		<!-- 第二部分,我的订单 -->
 		<view class="my_order">
 		<view class="my_order">
@@ -70,6 +71,7 @@
 				cardName:'',//用户名
 				cardName:'',//用户名
 				cardIdentity:'',//身份
 				cardIdentity:'',//身份
 				cardNum:'',//卡号
 				cardNum:'',//卡号
+				touxiang:'',
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -90,7 +92,8 @@
 						if (res.data.statu == '1') {
 						if (res.data.statu == '1') {
 						  _self.cardName=res.data.name
 						  _self.cardName=res.data.name
 						  _self.cardIdentity=res.data.identityType
 						  _self.cardIdentity=res.data.identityType
-						  _self.cardNum=res.data.cardNumber
+						  _self.cardNum=res.data.telPhone
+						  _self.touxiang=res.data.headImage
 						}else {
 						}else {
 							alert('您没有权限,请联系客服')
 							alert('您没有权限,请联系客服')
 						}
 						}

+ 17 - 1
pages/order_mark/css/order_mark.css

@@ -155,7 +155,7 @@
 .two-order3{
 .two-order3{
 	margin-top: -30rpx;
 	margin-top: -30rpx;
 	width: 690rpx;
 	width: 690rpx;
-	height: 563rpx;
+	height: 618rpx;
 	background: rgba(255, 255, 255, 1);
 	background: rgba(255, 255, 255, 1);
 	border-radius: 7px;
 	border-radius: 7px;
 	color: rgba(166, 166, 166, 1);
 	color: rgba(166, 166, 166, 1);
@@ -223,6 +223,11 @@
 	margin-left: 30rpx;
 	margin-left: 30rpx;
 	margin-top: 486rpx;
 	margin-top: 486rpx;
 }
 }
+.two-order-secret{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 541rpx;
+}
 .two-order-shui2{
 .two-order-shui2{
 	position: absolute;
 	position: absolute;
 	margin-left: 30rpx;
 	margin-left: 30rpx;
@@ -239,4 +244,15 @@
 	color: rgba(204, 204, 204, 1);
 	color: rgba(204, 204, 204, 1);
 	font-size: 20rpx;
 	font-size: 20rpx;
 	font-weight: 400;
 	font-weight: 400;
+}
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
 }
 }

+ 103 - 32
pages/order_mark/order_mark.vue

@@ -7,7 +7,7 @@
 			<view class="room-button-6"@click="getOrderDelete(orderList.orderId)">
 			<view class="room-button-6"@click="getOrderDelete(orderList.orderId)">
 				<text>删除订单</text>
 				<text>删除订单</text>
 			</view>
 			</view>
-			<view class="room-button2-6" @click="navigateToWanchengZaici()">
+			<view class="room-button2-6" @click="navigateToWanchengZaici(orderList.roomTypeId)">
 				<text>再次预定</text>
 				<text>再次预定</text>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -42,21 +42,21 @@
 			<view class="one-order-yufukuan">
 			<view class="one-order-yufukuan">
 				预付款<text class="yufukuan-price">¥{{orderList.payAmount}}</text>
 				预付款<text class="yufukuan-price">¥{{orderList.payAmount}}</text>
 			</view>
 			</view>
-			<view class="one-order-zhu">
+			<!-- <view class="one-order-zhu">
 				注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度
 				注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度
 				数为10度,超出标准需在预付款中扣除,未超出原路返回预
 				数为10度,超出标准需在预付款中扣除,未超出原路返回预
 				付款
 				付款
-			</view>
+			</view> -->
 			<view class="room-button" v-if="orderList.orderStatu != 2&& orderList.orderStatu != 3">
 			<view class="room-button" v-if="orderList.orderStatu != 2&& orderList.orderStatu != 3">
 				<text v-if="orderList.orderStatu == 0" @click="navigateToZaici(orderList.enableStartTime,orderList.enableEndTime,orderList.roomTypeId)">再次预定</text>
 				<text v-if="orderList.orderStatu == 0" @click="navigateToZaici(orderList.enableStartTime,orderList.enableEndTime,orderList.roomTypeId)">再次预定</text>
-				<text v-if="orderList.orderStatu == 1" @click="getOrderCancel(orderList.orderId)">取消订单</text>
+				<text v-if="orderList.orderStatu == 1" @click="openQu()(orderList.orderId,'warn')">取消订单</text>
 				<!-- <text v-if="orderList.orderStatu == 3">办理续住</text> -->
 				<!-- <text v-if="orderList.orderStatu == 3">办理续住</text> -->
 			</view>
 			</view>
-			<view class="room-button2" :class="{'buttonNo': orderList.orderStatu == 3}">
-				<text v-if="orderList.orderStatu == 0" @click="getOrderDelete(orderList.orderId)">删除</text>
+			<view class="room-button2" :class="{'buttonNo': orderList.orderStatu == 3 || orderList.orderStatu == 2}">
+				<text v-if="orderList.orderStatu == 0" @click="openDel(orderList.orderId,'warn')">删除</text>
 				<text v-if="orderList.orderStatu == 1" @click="getOrderPay(orderList.orderId)">支付</text>
 				<text v-if="orderList.orderStatu == 1" @click="getOrderPay(orderList.orderId)">支付</text>
-				<text v-if="orderList.orderStatu == 3" @click="getOrderReturn(orderList.orderId)">办理退房</text>
-				<text v-if="orderList.orderStatu == 2" @click="getOrderHold(orderList.orderId)">办理入住</text>
+				<text v-if="orderList.orderStatu == 3" @click="openTui(orderList.orderId,'warn')">办理退房</text>
+				<text v-if="orderList.orderStatu == 2" @click="openRu(orderList.orderId,'warn')">办理入住</text>
 			</view>
 			</view>
 		</view>
 		</view>
 		<!-- 第二层模块 -->
 		<!-- 第二层模块 -->
@@ -66,8 +66,9 @@
 			<view class="two-order-phone">手机号码:<text class="two-order-txt">{{orderList.userPhone}}</text></view>
 			<view class="two-order-phone">手机号码:<text class="two-order-txt">{{orderList.userPhone}}</text></view>
 			<view class="two-order-count">订  单  号:<text class="two-order-txt">{{orderList.orderId}}</text></view>
 			<view class="two-order-count">订  单  号:<text class="two-order-txt">{{orderList.orderId}}</text></view>
 			<view class="two-order-time">下单时间:<text class="two-order-txt">{{orderList.createTime}}</text></view>
 			<view class="two-order-time">下单时间:<text class="two-order-txt">{{orderList.createTime}}</text></view>
-			<view class="two-order-xing">户         型:<text class="two-order-txt">{{orderList.roomTypeName}}</text></view>
+			<view class="two-order-xing">户         型:<text class="two-order-txt">{{orderList.roomNo}}</text></view>
 			<view class="two-order-zhuTime">入离时间:<text class="two-order-txt" v-if="orderList.enableStartTime,orderList.enableEndTime">入住日{{orderList.enableStartTime.substring(11,16)}}后   离店日{{orderList.enableEndTime.substring(11,16)}}前</text></view>
 			<view class="two-order-zhuTime">入离时间:<text class="two-order-txt" v-if="orderList.enableStartTime,orderList.enableEndTime">入住日{{orderList.enableStartTime.substring(11,16)}}后   离店日{{orderList.enableEndTime.substring(11,16)}}前</text></view>
+			<view class="two-order-secret" v-if="orderList.orderStatu ==3">房间门锁密码:{{orderList.lockRealtimePassword}}</view>
 			<view class="two-order-shui" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">水起码:{{orderList.startOfWater}}吨</view>
 			<view class="two-order-shui" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">水起码:{{orderList.startOfWater}}吨</view>
 			<view class="two-order-dian" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">电起码:{{orderList.startOfElectric}}度</view>
 			<view class="two-order-dian" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">电起码:{{orderList.startOfElectric}}度</view>
 			<view class="two-order-shui2" v-if="orderList.orderStatu == 5||orderList.orderStatu == 4">水起码:{{orderList.startOfWater}}吨</view>
 			<view class="two-order-shui2" v-if="orderList.orderStatu == 5||orderList.orderStatu == 4">水起码:{{orderList.startOfWater}}吨</view>
@@ -75,6 +76,14 @@
 		</view>
 		</view>
 		
 		
 		<view class="order-mark">您的满意是我们最大的追求</view>
 		<view class="order-mark">您的满意是我们最大的追求</view>
+		<!-- 提示时弹框 -->
+		<uni-popup ref="popup_order2" type="dialog">
+			<uni-popup-dialog :type="msgType2" cancelText="关闭" confirmText="确定" :content='order_txt2' @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" :content='order_txt'></uni-popup-dialog>
+		</uni-popup>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -85,6 +94,13 @@
 				orderList:'',//订单整体
 				orderList:'',//订单整体
 				orderId:'',//订单号
 				orderId:'',//订单号
 				billXin:'',//结账信息
 				billXin:'',//结账信息
+				order_txt:'',//弹框提示信息
+				msgType:'warn',
+				msgType2:'warn',
+				order_txt:'',//
+				order_txt2:'',//
+				tankuang:false,//弹框是否确定
+				order_txt_id:'',
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
@@ -121,6 +137,53 @@
 					}
 					}
 				  });
 				  });
 			},
 			},
+			//待确认的弹框操作
+			dialogConfirm() {
+				this.$refs.popup_order2.close()
+				this.tankuang=true
+				if(this.tankuang==true) {
+					if(this.order_txt2=='确定删除?') {
+						this.getOrderDelete(this.order_txt_id)
+					} else if(this.order_txt2=='确定退房?') {
+						this.getOrderReturn(this.order_txt_id)
+					} else if(this.order_txt2=='确定入住?') {
+						this.getOrderHold(this.order_txt_id)
+					} else if(this.order_txt2=='确定取消订单?') {
+						this.getOrderCancel(this.order_txt_id)
+					}
+				} 
+			},
+			dialogClose(){
+				this.$refs.popup_order2.close()
+			},
+			//删除弹框
+			openDel(orderId,type){
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定删除?'
+				this.$refs.popup_order2.open()
+			},
+			//退房弹框
+			openTui(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定退房?'
+				this.$refs.popup_order2.open()
+			},
+			//入住弹框
+			openRu(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定入住?'
+				this.$refs.popup_order2.open()
+			},
+			//取消订单弹框
+			openQu(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定取消订单?'
+				this.$refs.popup_order2.open()
+			},
 			// 订单结账信息
 			// 订单结账信息
 			getOrderBill() {
 			getOrderBill() {
 				  let _self = this
 				  let _self = this
@@ -149,16 +212,18 @@
 				})
 				})
 			},
 			},
 			// 待支付取消订单
 			// 待支付取消订单
-			getOrderCancel(orderId) {
+			getOrderCancel(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/cancel/${orderId}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/cancel/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('取消成功')
+						this.order_txt='取消成功'
+						this.$refs.popup_order.open()
 						this.getOrderInfo()
 						this.getOrderInfo()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
@@ -181,58 +246,64 @@
 							window.location.href = res.data.payUrl;
 							window.location.href = res.data.payUrl;
 						}
 						}
 					} else {
 					} else {
-						alert(res.message)
-					  console.log('支付失败')
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+						console.log('支付失败')
 					}
 					}
 				  });
 				  });
 			},
 			},
 			// 删除订单
 			// 删除订单
-			getOrderDelete(orderId) {
+			getOrderDelete(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.delete(`/ihotel/hotelOrder/user/order/${orderId}`,).then(res => {
+				this.$axios.delete(`/ihotel/hotelOrder/user/order/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('删除订单成功')
+						this.order_txt='删除订单成功'
+						this.$refs.popup_order.open()
 						this.getOrderInfo()
 						this.getOrderInfo()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
 			// 订单已完成再次预订
 			// 订单已完成再次预订
-			navigateToWanchengZaici(){
-				uni.navigateBack({
-					delta:5
+			navigateToWanchengZaici(roomTypeId){
+				uni.navigateTo({
+					url:'../order_room/order_room?roomTypeId='+roomTypeId
 				})
 				})
 			},
 			},
 			// 办理入住
 			// 办理入住
-			getOrderHold(orderId) {
+			getOrderHold(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/hold/${orderId}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						alert('办理入住成功')
-						this.getOrderInfo()()
+						this.order_txt='办理入住成功'
+						this.$refs.popup_order.open()
+						this.getOrderInfo()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
 			// 办理退房
 			// 办理退房
-			getOrderReturn(orderId) {
+			getOrderReturn(order_txt_id) {
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
-				this.$axios.put(`/ihotel/hotelOrder/user/order/return/${orderId}`,).then(res => {
+				this.$axios.put(`/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`,).then(res => {
 					res = res.data
 					res = res.data
 					if (res.success) {
 					if (res.success) {
-						console.log(res)
-						alert('退房成功')
+						this.order_txt='退房成功'
+						this.$refs.popup_order.open()
 						this.getOrderInfo()
 						this.getOrderInfo()
 						this.getOrderBill()
 						this.getOrderBill()
 					} else {
 					} else {
-						alert(res.message)
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},

+ 11 - 0
pages/order_room/css/order_room.css

@@ -303,4 +303,15 @@
     background-color: #0055ff;
     background-color: #0055ff;
     color: #fff;
     color: #fff;
 	opacity: 1;
 	opacity: 1;
+}
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
 }
 }

+ 56 - 19
pages/order_room/order_room.vue

@@ -62,8 +62,8 @@
 			</view>
 			</view>
 			<view class="three-mark">本人可以免费入住,需要预交费<text style="color: rgba(255, 87, 51, 1);">{{payMount}}</text>元,即可享受权益</view>
 			<view class="three-mark">本人可以免费入住,需要预交费<text style="color: rgba(255, 87, 51, 1);">{{payMount}}</text>元,即可享受权益</view>
-			<view class="three-zhu">注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度数
-         为10度,超出标准需在预付款中扣除,未超出原路返回预付款</view>
+			<!-- <view class="three-zhu">注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度数
+         为10度,超出标准需在预付款中扣除,未超出原路返回预付款</view> -->
 		</view>
 		</view>
 		<!-- 注释 -->
 		<!-- 注释 -->
 		<view class="zhushi">
 		<view class="zhushi">
@@ -76,9 +76,14 @@
 			<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥{{payMount}}</view>
 			<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥{{payMount}}</view>
 			<view class="fu-zhifu" :class="{'room-button2': freeRoom == 0}">
 			<view class="fu-zhifu" :class="{'room-button2': freeRoom == 0}">
 				<text v-if="freeRoom==0">房间已满</text>
 				<text v-if="freeRoom==0">房间已满</text>
-				<text v-else @click="getOrderSubmit()">立即支付</text>
+				<text v-else @click="getOrderSubmit('warn')">立即支付</text>
 			</view>
 			</view>
 		</view>
 		</view>
+		<!-- 提交订单时弹框 -->
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" :content="order_txt" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
 		
 		
 	</view>
 	</view>
 </template>
 </template>
@@ -152,26 +157,31 @@
 				payMount:0,//应付金额
 				payMount:0,//应付金额
 				freeRoom:0,//剩余房间
 				freeRoom:0,//剩余房间
 				ruzhu_num:1,//入住夜晚
 				ruzhu_num:1,//入住夜晚
+				order_txt:'',//提交订单时信息
+				msgType:'warn',
 			}
 			}
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			console.log(option)
 			console.log(option)
-			this.payMount=Number(option.payMount)
-			this.ruzhu_num=option.ruzhu_num
-			this.freeRoom=option.freeRoom
+			// this.payMount=Number(option.payMount)
+			// this.ruzhu_num=option.ruzhu_num
+			// this.freeRoom=option.freeRoom
 			this.roomTypeId=option.roomTypeId
 			this.roomTypeId=option.roomTypeId
 			this.typeName=option.typeName
 			this.typeName=option.typeName
 			this.startTime=option.startTime
 			this.startTime=option.startTime
 			this.endTime=option.endTime
 			this.endTime=option.endTime
-			this.startDate=option.enableStartTime
-			this.endDate=option.enableEndTime
+			this.startDate=option.enableStartTime.substring(0,11)+"12:00:00"
+			this.endDate=option.enableEndTime.substring(0,11)+"14:00:00"
 			this.startWeek=this.getweekday(this.startDate)
 			this.startWeek=this.getweekday(this.startDate)
 			this.endWeek=this.getweekday(this.endDate)
 			this.endWeek=this.getweekday(this.endDate)
 			this.mayTime=this.startDate.substring(0,11)+"18:00:00"
 			this.mayTime=this.startDate.substring(0,11)+"18:00:00"
 			// console.log(this.getweekday(this.startDate))
 			// console.log(this.getweekday(this.startDate))
-			this.getUserInfo()
 			this.getTokenSubmit()
 			this.getTokenSubmit()
 		},
 		},
+		mounted() {
+			this.getUserInfo()
+			this.getOrderConfirm('warn')
+		},
 		onReady() {
 		onReady() {
 			this.$nextTick(() => {
 			this.$nextTick(() => {
 				this.showCalendar = true
 				this.showCalendar = true
@@ -181,6 +191,11 @@
 				this.info.date = getDate(new Date()).fullDate
 				this.info.date = getDate(new Date()).fullDate
 				this.info.startDate = getDate(new Date()).fullDate
 				this.info.startDate = getDate(new Date()).fullDate
 				this.info.endDate =  getDate(new Date(),6).fullDate
 				this.info.endDate =  getDate(new Date(),6).fullDate
+				this.startTime = getDate(new Date()).fullTime
+				this.endTime = getDate(new Date(),1).fullTime
+				this.startWeek = getDate(new Date()).sWeek
+				this.endWeek = getDate(new Date(),1).eWeek
+				this.ruzhu_num=1
 			}, 20)
 			}, 20)
 		},
 		},
 		methods: {
 		methods: {
@@ -214,7 +229,7 @@
 					if (res.success) {
 					if (res.success) {
 						if (res.data.statu == '1') {
 						if (res.data.statu == '1') {
 						  _self.cardName=res.data.name
 						  _self.cardName=res.data.name
-						  _self.cardPhone=res.data.cardNumber
+						  _self.cardPhone=res.data.telPhone
 						  _self.cardIdentity=res.data.identityType
 						  _self.cardIdentity=res.data.identityType
 						}else {
 						}else {
 							alert('您没有权限,请联系客服')
 							alert('您没有权限,请联系客服')
@@ -224,9 +239,24 @@
 					}
 					}
 				  });
 				  });
 			},
 			},
+			// 确认订单
+			getOrderConfirm(type) {
+				let _self = this
+				this.$axios.get("/ihotel/hotelOrder/user/order/confirm?startTime="+this.startDate.substring(0,10)+"&endTime="+this.endDate.substring(0,10)+'&roomTypeId='+this.roomTypeId).then(res => {
+					res = res.data
+					if (res.success) {
+					  this.payMount=res.data.totalAmount
+					  this.freeRoom=res.data.freeNum
+					  this.ruzhu_num=res.data.nums
+					} else {
+						this.msgType = type
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
 			// 提交订单
 			// 提交订单
-			getOrderSubmit() {
-				console.log('提交')
+			getOrderSubmit(type) {
 				this.payUrl=''
 				this.payUrl=''
 				let _self = this
 				let _self = this
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
 				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
@@ -255,8 +285,9 @@
 						}
 						}
 						
 						
 					} else {
 					} else {
-						alert(res.message)
-					  console.log('提交订单失败')
+						this.msgType = type
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
 					}
 					}
 				});
 				});
 			},
 			},
@@ -288,12 +319,18 @@
 				if(e.range.before!=''&&e.range.after=='') {
 				if(e.range.before!=''&&e.range.after=='') {
 					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
 					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
 				} else if(e.range.before!=''&&e.range.after!=''){
 				} else if(e.range.before!=''&&e.range.after!=''){
-					this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
+					if((new Date(e.range.after).getTime())<(new Date(e.range.before).getTime())) {
+						this.order_txt='离店日期不能小于到店日期'
+						this.$refs.popup_order.open()
+					}else{
+						this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
+						this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
+						this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
+						this.startDate = e.range.before +' 14:00:00'
+						this.endDate =  e.range.after +' 12:00:00'
+						this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
+					}
 				}
 				}
-				this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
-				this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
-				this.startDate = e.range.before +' 14:00:00'
-				this.endDate =  e.range.after +' 12:00:00'
 			},
 			},
 			//选择器
 			//选择器
 			bindPickerChange: function(e) {
 			bindPickerChange: function(e) {

+ 0 - 1
pages/zhifuchenggong/zhifuchenggong.vue

@@ -22,7 +22,6 @@
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			this.orderId=option.orderId
 			this.orderId=option.orderId
-			console.log(this.orderId)
 		},
 		},
 		methods: {
 		methods: {
 			success() {
 			success() {