소스 검색

no message

xiaoxin 2 년 전
부모
커밋
c1d87c0557
44개의 변경된 파일613개의 추가작업 그리고 782개의 파일을 삭제
  1. 12 24
      pages.json
  2. 2 14
      pages/affirmOrder/affirmOrder.vue
  3. 75 0
      pages/authorization/authorization.vue
  4. 21 28
      pages/detail/detail.vue
  5. 3 1
      pages/detailInfo/detailInfo.vue
  6. 5 1
      pages/home/home.vue
  7. 4 110
      pages/index/index.vue
  8. 3 3
      pages/my/my.vue
  9. 79 35
      pages/orderDetail/orderDetail.vue
  10. 137 97
      pages/orderManage/orderManage.vue
  11. 52 26
      pages/pay/pay.vue
  12. 41 29
      pages/payStatus/payStatus.vue
  13. 115 103
      pages/push/push.vue
  14. 0 139
      pages/search/search.vue
  15. 38 18
      pages/set/set.vue
  16. 0 149
      pages/setMeal/setMeal.vue
  17. 5 3
      pages/shopInfo/shopInfo.vue
  18. 17 0
      pages/web/web.vue
  19. BIN
      static/images/search-active.png
  20. BIN
      static/images/search.png
  21. BIN
      static/images/setMeal-active.png
  22. BIN
      static/images/setMeal.png
  23. BIN
      static/index/air.png
  24. BIN
      static/index/bed.png
  25. BIN
      static/index/brekker.png
  26. BIN
      static/index/lock.png
  27. BIN
      static/index/meeting.png
  28. BIN
      static/index/parking.png
  29. BIN
      static/index/smoke.png
  30. BIN
      static/index/wifi.png
  31. BIN
      static/index/window.png
  32. BIN
      static/my/portrait.jpg
  33. BIN
      static/my/portrait.png
  34. BIN
      static/my/test.png
  35. BIN
      static/search/icon.png
  36. BIN
      static/search/icon2.png
  37. BIN
      static/search/icon3.png
  38. BIN
      static/search/icon4.png
  39. BIN
      static/search/icon5.png
  40. BIN
      static/search/icon6.png
  41. BIN
      static/search/icon7.png
  42. BIN
      static/search/icon8.png
  43. BIN
      static/search/img.png
  44. 4 2
      util/api.js

+ 12 - 24
pages.json

@@ -21,18 +21,6 @@
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
 		}, {
 		}, {
-			"path": "pages/search/search",
-			"style": {
-				"navigationBarTitleText": "服务大厅",
-				"enablePullDownRefresh": false
-			}
-		}, {
-			"path": "pages/setMeal/setMeal",
-			"style": {
-				"navigationBarTitleText": "精品套餐",
-				"enablePullDownRefresh": false
-			}
-		}, {
 			"path": "pages/set/set",
 			"path": "pages/set/set",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "设置",
 				"navigationBarTitleText": "设置",
@@ -132,6 +120,18 @@
 				"navigationBarTitleText": "我是业主",
 				"navigationBarTitleText": "我是业主",
 				"enablePullDownRefresh": false
 				"enablePullDownRefresh": false
 			}
 			}
+		}, {
+			"path": "pages/authorization/authorization",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/web/web",
+			"style": {
+				"navigationBarTitleText": "数据中台",
+				"enablePullDownRefresh": false
+			}
 		}
 		}
 	],
 	],
 	"tabBar": {
 	"tabBar": {
@@ -145,18 +145,6 @@
 				"selectedIconPath": "static/images/index-active.png",
 				"selectedIconPath": "static/images/index-active.png",
 				"text": "首页"
 				"text": "首页"
 			},
 			},
-			// {
-			// 	"pagePath": "pages/setMeal/setMeal",
-			// 	"iconPath": "static/images/setMeal.png",
-			// 	"selectedIconPath": "static/images/setMeal-active.png",
-			// 	"text": "套餐"
-			// },
-			// {
-			// 	"pagePath": "pages/search/search",
-			// 	"iconPath": "static/images/search.png",
-			// 	"selectedIconPath": "static/images/search-active.png",
-			// 	"text": "服务"
-			// },
 			{
 			{
 				"pagePath": "pages/my/my",
 				"pagePath": "pages/my/my",
 				"iconPath": "static/images/my.png",
 				"iconPath": "static/images/my.png",

+ 2 - 14
pages/affirmOrder/affirmOrder.vue

@@ -25,13 +25,10 @@
 				<view class="info_msg">{{ info.item.hName }}</view>
 				<view class="info_msg">{{ info.item.hName }}</view>
 				<view class="info_type">
 				<view class="info_type">
 					<view class="type_item">包吃住型</view>
 					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
 				</view>
 				</view>
 				<view class="info_tag">
 				<view class="info_tag">
 					<view class="tag_item">{{ info.item.hAreas }}㎡</view>
 					<view class="tag_item">{{ info.item.hAreas }}㎡</view>
-					<view class="tag_item">双人床</view>
-					<view class="tag_item">窗户位于走廊/窗户较小</view>
+					<view class="tag_item" v-for="tag in info.item.hConfigList" :key="tag.id">{{ tag.name }}</view>
 				</view>
 				</view>
 			</view>
 			</view>
 
 
@@ -237,17 +234,8 @@ export default {
 			})
 			})
 			// console.log(res)
 			// console.log(res)
 			if (res.code === 200) {
 			if (res.code === 200) {
-				let info = JSON.stringify({
-					detaliInfo: this.info,
-					houseOrderNumber: this.roomCount,
-					userName: this.clientName,
-					userPhone: this.clientPhone,
-					price: this.roomCount * this.info.item.price * this.info.nightNum,
-					orderNo: res.data
-				})
-
 				uni.navigateTo({
 				uni.navigateTo({
-					url: `/pages/pay/pay?info=${info}`
+					url: `/pages/pay/pay?id=${res.data}`
 				})
 				})
 			}
 			}
 		},
 		},

