Browse Source

no message

xiaoxin 2 years ago
parent
commit
c8e4879d25

+ 26 - 0
pages.json

@@ -132,6 +132,20 @@
 				"navigationBarTitleText": "数据中台",
 				"enablePullDownRefresh": false
 			}
+		},
+		{
+			"path": "pages/setMeal/setMeal",
+			"style": {
+				"navigationBarTitleText": "精品套餐",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/search/search",
+			"style": {
+				"navigationBarTitleText": "服务",
+				"enablePullDownRefresh": false
+			}
 		}
 	],
 	"tabBar": {
@@ -146,6 +160,18 @@
 				"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",
 				"iconPath": "static/images/my.png",
 				"selectedIconPath": "static/images/my-active.png",

+ 1 - 1
pages/home/home.vue

@@ -182,7 +182,7 @@ export default {
 					queryValue: this.keywords,
 					page: this.page,
 					rows: this.rows,
-					hotelTownship: this.placeList[this.placeIndex].id || ''
+					hotel_township: this.placeList[this.placeIndex].id || ''
 				}
 			})
 			// console.log(res)

+ 11 - 6
pages/orderDetail/orderDetail.vue

@@ -33,15 +33,20 @@
 			<view class="header_btn">
 				<view class="btn_box" v-if="info.orderStatus === '1'" @click="handlePay">去支付 ¥{{ info.houseTotalPrice }}</view>
 				<!-- hotelIsCanorder  1可取消,0不可 -->
+				<view class="btn_box" v-if="(info.orderStatus === '2' || info.orderStatus === '3') && info.hotelIsCanorder === '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 === '2' || info.orderStatus === '3') && info.hotelIsCanorder === '1') || info.orderStatus === '1'"
-					@click="handleCancel"
+					@click="handleDelete"
+					v-if="
+						info.orderStatus === '1' ||
+						info.orderStatus === '5' ||
+						info.orderStatus === '6' ||
+						info.orderStatus === '7' ||
+						info.orderStatus === '8' ||
+						info.orderStatus === '9'
+					"
 				>
-					取消订单
-				</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>

+ 19 - 4
pages/orderManage/orderManage.vue

@@ -123,9 +123,17 @@ export default {
 			}
 		},
 		// 倒计时结束回调
-		finish(item) {
-			// console.log(item)
-			item.orderStatus = '6'
+		async finish(item) {
+			const res = await this.$myRequest({
+				url: '/mhotel/abkupdateOrderStatus.action',
+				data: {
+					bookingId: item.id
+				}
+			})
+			// console.log(res)
+			if (res.code === 200) {
+				item.orderStatus = '6'
+			}
 			// uni.showModal({
 			// 	title: '提示',
 			// 	content: '订单已超过可支付时间',
@@ -227,7 +235,14 @@ export default {
 		// 右侧选项内容删除按钮回调
 		handleDelete(item) {
 			// console.log(item)
-			if (item.orderStatus === '5' || item.orderStatus === '6' || item.orderStatus === '7' || item.orderStatus === '8' || item.orderStatus === '9') {
+			if (
+				item.orderStatus === '1' ||
+				item.orderStatus === '5' ||
+				item.orderStatus === '6' ||
+				item.orderStatus === '7' ||
+				item.orderStatus === '8' ||
+				item.orderStatus === '9'
+			) {
 				uni.showModal({
 					title: '提示',
 					content: '确定删除吗?删除后不可恢复',

+ 139 - 0
pages/search/search.vue

@@ -0,0 +1,139 @@
+<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>

+ 149 - 0
pages/setMeal/setMeal.vue

@@ -0,0 +1,149 @@
+<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>

BIN
static/images/search-active.png


BIN
static/images/search.png


BIN
static/images/setMeal-active.png


BIN
static/images/setMeal.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


+ 2 - 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/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) => {
 	uni.showLoading({
 		title: "加载中",