+ 75 - 0
pages/authorization/authorization.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="container"></view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			type: null
+		}
+	},
+	onLoad(options) {
+		this.type = options.type
+		this.handleClick(this.type)
+	},
+	methods: {
+		handleClick(type) {
+			// 1为商户,2为业主
+			uni.login({
+				provider: 'weixin',
+				success: (res) => {
+					this.handleQuery(type, res.code)
+				}
+			})
+		},
+		// 查询请求
+		async handleQuery(type, code) {
+			if (type === 1) {
+				// 查询商家是否绑定
+				const res = await this.$myRequest({
+					url: '/mhotel/appget_user_ma.action',
+					data: {
+						code
+					}
+				})
+				if (res.code === 200) {
+					let data = JSON.stringify(res.data)
+					uni.navigateTo({
+						url: `/pages/shopInfo/shopInfo?type=1&data=${data}`
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/shop/shop'
+					})
+				}
+			} else if (type === 2) {
+				// 查询业主是否已绑定
+				const res = await this.$myRequest({
+					url: '/mhotel/appgetUser.action',
+					data: {
+						code
+					}
+				})
+				if (res.code === 200) {
+					let data = JSON.stringify(res.data)
+					uni.navigateTo({
+						url: `/pages/shopInfo/shopInfo?type=2&data=${data}`
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/shop2/shop2'
+					})
+				}
+			}
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	height: 100vh;
+	background-color: #fff;
+}
+</style>

+ 21 - 28
pages/detail/detail.vue

@@ -1,9 +1,8 @@
 <template>
 <template>
-	<view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')">
+	<view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')" v-if="info">
 		<!-- 顶部民宿图片区域 -->
 		<!-- 顶部民宿图片区域 -->
 		<view class="banner">
 		<view class="banner">
 			<img class="img" :src="info.coverImg" />
 			<img class="img" :src="info.coverImg" />
-
 			<view class="slogan">
 			<view class="slogan">
 				<img src="../../static/index/slogan.png" />
 				<img src="../../static/index/slogan.png" />
 			</view>
 			</view>
@@ -14,7 +13,7 @@
 			<view class="detail_name">{{ info.hname }}</view>
 			<view class="detail_name">{{ info.hname }}</view>
 
 
 			<view class="detail_info">
 			<view class="detail_info">
-				<view class="info_left">{{ info.fitupTime }}装修|{{ info.openTime }}开业</view>
+				<view class="info_left">{{ info.fitupTime }}装修 | {{ info.openTime }}开业</view>
 				<view class="info_right" @click="goPageDetailInfo">
 				<view class="info_right" @click="goPageDetailInfo">
 					设施/详情
 					设施/详情
 					<img src="../../static/index/right.png" />
 					<img src="../../static/index/right.png" />
@@ -86,9 +85,9 @@
 					<view class="box_center">
 					<view class="box_center">
 						<view class="center_top">{{ item.hName }}</view>
 						<view class="center_top">{{ item.hName }}</view>
 						<view class="center_center">
 						<view class="center_center">
-							<view class="center_item">{{ item.hAreas }}㎡</view>
-							<view class="center_item">大床</view>
-							<view class="center_item">无早</view>
+							<view class="center_item" v-if="item.hAreas">{{ item.hAreas }}㎡</view>
+							<!-- <view class="center_item">大床</view>
+							<view class="center_item">无早</view> -->
 						</view>
 						</view>
 						<view class="center_bottom">
 						<view class="center_bottom">
 							<img v-for="item2 in item.hConfigList" :key="item2.id" class="img" :src="item2.fileUrl" />
 							<img v-for="item2 in item.hConfigList" :key="item2.id" class="img" :src="item2.fileUrl" />
@@ -100,7 +99,7 @@
 							<text>¥</text>
 							<text>¥</text>
 							{{ item.price }}
 							{{ item.price }}
 						</view>
 						</view>
-						<view class="right_btn" :class="{ inactive: item.remainRooms * 1 < 0 }" @click.stop="goPageAffOrder(item)">订</view>
+						<view class="right_btn" :class="{ inactive: item.remainRooms * 1 <= 0 }" @click.stop="goPageAffOrder(item)">订</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
@@ -123,17 +122,9 @@
 									<img class="img" src="../../static/index/place.png" />
 									<img class="img" src="../../static/index/place.png" />
 									{{ roomInfo.hAreas }}㎡
 									{{ roomInfo.hAreas }}㎡
 								</view>
 								</view>
-								<view class="tags_item">
-									<img class="img" src="../../static/index/bed.png" />
-									1张大床房
-								</view>
-								<view class="tags_item">
-									<img class="img" src="../../static/index/wifi.png" />
-									wifi免费
-								</view>
-								<view class="tags_item">
-									<img class="img" src="../../static/index/window.png" />
-									窗户位于走廊/窗户较小
+								<view class="tags_item" v-for="item2 in roomInfo.hConfigList" :key="item2.id">
+									<img class="img" :src="item2.fileUrl" />
+									{{ item2.name }}
 								</view>
 								</view>
 							</view>
 							</view>
 							<view class="body_title2">费用明细</view>
 							<view class="body_title2">费用明细</view>
@@ -162,7 +153,7 @@
 								<view class="bottom_right">
 								<view class="bottom_right">
 									<text>¥</text>
 									<text>¥</text>
 									{{ roomInfo.price }}
 									{{ roomInfo.price }}
-									<view class="btn" :class="{ inactive: roomInfo.remainRooms * 1 < 0 }" @click="goPageAffOrder(roomInfo)">预定</view>
+									<view class="btn" :class="{ inactive: roomInfo.remainRooms * 1 <= 0 }" @click="goPageAffOrder(roomInfo)">预定</view>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -203,7 +194,7 @@ export default {
 			// 日历默认选择日期
 			// 日历默认选择日期
 			defaultDateMultiple: [],
 			defaultDateMultiple: [],
 			// 酒店信息
 			// 酒店信息
-			info: {},
+			info: null,
 			// 房间信息
 			// 房间信息
 			roomInfo: {},
 			roomInfo: {},
 			// 民宿Id
 			// 民宿Id
@@ -438,13 +429,13 @@ export default {
 	}
 	}
 
 
 	.detail {
 	.detail {
-		position: absolute;
-		top: 265rpx;
-		left: 20rpx;
+		z-index: 1;
+		float: left;
+		margin: auto;
+		margin-top: -177rpx;
 		box-sizing: border-box;
 		box-sizing: border-box;
-		padding: 0 30rpx;
+		padding: 0 30rpx 30rpx;
 		width: 710rpx;
 		width: 710rpx;
-		height: 254rpx;
 		border-radius: 10rpx;
 		border-radius: 10rpx;
 		background-color: #fff;
 		background-color: #fff;
 
 
@@ -482,11 +473,13 @@ export default {
 			display: flex;
 			display: flex;
 			flex-wrap: wrap;
 			flex-wrap: wrap;
 			margin-top: 5rpx;
 			margin-top: 5rpx;
+			width: 450rpx;
 
 
 			.group_item {
 			.group_item {
 				display: flex;
 				display: flex;
 				align-items: center;
 				align-items: center;
 				margin-right: 10rpx;
 				margin-right: 10rpx;
+				margin-bottom: 10rpx;
 				color: #999999;
 				color: #999999;
 				font-size: 20rpx;
 				font-size: 20rpx;
 
 
@@ -536,9 +529,9 @@ export default {
 	}
 	}
 
 
 	.body {
 	.body {
-		position: absolute;
-		top: 539rpx;
-		left: 20rpx;
+		float: left;
+		margin: auto;
+		margin-top: 20rpx;
 		padding-bottom: 30rpx;
 		padding-bottom: 30rpx;
 		width: 710rpx;
 		width: 710rpx;
 		border-radius: 10rpx;
 		border-radius: 10rpx;

+ 3 - 1
pages/detailInfo/detailInfo.vue

@@ -219,11 +219,13 @@ export default {
 
 
 		.body_address {
 		.body_address {
 			display: flex;
 			display: flex;
+			padding-right: 20rpx;
 			height: auto;
 			height: auto;
 			line-height: 55rpx;
 			line-height: 55rpx;
+			font-size: 28rpx;
 
 
 			.address_text {
 			.address_text {
-				// width: 125rpx;
+				width: 105rpx;
 			}
 			}
 
 
 			img {
 			img {

+ 5 - 1
pages/home/home.vue

@@ -25,7 +25,7 @@
 				<image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
 				<image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
 				<view class="descrition">
 				<view class="descrition">
 					<text class="title">{{ item.hname }}</text>
 					<text class="title">{{ item.hname }}</text>
-					<text class="type">{{ item.htype }}型</text>
+					<text class="type">{{ item.hTypeName }}</text>
 					<text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
 					<text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
 					<view class="detail">
 					<view class="detail">
 						<img class="img" src="../../static/index/hotel.png" />
 						<img class="img" src="../../static/index/hotel.png" />
@@ -347,10 +347,14 @@ export default {
 					font-weight: 600;
 					font-weight: 600;
 					padding: 20rpx 20rpx 10rpx;
 					padding: 20rpx 20rpx 10rpx;
 					color: rgba(0, 0, 0, 1);
 					color: rgba(0, 0, 0, 1);
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
 				}
 				}
 
 
 				.type {
 				.type {
 					padding: 5rpx 20rpx;
 					padding: 5rpx 20rpx;
+					height: 40rpx;
 					font-size: 24rpx;
 					font-size: 24rpx;
 					color: #a6a6a6;
 					color: #a6a6a6;
 				}
 				}

+ 4 - 110
pages/index/index.vue

@@ -1,124 +1,18 @@
 <template>
 <template>
-	<view class="container">
-		<button @click="handleLogin">登录获取code</button>
-		<button @click="handleToken">获取access_token</button>
-		<button @click="handleUserInfo">获取用户信息</button>
-		<button @click="handleClick">订阅</button>
-		<button @click="handleClick2">设置</button>
-		<button @click="handleGo">跳转</button>
-	</view>
+	<view class="container"></view>
 </template>
 </template>
 
 
 <script>
 <script>
 export default {
 export default {
 	data() {
 	data() {
-		return {
-			// 订单进度模版id
-			templateOrder: 'ERU1ZY9IqwNkDxWyFJvo5VSE7ua-wey3SqhZgjqLDtU',
-			// 小程序Id
-			appid: 'wx2fc3f45732fae5d3',
-			// 小程序密钥
-			screct: '7eee4a49a4470a77f9222995e8511547',
-			access_token: '',
-			code: ''
-		}
+		return {}
 	},
 	},
 	onLoad() {
 	onLoad() {
 		uni.switchTab({
 		uni.switchTab({
 			url: '/pages/home/home'
 			url: '/pages/home/home'
 		})
 		})
 	},
 	},
-	methods: {
-		handleGo() {
-			uni.navigateTo({
-				url: '/pages/shouquan/shouquan'
-			})
-		},
-		handleLogin() {
-			uni.login({
-				provider: 'weixin', //使用微信登录
-				success: (loginRes) => {
-					console.log(loginRes)
-					this.code = loginRes.code
-				}
-			})
-		},
-		handleToken() {
-			uni.request({
-				url: 'https://api.weixin.qq.com/sns/jscode2session',
-				data: {
-					grant_type: 'authorization_code',
-					appid: this.appid,
-					appsecret: this.screct,
-					js_code: this.code
-				},
-				success: (res) => {
-					console.log(res)
-					if (res.statusCode === 200) {
-						// this.access_token = res.data.
-					}
-				}
-			})
-		},
-
-		handleUserInfo() {
-			uni.getUserProfile({
-				desc: '用于完善用户资料',
-				lang: 'zh_CN',
-				success: (res) => {
-					console.log('res', res)
-				}
-			})
-		},
-		// 订阅方法
-		handleClick() {
-			if (uni.requestSubscribeMessage) {
-				uni.requestSubscribeMessage({
-					tmplIds: [this.templateOrder],
-					success: (res) => {
-						console.log(1)
-						console.log(res)
-						for (let key in res) {
-							console.log(key)
-							if (res[key] === 'accept') {
-								uni.showToast({
-									title: '订阅成功',
-									icon: 'success',
-									mask: true
-								})
-							} else if (res[key] === 'reject') {
-								uni.showToast({
-									title: '订阅失败',
-									icon: 'none',
-									mask: true
-								})
-							}
-						}
-					},
-					fail: (res) => {
-						console.log(2)
-						console.log(res)
-					}
-				})
-			} else {
-				uni.showToast({
-					title: '请更新您的微信版本来获取订阅消息功能',
-					icon: 'none'
-				})
-			}
-		},
-		// 设置方法
-		handleClick2() {
-			// 获取用户订阅消息设置
-			uni.getSetting({
-				withSubscriptions: true,
-				success: (res) => {
-					console.log(res)
-					console.log(res.subscriptionsSetting)
-				}
-			})
-		}
-	}
+	methods: {}
 }
 }
 </script>
 </script>
 
 
@@ -127,4 +21,4 @@ export default {
 	height: 100vh;
 	height: 100vh;
 	background-color: #fff;
 	background-color: #fff;
 }
 }
-</style>
+</style>

+ 3 - 3
pages/my/my.vue

@@ -7,20 +7,20 @@
 			<view class="title">我的</view>
 			<view class="title">我的</view>
 			<!-- 头像区域 -->
 			<!-- 头像区域 -->
 			<img class="img" v-if="flag" :src="userInfo.headPhoto" />
 			<img class="img" v-if="flag" :src="userInfo.headPhoto" />
-			<img class="img" v-else src="../../static/my/portrait.jpg" />
+			<img class="img" v-else src="../../static/my/portrait.png" />
 			<!-- 姓名区域 -->
 			<!-- 姓名区域 -->
 			<view class="name" v-if="flag">{{ userInfo.user_name }}</view>
 			<view class="name" v-if="flag">{{ userInfo.user_name }}</view>
 			<!-- 用户id区域 -->
 			<!-- 用户id区域 -->
 			<view class="number" v-if="flag">ID:{{ userInfo.id }}</view>
 			<view class="number" v-if="flag">ID:{{ userInfo.id }}</view>
 			<!-- 是否实名认证区域 -->
 			<!-- 是否实名认证区域 -->
-			<view class="real" v-if="userInfo.card_number">
+			<!-- <view class="real" v-if="userInfo.card_number">
 				<img src="../../static/my/true.png" />
 				<img src="../../static/my/true.png" />
 				已实名认证
 				已实名认证
 			</view>
 			</view>
 			<view class="real2" v-if="flag" v-else @click="goPageCommon">
 			<view class="real2" v-if="flag" v-else @click="goPageCommon">
 				去认证
 				去认证
 				<img src="../../static/my/right2.png" />
 				<img src="../../static/my/right2.png" />
-			</view>
+			</view> -->
 
 
 			<view class="login" v-if="!flag" @click="goPageLogin">去登录</view>
 			<view class="login" v-if="!flag" @click="goPageLogin">去登录</view>
 		</view>
 		</view>

+ 79 - 35
pages/orderDetail/orderDetail.vue

@@ -32,15 +32,21 @@
 
 
 			<view class="header_btn">
 			<view class="header_btn">
 				<!-- hotelIsCanorder  1可取消,0不可 -->
 				<!-- hotelIsCanorder  1可取消,0不可 -->
-				<view class="btn_box" v-if="info.orderStatus === '1'" @click="handlePay">去支付 ¥{{ info.houseTotalPrice }}.00</view>
-				<view class="btn_box" v-if="((info.orderStatus === '2' || info.orderStatus === '3') && info.hotelIsCanorder=='1') || info.orderStatus === '1'" @click="handleCancel">取消订单</view>
+				<view class="btn_box" v-if="info.orderStatus === '1'" @click="handlePay">去支付 ¥{{ info.houseTotalPrice }}</view>
+				<view
+					class="btn_box"
+					v-if="((info.orderStatus === '2' || info.orderStatus === '3') && info.hotelIsCanorder == '1') || info.orderStatus === '1'"
+					@click="handleCancel"
+				>
+					取消订单
+				</view>
 				<view class="btn_box" v-if="info.orderStatus * 1 > 3" @click="handleAgain">再次预定</view>
 				<view class="btn_box" v-if="info.orderStatus * 1 > 3" @click="handleAgain">再次预定</view>
-				<view class="btn_box" @click="handleDelete" v-if="info.orderStatus === '5' || info.orderStatus === '7' || info.orderStatus === '8' || info.orderStatus === '9'">删除订单</view>
+				<view class="btn_box" @click="handleDelete" v-if="info.orderStatus === '5' || info.orderStatus === '7' || info.orderStatus === '8' || info.orderStatus === '9'">
+					删除订单
+				</view>
 			</view>
 			</view>
 
 
-			<view class="header_msg" v-if="info.orderStatus === '1'">预定成功后,07月26日12:00前可免费取消</view>
-			<view class="header_msg" v-if="info.orderStatus === '3' || info.orderStatus === '6'">办理入住前,您均可取消订单</view>
-			<view class="header_msg" v-if="info.orderStatus === '8'">您的订单被商家退款了,请重新预定</view>
+			<!-- <view class="header_msg" v-if="info.orderStatus === '1'">预定成功后,07月26日12:00前可免费取消</view> -->
 		</view>
 		</view>
 
 
 		<!-- 主体内容区域 -->
 		<!-- 主体内容区域 -->
@@ -82,23 +88,19 @@
 			<!-- 房型信息和用户信息区域 -->
 			<!-- 房型信息和用户信息区域 -->
 			<view class="body_box2">
 			<view class="body_box2">
 				<view class="info_time">
 				<view class="info_time">
-					{{info.orderStartTime.slice(5,7)}}月{{info.orderStartTime.slice(8,10)}}日
-					<!-- <text class="gap">今天</text> -->
+					{{ (info.orderStartTime || '').slice(5, 7) }}月{{ (info.orderStartTime || '').slice(8, 10) }}日
 					<view class="time_line"></view>
 					<view class="time_line"></view>
-					<view class="time_num">{{info.houseOrderNumber}}晚</view>
+					<view class="time_num">{{ info.orderLiveTime }}</view>
 					<view class="time_line"></view>
 					<view class="time_line"></view>
-					<view class="gap">{{info.checkOutTime.slice(5,7)}}月{{info.checkOutTime.slice(8,10)}}日</view>
-					<!-- <text>明天</text> -->
+					<view class="gap">{{ (info.orderStartTime || '').slice(5, 7) }}月{{ (info.checkOutTime || '').slice(8, 10) }}日</view>
 				</view>
 				</view>
-				<view class="info_msg">{{info.houseName}}</view>
+				<view class="info_msg">{{ info.houseName }}</view>
 				<view class="info_type">
 				<view class="info_type">
 					<view class="type_item">包吃住型</view>
 					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
 				</view>
 				</view>
 				<view class="info_tag">
 				<view class="info_tag">
-					<view class="tag_item">{{info.houseAreas}}㎡</view>
-					<view class="tag_item">{{info.houseName}}</view>
+					<view class="tag_item" v-if="info.houseAreas">{{ info.houseAreas }}㎡</view>
+					<view class="tag_item">{{ info.houseName }}</view>
 					<view class="tag_item">窗户位于走廊/窗户较小</view>
 					<view class="tag_item">窗户位于走廊/窗户较小</view>
 				</view>
 				</view>
 				<view class="info_box">
 				<view class="info_box">
@@ -120,12 +122,12 @@
 				<view class="box_title">订单信息</view>
 				<view class="box_title">订单信息</view>
 				<view class="box_container">
 				<view class="box_container">
 					<view class="container_key">订单号</view>
 					<view class="container_key">订单号</view>
-					<view class="container_value">{{info.orderNum}}</view>
+					<view class="container_value">{{ info.orderNum }}</view>
 					<view class="container_copy" @click="handleCopy(info.orderNum)">复制</view>
 					<view class="container_copy" @click="handleCopy(info.orderNum)">复制</view>
 				</view>
 				</view>
 				<view class="box_container">
 				<view class="box_container">
 					<view class="container_key">下单时间</view>
 					<view class="container_key">下单时间</view>
-					<view class="container_value">{{ info.createTime }}</view>
+					<view class="container_value">{{ (info.createTime || '').slice(0, 19) }}</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -137,15 +139,29 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			// 详细信息
 			// 详细信息
-			info: {}
+			info: {},
+			// 订单ID
+			id: ''
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
-		console.log(options)
-		this.info = JSON.parse(options.info)
-		console.log(this.info)
+		this.id = options.id
+		this.getData()
 	},
 	},
 	methods: {
 	methods: {
+		// 获取订单信息
+		async getData() {
+			const res = await this.$myRequest({
+				url: '/mhotel/ampgetBookingById.action',
+				data: {
+					bookingId: this.id
+				}
+			})
+			// console.log(res)
+			if (res.code === 200) {
+				this.info = res.data
+			}
+		},
 		// 点击复制文字回调
 		// 点击复制文字回调
 		handleCopy(text) {
 		handleCopy(text) {
 			uni.setClipboardData({
 			uni.setClipboardData({
@@ -204,7 +220,7 @@ export default {
 		// 点击去支付按钮回调
 		// 点击去支付按钮回调
 		handlePay() {
 		handlePay() {
 			uni.navigateTo({
 			uni.navigateTo({
-				url: '/pages/pay/pay'
+				url: `/pages/pay/pay?id=${this.id}`
 			})
 			})
 		},
 		},
 		// 点击取消订单按钮回调
 		// 点击取消订单按钮回调
@@ -217,19 +233,18 @@ export default {
 						const result = await this.$myRequest({
 						const result = await this.$myRequest({
 							url: '/mhotel/abkcancelBooking.action',
 							url: '/mhotel/abkcancelBooking.action',
 							data: {
 							data: {
-								bookingId:this.info.id,
+								bookingId: this.info.id,
+								open_id: uni.getStorageSync('openid')
 							}
 							}
 						})
 						})
 						if (result.code === 200) {
 						if (result.code === 200) {
 							uni.showToast({
 							uni.showToast({
-								title: '取消成功',
-								icon: 'success',
+								title: '取消成功,' + result.message,
+								icon: 'none',
 								mask: true
 								mask: true
 							})
 							})
 							setTimeout(() => {
 							setTimeout(() => {
-								uni.redirectTo({
-									url: '/pages/orderManage/orderManage'
-								})
+								uni.navigateBack(1)
 							}, 1500)
 							}, 1500)
 						}
 						}
 					}
 					}
@@ -238,8 +253,38 @@ export default {
 		},
 		},
 		// 点击再次预定按钮回调
 		// 点击再次预定按钮回调
 		handleAgain() {
 		handleAgain() {
-			uni.navigateTo({
-				url: '/pages/detail/detail'
+			uni.showModal({
+				title: '提示',
+				content: '确定再次预定吗?',
+				success: async (res) => {
+					if (res.confirm) {
+						const result = await this.$myRequest({
+							url: '/mhotel/abkcreateOrder.action',
+							data: {
+								houseId: this.info.houseId,
+								startTime: this.info.orderStartTime.slice(0, 10),
+								endTime: this.info.orderEndTime.slice(0, 10),
+								houseOrderNumber: this.info.houseOrderNumber,
+								userName: this.info.userName,
+								userPhone: this.info.userPhone,
+								userId: uni.getStorageSync('userInfo').id
+							}
+						})
+						if (result.code === 200) {
+							uni.navigateTo({
+								url: `/pages/pay/pay?id=${result.data}`
+							})
+							// uni.showToast({
+							// 	title: '预定成功',
+							// 	icon: 'success',
+							// 	mask: true
+							// })
+							// setTimeout(() => {
+							// 	uni.navigateBack(1)
+							// }, 1500)
+						}
+					}
+				}
 			})
 			})
 		},
 		},
 		// 点击删除订单按钮回调
 		// 点击删除订单按钮回调
@@ -252,7 +297,8 @@ export default {
 						const result = await this.$myRequest({
 						const result = await this.$myRequest({
 							url: '/mhotel/abkdelBooking.action',
 							url: '/mhotel/abkdelBooking.action',
 							data: {
 							data: {
-								bookingId:this.info.id,
+								bookingId: this.info.id,
+								open_id: uni.getStorageSync('openid')
 							}
 							}
 						})
 						})
 						if (result.code === 200) {
 						if (result.code === 200) {
@@ -262,9 +308,7 @@ export default {
 								mask: true
 								mask: true
 							})
 							})
 							setTimeout(() => {
 							setTimeout(() => {
-								uni.redirectTo({
-									url: '/pages/orderManage/orderManage'
-								})
+								uni.navigateBack(1)
 							}, 1500)
 							}, 1500)
 						}
 						}
 					}
 					}

+ 137 - 97
pages/orderManage/orderManage.vue

@@ -16,8 +16,7 @@
 						<view class="title">{{ item.hotelName }}</view>
 						<view class="title">{{ item.hotelName }}</view>
 						<view class="type type2" v-if="item.orderStatus === '1'">
 						<view class="type type2" v-if="item.orderStatus === '1'">
 							待支付,剩余
 							待支付,剩余
-							<uni-countdown :show-day="false" :second="countDownTime" @timeup="timeup(item.createTime)" />
-							<!-- <uv-count-down :time="countDownTime" format="mm:ss" @change="change" @finish="finish"></uv-count-down> -->
+							<uv-count-down :time="item.countDownTime" format="mm:ss" @finish="finish(item)"></uv-count-down>
 						</view>
 						</view>
 						<view class="type" v-if="item.orderStatus === '2'">已支付</view>
 						<view class="type" v-if="item.orderStatus === '2'">已支付</view>
 						<view class="type" v-if="item.orderStatus === '3'">待入住</view>
 						<view class="type" v-if="item.orderStatus === '3'">待入住</view>
@@ -32,18 +31,18 @@
 
 
 					<!-- 酒店信息区域 -->
 					<!-- 酒店信息区域 -->
 					<view class="box_info">
 					<view class="box_info">
-						<img class="img" :src="item.imgUrl || '../../static/my/test.png'" />
+						<img class="img" :src="item.imgUrl || '../../static/index/banner.png'" />
 						<view class="info_right">
 						<view class="info_right">
 							<view class="info_right_item">{{ item.houseOrderNumber }}间,{{ item.houseName }}</view>
 							<view class="info_right_item">{{ item.houseOrderNumber }}间,{{ item.houseName }}</view>
-							<view class="info_right_item">{{ item.orderStartTime.slice(0, 10) }} - {{ item.orderEndTime.slice(0, 10) }}</view>
-							<view class="info_right_item">总价:¥{{ item.houseTotalPrice }}.00</view>
+							<view class="info_right_item">{{ (item.orderStartTime || '').slice(0, 10) }} - {{ (item.orderEndTime || '').slice(0, 10) }}</view>
+							<view class="info_right_item">总价:¥{{ item.houseTotalPrice }}</view>
 						</view>
 						</view>
 					</view>
 					</view>
 
 
 					<!-- 按钮区域 -->
 					<!-- 按钮区域 -->
 					<view class="box_btn" v-if="item.orderStatus === '1' || item.orderStatus === '6'">
 					<view class="box_btn" v-if="item.orderStatus === '1' || item.orderStatus === '6'">
-						<view class="btn_item" v-if="item.orderStatus === '1'" @click.stop="goPagePay">预定</view>
-						<view class="btn_item" v-if="item.orderStatus === '6'" @click.stop="goPageDetail">再次预定</view>
+						<view class="btn_item" v-if="item.orderStatus === '1'" @click.stop="goPagePay(item)">预定</view>
+						<view class="btn_item" v-if="item.orderStatus === '6'" @click.stop="goPageDetail(item)">再次预定</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</uni-swipe-action-item>
 			</uni-swipe-action-item>
@@ -58,21 +57,20 @@ export default {
 			// 订单列表
 			// 订单列表
 			orderList: [],
 			orderList: [],
 			// 倒计时时间(毫秒)
 			// 倒计时时间(毫秒)
-			countDownTime: null,
+			countDownTime: 1000 * 60 * 15,
 			// 当前页
 			// 当前页
 			page: 1,
 			page: 1,
 			// 每页多少条数据
 			// 每页多少条数据
-			rows: 10,
+			rows: 6,
 			// 一共多少条数据
 			// 一共多少条数据
 			total: ''
 			total: ''
 		}
 		}
 	},
 	},
-	onLoad() {
+	onShow() {
+		this.page = 1
+		this.orderList = []
 		this.getOrderList()
 		this.getOrderList()
 	},
 	},
-	onUnload: function () {
-		clearInterval(this.timer)
-	},
 	// 下拉刷新
 	// 下拉刷新
 	onPullDownRefresh() {
 	onPullDownRefresh() {
 		setTimeout(() => {
 		setTimeout(() => {
@@ -108,119 +106,155 @@ export default {
 			})
 			})
 			// console.log(res)
 			// console.log(res)
 			if (res.code === 200) {
 			if (res.code === 200) {
-				this.orderList = [...this.orderList, ...res.data.pageList]
 				this.total = res.data.total
 				this.total = res.data.total
+				this.orderList = [...this.orderList, ...res.data.pageList]
+				// 如果是待支付状态,算出剩余支付时间
+				this.orderList.forEach((ele) => {
+					if (ele.orderStatus === '1') {
+						ele.countDownTime = new Date(ele.createTime.slice(0, 19)).getTime() + 15 * 60 * 1000 - new Date().getTime()
+					}
+				})
 			}
 			}
 		},
 		},
-		// 倒计时变化时触发
-		change(e) {
-			// console.log(e)
-		},
 		// 倒计时结束回调
 		// 倒计时结束回调
-		finish() {
-			uni.showModal({
-				title: '提示',
-				content: '订单已超过可支付时间,请重新下单',
-				showCancel: false,
-				success: (res) => {
-					if (res.confirm) {
-						uni.switchTab({
-							url: '/pages/home/home'
-						})
-					}
-				}
-			})
+		finish(item) {
+			// console.log(item)
+			// uni.showModal({
+			// 	title: '提示',
+			// 	content: '订单已超过可支付时间',
+			// 	showCancel: false,
+			// 	success: async (res) => {
+			// 		if (res.confirm) {
+			// 			const res = await this.$myRequest({
+			// 				url: '/mhotel/abkupdateOrderStatus.action',
+			// 				data: {
+			// 					bookingId: item.id
+			// 				}
+			// 			})
+			// 			// console.log(res)
+			// 			if (res.code === 200) {
+			// 				uni.switchTab({
+			// 					url: '/pages/my/my'
+			// 				})
+			// 			}
+			// 		}
+			// 	}
+			// })
 		},
 		},
-		// 倒计时
-		timeup(createTime) {
-			var that = this
-			/**setInterval间歇调用 */
-			that.timer = setInterval(function () {
-				//订单下单时间
-				var buy_time = createTime
-				//计算剩余下单时间
-				var time = new Date(buy_time).getTime() + 15 * 60 * 1000 - new Date().getTime()
-				if (time > 0) {
-					//计算剩余的分钟
-					var minutes = parseInt((time / 1000 / 60) % 60, 10)
-					//计算剩余的秒数
-					var seconds = parseInt((time / 1000) % 60, 10)
-					that.countDownTime = parseInt(time / 1000)
-					// console.log(that.countDownTime)
-					//判断分钟和秒数小于10要在前面加个0.
-					if (minutes < 10) {
-						minutes = '0' + minutes
-					}
-					if (seconds < 10) {
-						seconds = '0' + seconds
-					}
-					var timer = minutes + ':' + seconds
-				}
-			}, 1000)
-			if (that.countDownTime == 0) {
+		// 点击预定按钮回调
+		goPagePay(item) {
+			console.log(item.countDownTime)
+			if (item.countDownTime <= 0) {
 				uni.showModal({
 				uni.showModal({
 					title: '提示',
 					title: '提示',
-					content: '订单已超过可支付时间,请重新下单',
+					content: '订单已超过可支付时间',
 					showCancel: false,
 					showCancel: false,
-					success: (res) => {
+					success: async (res) => {
 						if (res.confirm) {
 						if (res.confirm) {
-							uni.switchTab({
-								url: '/pages/home/home'
+							const res = await this.$myRequest({
+								url: '/mhotel/abkupdateOrderStatus.action',
+								data: {
+									bookingId: item.id
+								}
 							})
 							})
+							// console.log(res)
+							if (res.code === 200) {
+								this.page = 1
+								this.orderList = []
+								this.getOrderList()
+							}
 						}
 						}
 					}
 					}
 				})
 				})
+			} else {
+				uni.navigateTo({
+					url: `/pages/pay/pay?id=${item.id}`
+				})
 			}
 			}
 		},
 		},
-		// 点击预定按钮回调
-		goPagePay() {
-			uni.navigateTo({
-				url: '/pages/pay/pay'
-			})
-		},
 		// 点击再次预定按钮回调
 		// 点击再次预定按钮回调
-		goPageDetail() {
-			uni.navigateTo({
-				url: '/pages/detail/detail'
+		goPageDetail(item) {
+			uni.showModal({
+				title: '提示',
+				content: '确定再次预定吗?',
+				success: async (res) => {
+					if (res.confirm) {
+						const result = await this.$myRequest({
+							url: '/mhotel/abkcreateOrder.action',
+							data: {
+								houseId: item.houseId,
+								startTime: item.orderStartTime.slice(0, 10),
+								endTime: item.orderEndTime.slice(0, 10),
+								houseOrderNumber: item.houseOrderNumber,
+								userName: item.userName,
+								userPhone: item.userPhone,
+								userId: uni.getStorageSync('userInfo').id
+							}
+						})
+						if (result.code === 200) {
+							uni.navigateTo({
+								url: `/pages/pay/pay?id=${result.data}`
+							})
+							// uni.showToast({
+							// 	title: '预定成功',
+							// 	icon: 'success',
+							// 	mask: true
+							// })
+							// setTimeout(() => {
+							// 	this.page = 1
+							// 	this.orderList = []
+							// 	this.getOrderList()
+							// }, 1500)
+						}
+					}
+				}
 			})
 			})
 		},
 		},
 		// 点击每一个订单回调
 		// 点击每一个订单回调
 		goPageOrderDetail(item) {
 		goPageOrderDetail(item) {
-			let info = JSON.stringify(item)
+			// console.log(item)
 			uni.navigateTo({
 			uni.navigateTo({
-				url: `/pages/orderDetail/orderDetail?info=${info}`
+				url: `/pages/orderDetail/orderDetail?id=${item.id}`
 			})
 			})
 		},
 		},
 		// 右侧选项内容删除按钮回调
 		// 右侧选项内容删除按钮回调
 		handleDelete(item) {
 		handleDelete(item) {
 			// console.log(item)
 			// console.log(item)
-			uni.showModal({
-				title: '提示',
-				content: '确定删除吗?删除后不可恢复',
-				success: async (res) => {
-					if (res.confirm) {
-						const res = await this.$myRequest({
-							url: '/mhotel/abkdelBooking.action',
-							data: {
-								bookingId: item.id
-							}
-						})
-						// console.log(res)
-						if (res.code === 200) {
-							uni.showToast({
-								title: '删除成功',
-								icon: 'success',
-								mask: true
+			if (item.orderStatus === '5' || item.orderStatus === '6' || item.orderStatus === '7' || item.orderStatus === '8' || item.orderStatus === '9') {
+				uni.showModal({
+					title: '提示',
+					content: '确定删除吗?删除后不可恢复',
+					success: async (res) => {
+						if (res.confirm) {
+							const res = await this.$myRequest({
+								url: '/mhotel/abkdelBooking.action',
+								data: {
+									bookingId: item.id
+								}
 							})
 							})
-							setTimeout(() => {
-								this.orderList = []
-								this.page = 1
-								this.getOrderList()
-							}, 1500)
+							// console.log(res)
+							if (res.code === 200) {
+								uni.showToast({
+									title: '删除成功',
+									icon: 'success',
+									mask: true
+								})
+								setTimeout(() => {
+									this.orderList = []
+									this.page = 1
+									this.getOrderList()
+								}, 1500)
+							}
 						}
 						}
 					}
 					}
-				}
-			})
+				})
+			} else {
+				uni.showToast({
+					title: '当前状态订单不可删除',
+					icon: 'none',
+					mask: true
+				})
+			}
 		}
 		}
 	}
 	}
 }
 }
@@ -268,14 +302,20 @@ export default {
 
 
 			.title {
 			.title {
 				margin-left: 16rpx;
 				margin-left: 16rpx;
+				width: 350rpx;
 				font-size: 32rpx;
 				font-size: 32rpx;
 				font-weight: bold;
 				font-weight: bold;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
 			}
 			}
 
 
 			.type {
 			.type {
 				display: flex;
 				display: flex;
+				justify-content: flex-end;
 				align-items: center;
 				align-items: center;
 				margin-left: auto;
 				margin-left: auto;
+				width: 285rpx;
 				color: #808080;
 				color: #808080;
 				font-size: 28rpx;
 				font-size: 28rpx;
 			}
 			}

+ 52 - 26
pages/pay/pay.vue

@@ -1,35 +1,32 @@
 <template>
 <template>
-	<view class="container">
+	<view class="container" v-if="info">
 		<view class="countDown">
 		<view class="countDown">
 			交易剩余时间
 			交易剩余时间
-			<uv-count-down :time="countDownTime" format="mm:ss" @change="change" @finish="finish"></uv-count-down>
+			<uv-count-down :time="info.countDownTime" format="mm:ss" @finish="finish"></uv-count-down>
 		</view>
 		</view>
 		<view class="price">
 		<view class="price">
 			<text>¥</text>
 			<text>¥</text>
-			{{ info.price }}
+			{{ info.houseTotalPrice }}
 		</view>
 		</view>
 
 
 		<view class="title">住房信息</view>
 		<view class="title">住房信息</view>
 		<view class="info">
 		<view class="info">
 			<view class="info_time">
 			<view class="info_time">
-				{{ info.detaliInfo.startTimeMonth || 8 }}月{{ info.detaliInfo.startTimeDay || 2 }}日
-				<text class="gap">星期{{ info.detaliInfo.startTimeWeek || '三' }}</text>
+				{{ getTime((info.orderStartTime || '').slice(0, 19)) }}
+				<text class="gap">{{ getWeek((info.orderStartTime || '').slice(0, 19)) }}</text>
 				<view class="time_line"></view>
 				<view class="time_line"></view>
-				<view class="time_num">{{ info.detaliInfo.nightNum || 1 }}晚</view>
+				<view class="time_num">{{ info.orderLiveTime }}</view>
 				<view class="time_line"></view>
 				<view class="time_line"></view>
-				<view class="gap">{{ info.detaliInfo.endTimeMonth || 8 }}月{{ info.detaliInfo.endTimeDay || 3 }}日</view>
-				<text>星期{{ info.detaliInfo.endTimeWeek || '四' }}</text>
+				<view class="gap">{{ getTime((info.orderEndTime || '').slice(0, 19)) }}</view>
+				<text>{{ getWeek((info.orderEndTime || '').slice(0, 19)) }}</text>
 			</view>
 			</view>
-			<view class="info_msg">{{ info.detaliInfo.item.hName }}</view>
+			<view class="info_msg">{{ info.houseName }}房</view>
 			<view class="info_type">
 			<view class="info_type">
 				<view class="type_item">包吃住型</view>
 				<view class="type_item">包吃住型</view>
-				<view class="type_item">包吃住型</view>
-				<view class="type_item">包吃住型</view>
 			</view>
 			</view>
 			<view class="info_tag">
 			<view class="info_tag">
-				<view class="tag_item">{{ info.detaliInfo.item.hAreas }}㎡</view>
-				<view class="tag_item">双人床</view>
-				<view class="tag_item">窗户位于走廊/窗户较小</view>
+				<view class="tag_item" v-if="info.hAreas">{{ info.hAreas }}㎡</view>
+				<view class="tag_item" v-for="tag in info.houseConfigList" :key="tag.id">{{ tag.name }}</view>
 			</view>
 			</view>
 		</view>
 		</view>
 
 
@@ -51,19 +48,33 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
+			// 是否选中支付方式
 			isChecked: true,
 			isChecked: true,
-			info: {},
-			// 倒计时时间(毫秒)
-			countDownTime: 1000 * 60 * 15
+			// 订单信息
+			info: null,
+			// 订单id
+			id: ''
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
-		if (options.info) {
-			this.info = JSON.parse(options.info)
-		}
-		console.log(this.info)
+		this.id = options.id
+		this.getData()
 	},
 	},
 	methods: {
 	methods: {
+		async getData() {
+			const res = await this.$myRequest({
+				url: '/mhotel/ampgetBookingById.action',
+				data: {
+					bookingId: this.id
+				}
+			})
+			if (res.code === 200) {
+				this.info = res.data
+				console.log(this.info)
+				// 计算出倒计时时间(毫秒)
+				this.info.countDownTime = new Date(this.info.createTime.slice(0, 19)).getTime() + 15 * 60 * 1000 - new Date().getTime()
+			}
+		},
 		// 点击确认支付按钮回调
 		// 点击确认支付按钮回调
 		async handleSub() {
 		async handleSub() {
 			if (this.isChecked) {
 			if (this.isChecked) {
@@ -71,7 +82,7 @@ export default {
 					url: '/mhotel/abkpay.action',
 					url: '/mhotel/abkpay.action',
 					data: {
 					data: {
 						open_id: uni.getStorageSync('openid'),
 						open_id: uni.getStorageSync('openid'),
-						bookingId: this.info.orderNo
+						bookingId: this.info.id
 					}
 					}
 				})
 				})
 				// console.log(res)
 				// console.log(res)
@@ -116,10 +127,6 @@ export default {
 		handleChange() {
 		handleChange() {
 			this.isChecked = !this.isChecked
 			this.isChecked = !this.isChecked
 		},
 		},
-		// 倒计时变化时触发
-		change(e) {
-			// console.log(e)
-		},
 		// 倒计时结束回调
 		// 倒计时结束回调
 		finish() {
 		finish() {
 			uni.showModal({
 			uni.showModal({
@@ -134,6 +141,25 @@ export default {
 					}
 					}
 				}
 				}
 			})
 			})
+		},
+		getWeek(time) {
+			let date = new Date(time)
+			// 获取星期
+			let week = date.getDay()
+			let weekList = ['日', '一', '二', '三', '四', '五', '六']
+
+			let res = '周' + weekList[week]
+			return res
+		},
+		getTime(time) {
+			let date = new Date(time)
+			// 获取月份
+			let M = date.getMonth() + 1
+			// 获取日期
+			let D = date.getDate()
+
+			let res = M + '月' + D + '日'
+			return res
 		}
 		}
 	}
 	}
 }
 }

+ 41 - 29
pages/payStatus/payStatus.vue

@@ -39,37 +39,49 @@ export default {
 		},
 		},
 		// 订阅消息
 		// 订阅消息
 		getMessage() {
 		getMessage() {
-			uni.requestSubscribeMessage({
-				tmplIds: [this.templateOrder],
+			uni.getSetting({
+				withSubscriptions: true,
 				success: (res) => {
 				success: (res) => {
-					for (let key in res) {
-						if (res[key] === 'accept') {
-							uni.showToast({
-								title: '订阅成功',
-								icon: 'success',
-								mask: true
-							})
-						}
-						// else if (res[key] === 'reject') {
-						// 	uni.showToast({
-						// 		title: '订阅失败',
-						// 		icon: 'none',
-						// 		mask: true
-						// 	})
-						// }
-					}
-					setTimeout(() => {
-						uni.reLaunch({
-							url: '/pages/orderManage/orderManage'
+					if (res.subscriptionsSetting[this.templateOrder] !== 'reject') {
+						uni.requestSubscribeMessage({
+							tmplIds: [this.templateOrder],
+							success: (res) => {
+								if (res[this.templateOrder] !== 'reject') {
+									console.log('成功')
+								} else {
+									console.log('拒绝2')
+								}
+								uni.switchTab({
+									url: '/pages/home/home'
+								})
+							},
+							fail(err) {
+								console.log('拒绝')
+							}
+						})
+					} else {
+						uni.showModal({
+							content: '当前没有订阅,是否去设置打开?',
+							confirmText: '确认',
+							cancelText: '取消',
+							success: (res) => {
+								if (res.confirm) {
+									uni.openSetting({
+										success: (res) => {
+											this.handleClick()
+										}
+									})
+								} else {
+									console.log('失败')
+									setTimeout(() => {
+										uni.switchTab({
+											url: '/pages/home/home'
+										})
+									}, 1500)
+								}
+							}
 						})
 						})
-					}, 1500)
-				},
-				fail: (res) => {
-					console.log(2)
-					console.log(res)
-					uni.switchTab({
-						url: '/pages/home/home'
-					})
+					}
 				}
 				}
 			})
 			})
 		}
 		}

+ 115 - 103
pages/push/push.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-	<view class="container">
+	<view class="container" v-if="orderInfo">
 		<!-- 顶部订单状态信息区域 -->
 		<!-- 顶部订单状态信息区域 -->
 		<view class="header">
 		<view class="header">
 			<!-- 背景图片区域 -->
 			<!-- 背景图片区域 -->
@@ -9,27 +9,17 @@
 			<!-- 返回图标区域 -->
 			<!-- 返回图标区域 -->
 			<img class="header_icon" src="../../static/index/left.png" @click="handleBack" />
 			<img class="header_icon" src="../../static/index/left.png" @click="handleBack" />
 
 
-			<view class="header_type">已支付</view>
-			<view class="header_info">订单号:2307311449380724</view>
-
-			<view class="header_type" v-if="type === '1'">代付款</view>
-			<view class="header_info" v-if="type === '1'">超时后,订单将会自动取消</view>
-			<view class="header_type" v-if="type === '2'">支付超时</view>
-			<view class="header_info" v-if="type === '2'">订单已超过可支付时间,请重新下单</view>
-			<view class="header_type" v-if="type === '3'">已支付</view>
-			<view class="header_info" v-if="type === '3'">订单已支付,请等待商家接单</view>
-			<view class="header_type" v-if="type === '4'">已取消</view>
-			<view class="header_info" v-if="type === '4'">订单已取消,请重新下单</view>
-			<view class="header_type" v-if="type === '5'">已退单</view>
-			<view class="header_info" v-if="type === '5'">订单已被商家退单,请重新下单</view>
-			<view class="header_type" v-if="type === '6'">待入住</view>
-			<view class="header_info" v-if="type === '6'">订单已被商家接单,请前往办理入住</view>
-			<view class="header_type" v-if="type === '7'">已入住</view>
-			<view class="header_info" v-if="type === '7'">订单已办理入住</view>
-			<view class="header_type" v-if="type === '8'">已退款</view>
-			<view class="header_info" v-if="type === '8'">订单已退款</view>
-			<view class="header_type" v-if="type === '9'">已消费</view>
-			<view class="header_info" v-if="type === '9'">您的订单已消费,期待您再次预定哦</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '1'">待支付</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '2'">已支付</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '3'">待入住</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '4'">已入住</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '5'">已消费</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '6'">支付超时</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '7'">已取消</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '8'">已退单</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '9'">已退款</view>
+			<view class="header_type" v-if="orderInfo.orderStatus === '10'">退款中</view>
+			<view class="header_info">订单号:{{ orderInfo.orderNum }}</view>
 		</view>
 		</view>
 
 
 		<!-- 主体内容区域 -->
 		<!-- 主体内容区域 -->
@@ -37,32 +27,30 @@
 			<!-- 房型信息和用户信息区域 -->
 			<!-- 房型信息和用户信息区域 -->
 			<view class="body_box2">
 			<view class="body_box2">
 				<view class="info_time">
 				<view class="info_time">
-					7月26日
-					<text class="gap">今天</text>
+					{{ getTime((orderInfo.orderStartTime || '').slice(0, 19)) }}
+					<text class="gap">{{ getWeek((orderInfo.orderStartTime || '').slice(0, 19)) }}</text>
 					<view class="time_line"></view>
 					<view class="time_line"></view>
-					<view class="time_num">1晚</view>
+					<view class="time_num">{{ orderInfo.orderLiveTime }}</view>
 					<view class="time_line"></view>
 					<view class="time_line"></view>
-					<view class="gap">7月26日</view>
-					<text>明天</text>
+					<view class="gap">{{ getTime((orderInfo.orderEndTime || '').slice(0, 19)) }}</view>
+					<text>{{ getWeek((orderInfo.orderEndTime || '').slice(0, 19)) }}</text>
 				</view>
 				</view>
-				<view class="info_msg">大床房</view>
+				<view class="info_msg">{{ orderInfo.houseName }}</view>
 				<view class="info_type">
 				<view class="info_type">
-					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
-					<view class="type_item">包吃住型</view>
+					<view class="type_item">{{ orderInfo.hotelType }}型</view>
 				</view>
 				</view>
 				<view class="info_tag">
 				<view class="info_tag">
-					<view class="tag_item">16-20㎡</view>
+					<view class="tag_item" v-if="orderInfo.houseAreas">{{ orderInfo.houseAreas }}㎡</view>
 					<view class="tag_item">双人床</view>
 					<view class="tag_item">双人床</view>
 					<view class="tag_item">窗户位于走廊/窗户较小</view>
 					<view class="tag_item">窗户位于走廊/窗户较小</view>
 				</view>
 				</view>
 				<view class="info_box">
 				<view class="info_box">
 					<view class="box_key">住客姓名</view>
 					<view class="box_key">住客姓名</view>
-					<view class="box_value">张三</view>
+					<view class="box_value">{{ orderInfo.userName }}</view>
 				</view>
 				</view>
 				<view class="info_box">
 				<view class="info_box">
 					<view class="box_key">联系电话</view>
 					<view class="box_key">联系电话</view>
-					<view class="box_value">13677985689</view>
+					<view class="box_value">{{ orderInfo.userPhone }}</view>
 				</view>
 				</view>
 				<view class="info_box">
 				<view class="info_box">
 					<view class="box_key">预计到店</view>
 					<view class="box_key">预计到店</view>
@@ -75,7 +63,7 @@
 				<view class="box_title">费用信息</view>
 				<view class="box_title">费用信息</view>
 				<view class="box_container">
 				<view class="box_container">
 					<view class="container_key">在线支付</view>
 					<view class="container_key">在线支付</view>
-					<view class="container_value price">¥280</view>
+					<view class="container_value price">¥{{ orderInfo.houseTotalPrice }}</view>
 				</view>
 				</view>
 				<view class="box_container">
 				<view class="box_container">
 					<view class="container_key">发票报销</view>
 					<view class="container_key">发票报销</view>
@@ -86,8 +74,8 @@
 			<!-- 按钮区域 -->
 			<!-- 按钮区域 -->
 
 
 			<view class="body_btn">
 			<view class="body_btn">
-				<view class="btn_item type">退单</view>
-				<view class="btn_item type2">接单</view>
+				<view class="btn_item type" @click="handleOrder(4)">退单</view>
+				<view class="btn_item type2" v-if="orderInfo.hotelIsCanorder === '2'" @click="handleOrder(1)">接单</view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -97,91 +85,115 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
-			// 订单类型
-			type: null
+			// 订单id
+			id: '',
+			// 订单信息
+			orderInfo: null
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
-		this.type = options.type
+		this.id = options.id
+		this.getData()
 	},
 	},
 	methods: {
 	methods: {
-		// 点击复制文字回调
-		handleCopy(text) {
-			uni.setClipboardData({
-				data: text,
-				success: () => {}
-			})
-		},
-		handleBack() {
-			uni.navigateBack(1)
-		},
-		// 点击地图/导航文字回调
-		handleMap() {
-			uni.openLocation({
-				latitude: 28.86054,
-				longitude: 115.361744,
-				name: '',
-				address: '靖安县---详细地址',
-				success: () => {}
-			})
-		},
-		// 点击联系商家文字回调
-		handlePhone(phone) {
-			uni.makePhoneCall({
-				phoneNumber: phone
-			})
-		},
-		// 点击去支付按钮回调
-		handlePay() {
-			uni.navigateTo({
-				url: '/pages/pay/pay'
+		async getData() {
+			const res = await this.$myRequest({
+				url: '/mhotel/ampgetBookingById.action',
+				data: {
+					bookingId: this.id
+				}
 			})
 			})
+			// console.log(res)
+			if (res.code === 200) {
+				this.orderInfo = res.data
+			}
 		},
 		},
-		// 点击取消订单按钮回调
-		handleCancel() {
+		// 点击 退单 接单 按钮回调
+		handleOrder(type) {
+			// 1 接单  4 退单
 			uni.showModal({
 			uni.showModal({
 				title: '提示',
 				title: '提示',
-				content: '确定取消该订单吗?',
+				content: `确定${type === 1 ? '接单' : '退单'}吗?`,
 				success: (res) => {
 				success: (res) => {
 					if (res.confirm) {
 					if (res.confirm) {
-						uni.showToast({
-							title: '取消成功',
-							icon: 'success'
-						})
-						setTimeout(() => {
-							uni.redirectTo({
-								url: '/pages/orderManage/orderManage'
-							})
-						}, 1500)
+						if (type === 1) {
+							// 接单请求
+							this.receiving()
+						} else {
+							// 退单请求
+							this.chargeback()
+						}
 					}
 					}
 				}
 				}
 			})
 			})
 		},
 		},
-		// 点击再次预定按钮回调
-		handleAgain() {
-			uni.navigateTo({
-				url: '/pages/detail/detail'
+		async receiving() {
+			const res = await this.$myRequest({
+				url: '/mhotel/bookupdateBookStatus.action',
+				data: {
+					id: this.id,
+					type: 1
+				}
 			})
 			})
+			// console.log(res)
+			if (res.code === 200) {
+				uni.showToast({
+					title: `接单成功`,
+					icon: 'success',
+					mask: true
+				})
+				setTimeout(() => {
+					uni.switchTab({
+						url: '/pages/home/home'
+					})
+				}, 1500)
+			}
 		},
 		},
-		// 点击删除订单按钮回调
-		handleDelete() {
-			uni.showModal({
-				title: '提示',
-				content: '确定删除该订单吗?',
-				success: (res) => {
-					if (res.confirm) {
-						uni.showToast({
-							title: '删除成功',
-							icon: 'success'
-						})
-						setTimeout(() => {
-							uni.redirectTo({
-								url: '/pages/orderManage/orderManage'
-							})
-						}, 1500)
-					}
+		async chargeback() {
+			const res = await this.$myRequest({
+				url: '/mhotel/abkchargeback.action',
+				data: {
+					bookingId: this.id
 				}
 				}
 			})
 			})
+			// console.log(res)
+			if (res.code === 200) {
+				uni.showToast({
+					title: res.message,
+					icon: 'none',
+					mask: true
+				})
+				setTimeout(() => {
+					uni.switchTab({
+						url: '/pages/home/home'
+					})
+				}, 1500)
+			}
+		},
+		// 点击左上角返回按钮回调
+		handleBack() {
+			uni.switchTab({
+				url: '/pages/home/home'
+			})
+		},
+		getWeek(time) {
+			let date = new Date(time)
+			// 获取星期
+			let week = date.getDay()
+			let weekList = ['日', '一', '二', '三', '四', '五', '六']
+
+			let res = '周' + weekList[week]
+			return res
+		},
+		getTime(time) {
+			let date = new Date(time)
+			// 获取月份
+			let M = date.getMonth() + 1
+			// 获取日期
+			let D = date.getDate()
+
+			let res = M + '月' + D + '日'
+			return res
 		}
 		}
 	}
 	}
 }
 }

+ 0 - 139
pages/search/search.vue

@@ -1,139 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 轮播图区域 -->
-		<swiper class="banner" indicator-dots indicator-color="rgba(255, 255, 255, 0.5)" indicator-active-color="#1E7DFB" autoplay circular>
-			<swiper-item>
-				<img src="../../static/search/img.png" />
-			</swiper-item>
-			<swiper-item>
-				<img src="../../static/search/img.png" />
-			</swiper-item>
-			<swiper-item>
-				<img src="../../static/search/img.png" />
-			</swiper-item>
-		</swiper>
-
-		<!-- 游客服务区域 -->
-		<view class="search">
-			<view class="search_title">游客服务</view>
-
-			<view class="search_box">
-				<!-- 每一个图标区域 -->
-				<view class="box_item" v-for="item in iconsList" :key="item.id">
-					<img :src="item.imgUrl"></img>
-					<view class="item_text">
-						{{item.text}}
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			// 图标数组
-			iconsList:[
-				{
-					id:1,
-					imgUrl:'../../static/search/icon.png',
-					text:'投诉建议'
-				},
-				{
-					id:2,
-					imgUrl:'../../static/search/icon2.png',
-					text:'租车服务'
-				},{
-					id:3,
-					imgUrl:'../../static/search/icon3.png',
-					text:'车位查询'
-				},{
-					id:4,
-					imgUrl:'../../static/search/icon4.png',
-					text:'厕所查询'
-				},{
-					id:5,
-					imgUrl:'../../static/search/icon5.png',
-					text:'寻找向导'
-				},{
-					id:6,
-					imgUrl:'../../static/search/icon6.png',
-					text:'服务热线'
-				},{
-					id:7,
-					imgUrl:'../../static/search/icon7.png',
-					text:'服务热线'
-				},{
-					id:8,
-					imgUrl:'../../static/search/icon8.png',
-					text:'招商平台'
-				}
-			]
-		}
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-.container {
-	display: flex;
-	flex-direction: column;
-	min-height: 100vh;
-	background-color: #ebeced;
-
-	.banner {
-		margin-top: 20rpx;
-		width: 750rpx;
-		height: 326rpx;
-
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
-
-	.search {
-		margin: 20rpx 0;
-		width: 750rpx;
-		height: 475rpx;
-		background-color: #fff;
-
-		.search_title {
-			padding: 0 30rpx;
-			height: 93rpx;
-			line-height: 93rpx;
-			font-size: 32rpx;
-			font-weight: bold;
-			border-bottom: 1rpx solid #e6e6e6;
-		}
-
-		.search_box {
-			display: flex;
-			flex-wrap: wrap;
-			padding: 0 30rpx;
-			height: 382rpx;
-
-			.box_item {
-				display: flex;
-				flex-direction: column;
-				justify-content: center;
-				align-items: center;
-				width: 25%;
-				height: 190rpx;
-
-				image {
-					width: 78rpx;
-					height: 78rpx;
-				}
-				
-				.item_text{
-					margin-top: 13rpx;
-					font-size: 28rpx;
-				}
-			}
-		}
-	}
-}
-</style>

+ 38 - 18
pages/set/set.vue

@@ -70,26 +70,46 @@ export default {
 				count: 1,
 				count: 1,
 				sizeType: ['compressed'],
 				sizeType: ['compressed'],
 				sourceType: ['album'], //从相册选择
 				sourceType: ['album'], //从相册选择
-				success: async (res) => {
-					// this.imgUrl = res.tempFilePaths[0]
-					const result = await this.$myRequest({
-						url: '/mhotel/ampupdateUserInfo.action',
-						data: {
-							userId: this.id,
-							userName: this.name,
-							headPhoto: res.tempFilePaths[0]
+				success: (res) => {
+					uni.showLoading({
+						title: '上传中'
+					})
+					uni.uploadFile({
+						url: `https://chtech.ncjti.edu.cn/hotelReservation/mhotel/mhotel/uploadhimage.action`,
+						filePath: res.tempFilePaths[0],
+						name: 'myFile',
+						success: async (uploadFileRes) => {
+							const res = JSON.parse(uploadFileRes.data)
+							if (res.code === 200) {
+								uni.hideLoading()
+								this.imgUrl = res.data.url
+								const result = await this.$myRequest({
+									url: '/mhotel/ampupdateUserInfo.action',
+									data: {
+										userId: this.id,
+										userName: this.name,
+										headPhoto: this.imgUrl
+									}
+								})
+								if (result.code === 200) {
+									uni.showToast({
+										title: '头像修改成功',
+										icon: 'success',
+										mask: true
+									})
+									setTimeout(() => {
+										this.getUser()
+									}, 1500)
+								}
+							}
+						},
+						fail: () => {
+							uni.showToast({
+								title: '上传失败',
+								icon: 'error'
+							})
 						}
 						}
 					})
 					})
-					if (result.code === 200) {
-						uni.showToast({
-							title: '头像修改成功',
-							icon: 'success',
-							mask: true
-						})
-						setTimeout(() => {
-							this.getUser()
-						}, 1500)
-					}
 				}
 				}
 			})
 			})
 		},
 		},

+ 0 - 149
pages/setMeal/setMeal.vue

@@ -1,149 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 每一个套餐区域 -->
-		<view class="setMeal_box">
-			<!-- 图片区域 -->
-			<view class="box_img">
-				<img src="../../static/search/img.png" />
-			</view>
-
-			<!-- 套餐信息区域 -->
-			<view class="box_info">
-				<view class="info_msg">新店开业:端午周末不加价|靖安双溪抱朴小院3天2晚含门票|三爪仑漂流双人|中华传统文化园套票|特色小吃2份</view>
-				<view class="info_price">
-					<view class="new">
-						¥180
-						<text>起</text>
-					</view>
-
-					<view class="old">市场价¥400</view>
-				</view>
-				<view class="info_btn">
-					<view class="btn_count">已售88张</view>
-
-					<view class="btn_pay">立即抢购</view>
-				</view>
-			</view>
-		</view>
-
-		<view class="setMeal_box">
-			<!-- 图片区域 -->
-			<view class="box_img">
-				<img src="../../static/search/img.png" />
-			</view>
-
-			<!-- 套餐信息区域 -->
-			<view class="box_info">
-				<view class="info_msg">新店开业:端午周末不加价|靖安双溪抱朴小院3天2晚含门票|三爪仑漂流双人|中华传统文化园套票|特色小吃2份</view>
-				<view class="info_price">
-					<view class="new">
-						¥180
-						<text>起</text>
-					</view>
-
-					<view class="old">市场价¥400</view>
-				</view>
-				<view class="info_btn">
-					<view class="btn_count">已售88张</view>
-
-					<view class="btn_pay">立即抢购</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {}
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-.container {
-	box-sizing: border-box;
-	padding: 20rpx 30rpx;
-	min-height: 100vh;
-	background-color: #ebeced;
-
-	.setMeal_box {
-		margin-bottom: 20rpx;
-		border-radius: 10rpx;
-		background-color: #fff;
-
-		.box_img {
-			height: 377rpx;
-
-			img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.box_info {
-			padding: 0 25rpx;
-			.info_msg {
-				margin-top: 20rpx;
-				line-height: 45rpx;
-				font-size: 28rpx;
-			}
-
-			.info_price {
-				display: flex;
-				height: 62rpx;
-				line-height: 62rpx;
-
-				.new {
-					color: #ff5733;
-					font-size: 36rpx;
-					font-weight: bold;
-
-					text {
-						font-size: 24rpx;
-						font-weight: 400;
-					}
-				}
-
-				.old {
-					margin-left: 20rpx;
-					color: #a6a6a6;
-					font-size: 24rpx;
-					text-decoration: line-through;
-				}
-			}
-
-			.info_btn {
-				display: flex;
-				justify-content: space-between;
-				height: 98rpx;
-
-				.btn_count {
-					padding: 0 20rpx;
-					margin-top: 10rpx;
-					height: 56rpx;
-					line-height: 56rpx;
-					color: #fff;
-					font-size: 24rpx;
-					border-radius: 10rpx;
-					background-color: #e86346;
-				}
-
-				.btn_pay {
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					margin-top: -10rpx;
-					width: 204rpx;
-					height: 72rpx;
-					border-radius: 48rpx;
-					color: #ff5733;
-					font-size: 32rpx;
-					border: 1rpx solid #ff5733;
-				}
-			}
-		}
-	}
-}
-</style>

+ 5 - 3
pages/shopInfo/shopInfo.vue

@@ -8,7 +8,7 @@
 			<view class="box_title">账户信息</view>
 			<view class="box_title">账户信息</view>
 			<view class="box_hotel">
 			<view class="box_hotel">
 				<view class="totel_left">民宿名称</view>
 				<view class="totel_left">民宿名称</view>
-				<view class="">{{ data.userName }}</view>
+				<view class="">{{ data.hotelName || '超级管理员' }}</view>
 			</view>
 			</view>
 			<view class="box_name">
 			<view class="box_name">
 				<view class="name_left">用户名</view>
 				<view class="name_left">用户名</view>
@@ -20,7 +20,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 
 
-		<view class="msg" @click="handleGoMsg">
+		<view class="msg" v-if="type === '2'" @click="handleGoMsg">
 			点击查看
 			点击查看
 			<text>数据中台</text>
 			<text>数据中台</text>
 			<img src="../../static/index/right.png" />
 			<img src="../../static/index/right.png" />
@@ -59,7 +59,9 @@ export default {
 			})
 			})
 		},
 		},
 		handleGoMsg() {
 		handleGoMsg() {
-			console.log(111)
+			uni.navigateTo({
+				url: '/pages/web/web'
+			})
 		}
 		}
 	}
 	}
 }
 }

+ 17 - 0
pages/web/web.vue

@@ -0,0 +1,17 @@
+<template>
+	<view>
+		<web-view :src="webUrl"></web-view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			webUrl: 'https://chtech.ncjti.edu.cn/hotelReservation/pc4/'
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped></style>

BIN
static/images/search-active.png


BIN
static/images/search.png


BIN
static/images/setMeal-active.png


BIN
static/images/setMeal.png


BIN
static/index/air.png


BIN
static/index/bed.png


BIN
static/index/brekker.png


BIN
static/index/lock.png


BIN
static/index/meeting.png


BIN
static/index/parking.png


BIN
static/index/smoke.png


BIN
static/index/wifi.png


BIN
static/index/window.png


BIN
static/my/portrait.jpg


BIN
static/my/portrait.png


BIN
static/my/test.png


BIN
static/search/icon.png


BIN
static/search/icon2.png


BIN
static/search/icon3.png


BIN
static/search/icon4.png


BIN
static/search/icon5.png


BIN
static/search/icon6.png


BIN
static/search/icon7.png


BIN
static/search/icon8.png


BIN
static/search/img.png


+ 4 - 2
util/api.js

@@ -1,6 +1,6 @@
 // const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation"
 // const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation"
-// const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation/mhotel/"
-const BASE_URL = "http://192.168.161.232:8080"
+const BASE_URL = "https://chtech.ncjti.edu.cn/hotelReservation/mhotel"
+// const BASE_URL = "http://192.168.161.232:8080"
 export const myRequest = (options) => {
 export const myRequest = (options) => {
 	uni.showLoading({
 	uni.showLoading({
 		title: "加载中",
 		title: "加载中",
@@ -18,6 +18,8 @@ export const myRequest = (options) => {
 				uni.hideLoading();
 				uni.hideLoading();
 				if (res.data.code === 200) {
 				if (res.data.code === 200) {
 					resolve(res.data)
 					resolve(res.data)
+				} else if (res.data.code === 205) {
+					resolve(res.data)
 				} else {
 				} else {
 					uni.showToast({
 					uni.showToast({
 						title: res.data.message,
 						title: res.data.message,