Browse Source

no message

xiaoxin 2 years ago
parent
commit
37d9a880cc

+ 1 - 7
pages.json

@@ -3,7 +3,7 @@
 		{
 		{
 			"path": "pages/index/index",
 			"path": "pages/index/index",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "授权中",
+				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false
 				"enablePullDownRefresh": false
 			}
 			}
 		},
 		},
@@ -96,12 +96,6 @@
 				"enablePullDownRefresh": false
 				"enablePullDownRefresh": false
 			}
 			}
 		}, {
 		}, {
-			"path": "pages/shouquan/shouquan",
-			"style": {
-				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false
-			}
-		}, {
 			"path": "pages/login/login",
 			"path": "pages/login/login",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "",
 				"navigationBarTitleText": "",

+ 1 - 1
pages/affirmOrder/affirmOrder.vue

@@ -88,7 +88,7 @@
 					<view class="box_value">
 					<view class="box_value">
 						{{ roomCount }}间{{ info.nightNum }}晚 共
 						{{ roomCount }}间{{ info.nightNum }}晚 共
 						<text>¥</text>
 						<text>¥</text>
-						<span>{{ roomCount * info.item.price * info.nightNum }}.00</span>
+						<span>{{ roomCount * info.item.price * info.nightNum }}</span>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>

+ 9 - 9
pages/detail/detail.vue

@@ -2,7 +2,7 @@
 	<view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')">
 	<view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')">
 		<!-- 顶部民宿图片区域 -->
 		<!-- 顶部民宿图片区域 -->
 		<view class="banner">
 		<view class="banner">
-			<img class="img" :src="info.coverImg || '../../static/index/banner.png'" />
+			<img class="img" :src="info.coverImg" />
 
 
 			<view class="slogan">
 			<view class="slogan">
 				<img src="../../static/index/slogan.png" />
 				<img src="../../static/index/slogan.png" />
@@ -11,7 +11,7 @@
 
 
 		<!-- 民宿详细信息区域 -->
 		<!-- 民宿详细信息区域 -->
 		<view class="detail">
 		<view class="detail">
-			<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>
@@ -23,7 +23,7 @@
 
 
 			<view class="detail_group">
 			<view class="detail_group">
 				<view class="group_item" v-for="item in info.hconfigList" :key="item.id">
 				<view class="group_item" v-for="item in info.hconfigList" :key="item.id">
-					<img :src="item.fileUrl || '../../static/index/meeting.png'" />
+					<img :src="item.fileUrl" />
 					{{ item.name }}
 					{{ item.name }}
 				</view>
 				</view>
 			</view>
 			</view>
@@ -80,7 +80,7 @@
 				<!-- 每一个房型盒子区域 -->
 				<!-- 每一个房型盒子区域 -->
 				<view class="body_box" v-for="item in list" :key="item.id" @click="handleLookDetail(item)">
 				<view class="body_box" v-for="item in list" :key="item.id" @click="handleLookDetail(item)">
 					<view class="box_left">
 					<view class="box_left">
-						<img :src="item.fileInfoList[0].url || '../../static/index/banner.png'" />
+						<img :src="item.fileInfoList[0].url" />
 					</view>
 					</view>
 
 
 					<view class="box_center">
 					<view class="box_center">
@@ -91,7 +91,7 @@
 							<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 || '../../static/index/wifi.png'" />
+							<img v-for="item2 in item.hConfigList" :key="item2.id" class="img" :src="item2.fileUrl" />
 						</view>
 						</view>
 					</view>
 					</view>
 
 
@@ -100,7 +100,7 @@
 							<text>¥</text>
 							<text>¥</text>
 							{{ item.price }}
 							{{ item.price }}
 						</view>
 						</view>
-						<view class="right_btn" :class="{ inactive: !item.remainRooms }" @click.stop="goPageAffOrder(item)">订</view>
+						<view class="right_btn" :class="{ inactive: item.remainRooms * 1 < 0 }" @click.stop="goPageAffOrder(item)">订</view>
 					</view>
 					</view>
 				</view>
 				</view>
 
 
@@ -110,7 +110,7 @@
 						<!-- 轮播图区域 -->
 						<!-- 轮播图区域 -->
 						<swiper indicator-dots circular indicator-color="#FFFFFF" indicator-active-color="#096562" class="pop_swiper">
 						<swiper indicator-dots circular indicator-color="#FFFFFF" indicator-active-color="#096562" class="pop_swiper">
 							<swiper-item class="pop_swiper_item" v-for="item in roomInfo.fileInfoList" :key="item.id">
 							<swiper-item class="pop_swiper_item" v-for="item in roomInfo.fileInfoList" :key="item.id">
-								<img class="img" :src="item.url || '../../static/index/banner.png'" />
+								<img class="img" :src="item.url" />
 							</swiper-item>
 							</swiper-item>
 						</swiper>
 						</swiper>
 						<!-- 轮播图关闭图标区域 -->
 						<!-- 轮播图关闭图标区域 -->
@@ -162,7 +162,7 @@
 								<view class="bottom_right">
 								<view class="bottom_right">
 									<text>¥</text>
 									<text>¥</text>
 									{{ roomInfo.price }}
 									{{ roomInfo.price }}
-									<view class="btn" :class="{ inactive: !roomInfo.remainRooms }" @click="goPageAffOrder(roomInfo)">预定</view>
+									<view class="btn" :class="{ inactive: roomInfo.remainRooms * 1 < 0 }" @click="goPageAffOrder(roomInfo)">预定</view>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -306,7 +306,7 @@ export default {
 		goPageAffOrder(item) {
 		goPageAffOrder(item) {
 			let flag = uni.getStorageSync('openid')
 			let flag = uni.getStorageSync('openid')
 			if (flag) {
 			if (flag) {
-				if (item.remainRooms) {
+				if (item.remainRooms * 1 > 0) {
 					this.$refs.popup.close()
 					this.$refs.popup.close()
 					this.showPage = false
 					this.showPage = false
 
 

+ 5 - 5
pages/home/home.vue

@@ -22,15 +22,15 @@
 		<view class="body" v-if="hotelList.length">
 		<view class="body" v-if="hotelList.length">
 			<!-- 每一个名宿区域 -->
 			<!-- 每一个名宿区域 -->
 			<view class="item" v-for="item in hotelList" :key="item.id" @click="goPageDetail(item)">
 			<view class="item" v-for="item in hotelList" :key="item.id" @click="goPageDetail(item)">
-				<image class="item-img" :src="item.coverImg || '../../static/search/img.png'" 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="type">{{ item.htype || '默认' }}型</text>
-					<text class="distance" v-if="showdDistance">距您直线{{ item.distance || 0 }}公里</text>
+					<text class="title">{{ item.hname }}</text>
+					<text class="type">{{ item.htype }}型</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" />
 						<view class="price">
 						<view class="price">
-							<text class="txt1">¥{{ item.min_price || 180 }}</text>
+							<text class="txt1">¥{{ item.min_price }}</text>
 							<text class="txt2">起</text>
 							<text class="txt2">起</text>
 						</view>
 						</view>
 					</view>
 					</view>

+ 1 - 1
pages/login/login.vue

@@ -37,7 +37,7 @@ export default {
 			if (res.code === 200) {
 			if (res.code === 200) {
 				uni.setStorageSync('openid', res.data.openid)
 				uni.setStorageSync('openid', res.data.openid)
 				uni.setStorageSync('userInfo', res.data)
 				uni.setStorageSync('userInfo', res.data)
-				uni.setStorageSync('userId', res.data.id)
+
 				uni.showToast({
 				uni.showToast({
 					title: '授权成功',
 					title: '授权成功',
 					icon: 'success',
 					icon: 'success',

+ 5 - 5
pages/my/my.vue

@@ -7,9 +7,9 @@
 			<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.png" />
+			<img class="img" v-else src="../../static/my/portrait.jpg" />
 			<!-- 姓名区域 -->
 			<!-- 姓名区域 -->
-			<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>
 			<!-- 是否实名认证区域 -->
 			<!-- 是否实名认证区域 -->
@@ -77,6 +77,8 @@ export default {
 	},
 	},
 	onLoad() {
 	onLoad() {
 		uni.$on('changeFlag', this.changeFlag)
 		uni.$on('changeFlag', this.changeFlag)
+	},
+	onShow() {
 		let openid = uni.getStorageSync('openid')
 		let openid = uni.getStorageSync('openid')
 		if (openid) {
 		if (openid) {
 			this.flag = true
 			this.flag = true
@@ -85,9 +87,6 @@ export default {
 			this.flag = false
 			this.flag = false
 		}
 		}
 	},
 	},
-	onShow() {
-		// console.log(121)
-	},
 	methods: {
 	methods: {
 		changeFlag(e) {
 		changeFlag(e) {
 			// console.log(e)
 			// console.log(e)
@@ -224,6 +223,7 @@ export default {
 			left: 32rpx;
 			left: 32rpx;
 			width: 140rpx;
 			width: 140rpx;
 			height: 140rpx;
 			height: 140rpx;
+			border-radius: 50%;
 		}
 		}
 
 
 		.name {
 		.name {

+ 25 - 25
pages/orderManage/orderManage.vue

@@ -35,7 +35,7 @@
 						<img class="img" :src="item.imgUrl || '../../static/my/test.png'" />
 						<img class="img" :src="item.imgUrl || '../../static/my/test.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 }} - {{ item.orderEndTime }}</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.houseTotalPrice }}.00</view>
 						</view>
 						</view>
 					</view>
 					</view>
@@ -71,7 +71,7 @@ export default {
 		this.getOrderList()
 		this.getOrderList()
 	},
 	},
 	onUnload: function () {
 	onUnload: function () {
-	  clearInterval(this.timer);
+		clearInterval(this.timer)
 	},
 	},
 	// 下拉刷新
 	// 下拉刷新
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -101,7 +101,7 @@ export default {
 			const res = await this.$myRequest({
 			const res = await this.$myRequest({
 				url: '/mhotel/ampgetBookingList.action',
 				url: '/mhotel/ampgetBookingList.action',
 				data: {
 				data: {
-					userId: '2008',
+					userId: uni.getStorageSync('userInfo').id,
 					page: this.page,
 					page: this.page,
 					rows: this.rows
 					rows: this.rows
 				}
 				}
@@ -133,31 +133,31 @@ export default {
 		},
 		},
 		// 倒计时
 		// 倒计时
 		timeup(createTime) {
 		timeup(createTime) {
-			    var that = this;
-			    /**setInterval间歇调用 */
-			    that.timer = setInterval(function () {
+			var that = this
+			/**setInterval间歇调用 */
+			that.timer = setInterval(function () {
 				//订单下单时间
 				//订单下单时间
-				var buy_time = createTime;
+				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;
+				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) {
+			}, 1000)
+			if (that.countDownTime == 0) {
 				uni.showModal({
 				uni.showModal({
 					title: '提示',
 					title: '提示',
 					content: '订单已超过可支付时间,请重新下单',
 					content: '订单已超过可支付时间,请重新下单',

+ 2 - 4
pages/pay/pay.vue

@@ -6,7 +6,7 @@
 		</view>
 		</view>
 		<view class="price">
 		<view class="price">
 			<text>¥</text>
 			<text>¥</text>
-			{{ info.price + '.00' || '188.00' }}
+			{{ info.price }}
 		</view>
 		</view>
 
 
 		<view class="title">住房信息</view>
 		<view class="title">住房信息</view>
@@ -54,9 +54,7 @@ export default {
 			isChecked: true,
 			isChecked: true,
 			info: {},
 			info: {},
 			// 倒计时时间(毫秒)
 			// 倒计时时间(毫秒)
-			countDownTime: 1000 * 60 * 15,
-			// 订单进度模版id
-			templateOrder: 'ERU1ZY9IqwNkDxWyFJvo5VSE7ua-wey3SqhZgjqLDtU'
+			countDownTime: 1000 * 60 * 15
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {

+ 12 - 9
pages/payStatus/payStatus.vue

@@ -14,7 +14,9 @@ export default {
 	data() {
 	data() {
 		return {
 		return {
 			// 支付状态
 			// 支付状态
-			status: ''
+			status: '',
+			// 订单进度模版id
+			templateOrder: 'ERU1ZY9IqwNkDxWyFJvo5VSE7ua-wey3SqhZgjqLDtU'
 		}
 		}
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
@@ -47,17 +49,18 @@ export default {
 								icon: 'success',
 								icon: 'success',
 								mask: true
 								mask: true
 							})
 							})
-						} else if (res[key] === 'reject') {
-							uni.showToast({
-								title: '订阅失败',
-								icon: 'none',
-								mask: true
-							})
 						}
 						}
+						// else if (res[key] === 'reject') {
+						// 	uni.showToast({
+						// 		title: '订阅失败',
+						// 		icon: 'none',
+						// 		mask: true
+						// 	})
+						// }
 					}
 					}
 					setTimeout(() => {
 					setTimeout(() => {
-						uni.switchTab({
-							url: '/pages/home/home'
+						uni.reLaunch({
+							url: '/pages/orderManage/orderManage'
 						})
 						})
 					}, 1500)
 					}, 1500)
 				},
 				},

+ 7 - 6
pages/set/set.vue

@@ -24,7 +24,7 @@
 			<view class="body_box">
 			<view class="body_box">
 				ID
 				ID
 				<view class="box_right">
 				<view class="box_right">
-					<view class="msg">{{id}}</view>
+					<view class="msg">{{ id }}</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -40,7 +40,7 @@ export default {
 			// 账号名
 			// 账号名
 			name: '',
 			name: '',
 			//用户id
 			//用户id
-			id:'',
+			id: ''
 		}
 		}
 	},
 	},
 	onLoad() {
 	onLoad() {
@@ -51,7 +51,7 @@ export default {
 			let userInfo = uni.getStorageSync('userInfo')
 			let userInfo = uni.getStorageSync('userInfo')
 			this.name = userInfo.user_name
 			this.name = userInfo.user_name
 			this.imgUrl = userInfo.headPhoto
 			this.imgUrl = userInfo.headPhoto
-			this.id=userInfo.id
+			this.id = userInfo.id
 		},
 		},
 		// 点击头像图片回调
 		// 点击头像图片回调
 		handleClickPhoto() {
 		handleClickPhoto() {
@@ -144,18 +144,19 @@ export default {
 			})
 			})
 		},
 		},
 		//获取个人信息
 		//获取个人信息
-		async getUser(){
+		async getUser() {
 			const res = await this.$myRequest({
 			const res = await this.$myRequest({
 				url: '/mhotel/ampqueryUsersById.action',
 				url: '/mhotel/ampqueryUsersById.action',
 				data: {
 				data: {
-					userId:uni.getStorageSync('userId')
+					userId: uni.getStorageSync('userInfo').id
 				}
 				}
 			})
 			})
 			if (res.code === 200) {
 			if (res.code === 200) {
 				this.name = res.data.user_name
 				this.name = res.data.user_name
 				this.imgUrl = res.data.headPhoto
 				this.imgUrl = res.data.headPhoto
+				uni.setStorageSync('userInfo', res.data)
 			}
 			}
-		},
+		}
 	}
 	}
 }
 }
 </script>
 </script>

+ 0 - 202
pages/shouquan/shouquan.vue

@@ -1,202 +0,0 @@
-<template>
-	<view class="containar">
-		<view class="avatarUrl" style="text-align: center">
-			<!-- <image src="../../static/index/shouquan.png" style="width: 180rpx;height: 180rpx;" class="refreshIcon"></image> -->
-			<view style="color: rgba(30, 125, 251, 1); font-weight: 500">新糖宝</view>
-		</view>
-
-		<view class="btn" style="margin-top: 60px; height: 600rpx">
-			<button v-if="qiehuan" @click="denglu" style="background-color: rgba(30, 125, 251, 0.8); color: #fff; width: 650rpx">微信登录</button>
-			<button v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="background-color: rgba(30, 125, 251, 0.8); width: 650rpx; color: #fff">
-				微信登录
-			</button>
-
-			<checkbox-group @change="checkboxChange" style="margin-top: 30rpx; margin-left: 50rpx">
-				<checkbox color="rgba(30, 125, 251, 1)" style="transform: scale(0.6)" value="agree" :checked="check" shape="circle" />
-				<text style="color: rgba(166, 166, 166, 1); font-size: 26rpx" bindtap="toprotocol">我已阅读并同意</text>
-				<text style="color: rgba(30, 125, 251, 1); font-size: 26rpx" @click="toptong">《用户协议》</text>
-				、
-				<text style="color: rgba(30, 125, 251, 1); font-size: 26rpx" @click="toptong">《隐私政策》</text>
-			</checkbox-group>
-		</view>
-	</view>
-</template>
-<script>
-export default {
-	data() {
-		return {
-			access_token: '',
-			code: '',
-			nickName: '',
-			encryptedData: '',
-			iv: '',
-			avatarUrl: '',
-			agree: '', //默认勾选状态
-			check: false,
-			qiehuan: true
-		}
-	},
-	onLoad() {
-		// this.shouquan()
-		this.access_token = wx.getStorageSync('access_token')
-
-		uni.login({
-			provider: 'weixin',
-			success: (res) => {
-				// 获取用户信息
-				uni.getUserInfo({
-					provider: 'weixin',
-					success: function (res) {
-						console.log('res', res)
-					}
-				})
-				console.log('res-login', res)
-				//请求登录接口
-				if (res.errMsg == 'login:ok') {
-				}
-			}
-		})
-	},
-	methods: {
-		//勾选协议
-		checkboxChange(e) {
-			console.log(e.detail.value)
-			this.agree = e.detail.value[0]
-			this.qiehuan = this.agree == undefined || this.agree == ''
-		},
-		denglu() {
-			wx.showToast({
-				title: '请先勾选用户协议',
-				icon: 'none',
-				duration: 2000
-			})
-		},
-		//用户协议跳转
-		toptong() {
-			uni.navigateTo({
-				url: '../../packageThree/pages/yonghuxieyi/yonghuxieyi'
-			})
-		},
-		getPhoneNumber(e) {
-			if (this.qiehuan) {
-				wx.showToast({
-					title: '请先勾选用户协议',
-					icon: 'none',
-					duration: 2000
-				})
-			} else {
-				const that = this
-				console.log(e, '信息') //在这里的e里会有code等信息
-				let numberCode = e.detail.code //取出code
-				that.numberCode = numberCode
-				console.log(numberCode)
-
-				this.$axios
-					.get('/mp/user/userAuthorizedLogin', {
-						params: {
-							code: wx.getStorageSync('code'),
-							iv: wx.getStorageSync('iv'),
-							encryptedData: wx.getStorageSync('encryptedData'),
-							numberCode: that.numberCode
-						},
-						headers: {
-							Authorization: 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
-							'Blade-Auth': wx.getStorageSync('access_token'),
-							'Tenant-Id': '000000'
-						}
-					})
-					.then((response) => {
-						let res = response
-						console.log(res)
-						if (res.success) {
-							var userId = res.data.userId
-							wx.setStorageSync('userId', userId)
-							var huanzheNichen = res.data.name
-							wx.setStorageSync('huanzheNichen', huanzheNichen)
-							var createTime = res.data.createTime
-							wx.setStorageSync('createTime', createTime)
-							uni.switchTab({
-								url: '/pages/index/index'
-							})
-						} else {
-							console.log('患者端授权登录失败')
-						}
-					})
-			}
-		},
-		//授权
-		shouquan() {
-			this.$axios
-				.post(
-					`/blade-auth/oauth/token?password=ceb8447cc4ab78d2ec34cd9f11e4bed2&tenantId=000000&username=test`,
-					{},
-					{
-						headers: {
-							Authorization: 'Basic c2FiZXI6c2FiZXJfc2VjcmV0'
-						}
-					}
-				)
-				.then((res) => {
-					console.log(res)
-					var access_token = res.access_token
-					this.access_token = res.access_token
-					// localStorage.setItem('access_token',access_token)网页
-					wx.setStorageSync('access_token', access_token) //小程序
-				})
-		}
-	}
-}
-</script>
-<style lang="scss">
-.containar {
-	background: #fff;
-	.avatarUrl {
-		padding: 80rpx 0 40rpx;
-		background: #fff;
-		button {
-			background: #fff;
-			line-height: 80rpx;
-			height: auto;
-			width: auto;
-			padding: 20rpx 30rpx;
-			margin: 0;
-			// display: flex;
-			justify-content: center;
-			align-items: center;
-			.refreshIcon {
-				// width: 160rpx;
-				// height: 160rpx;
-				border-radius: 50%;
-			}
-			.jt {
-				width: 14rpx;
-				height: 28rpx;
-			}
-		}
-	}
-	.nickname {
-		background: #fff;
-		padding: 20rpx 30rpx 80rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		.weui-input {
-			padding-left: 60rpx;
-		}
-	}
-	.btn {
-		width: 100%;
-		.btn-sub {
-			width: 670rpx;
-			margin: 80rpx auto 0;
-			height: 90rpx;
-			background: rgba(30, 125, 251, 1);
-			border-radius: 45rpx;
-			line-height: 90rpx;
-			text-align: center;
-			font-size: 36rpx;
-			color: #fff;
-		}
-	}
-}
-</style>

BIN
static/my/portrait.jpg


BIN
static/my/portrait.png


+ 24 - 0
uni_modules/uni-countdown/changelog.md

@@ -0,0 +1,24 @@
+## 1.2.2(2022-01-19)
+- 修复 在微信小程序中样式不生效的bug
+## 1.2.1(2022-01-18)
+- 新增 update 方法 ,在动态更新时间后,刷新组件
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-countdown](https://uniapp.dcloud.io/component/uniui/uni-countdown)
+## 1.1.3(2021-10-18)
+- 重构
+- 新增 font-size 支持自定义字体大小
+## 1.1.2(2021-08-24)
+- 新增 支持国际化
+## 1.1.1(2021-07-30)
+- 优化 vue3下小程序事件警告的问题
+## 1.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.5(2021-06-18)
+- 修复 uni-countdown 重复赋值跳两秒的 bug
+## 1.0.4(2021-05-12)
+- 新增 组件示例地址
+## 1.0.3(2021-05-08)
+- 修复 uni-countdown 不能控制倒计时的 bug
+## 1.0.2(2021-02-04)
+- 调整为uni_modules目录规范

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/en.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "day",
+	"uni-countdown.h": "h",
+	"uni-countdown.m": "m",
+	"uni-countdown.s": "s"
+}

+ 8 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/index.js

@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+	en,
+	'zh-Hans': zhHans,
+	'zh-Hant': zhHant
+}

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hans.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "天",
+	"uni-countdown.h": "时",
+	"uni-countdown.m": "分",
+	"uni-countdown.s": "秒"
+}

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hant.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "天",
+	"uni-countdown.h": "時",
+	"uni-countdown.m": "分",
+	"uni-countdown.s": "秒"
+}

+ 271 - 0
uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue

@@ -0,0 +1,271 @@
+<template>
+	<view class="uni-countdown">
+		<text v-if="showDay" :style="[timeStyle]" class="uni-countdown__number">{{ d }}</text>
+		<text v-if="showDay" :style="[splitorStyle]" class="uni-countdown__splitor">{{dayText}}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text>
+		<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : hourText }}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ i }}</text>
+		<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : minuteText }}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ s }}</text>
+		<text v-if="!showColon" :style="[splitorStyle]" class="uni-countdown__splitor">{{secondText}}</text>
+	</view>
+</template>
+<script>
+	import {
+		initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from './i18n/index.js'
+	const {
+		t
+	} = initVueI18n(messages)
+	/**
+	 * Countdown 倒计时
+	 * @description 倒计时组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=25
+	 * @property {String} backgroundColor 背景色
+	 * @property {String} color 文字颜色
+	 * @property {Number} day 天数
+	 * @property {Number} hour 小时
+	 * @property {Number} minute 分钟
+	 * @property {Number} second 秒
+	 * @property {Number} timestamp 时间戳
+	 * @property {Boolean} showDay = [true|false] 是否显示天数
+	 * @property {Boolean} show-colon = [true|false] 是否以冒号为分隔符
+	 * @property {String} splitorColor 分割符号颜色
+	 * @event {Function} timeup 倒计时时间到触发事件
+	 * @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
+	 */
+	export default {
+		name: 'UniCountdown',
+		emits: ['timeup'],
+		props: {
+			showDay: {
+				type: Boolean,
+				default: true
+			},
+			showColon: {
+				type: Boolean,
+				default: true
+			},
+			start: {
+				type: Boolean,
+				default: true
+			},
+			backgroundColor: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333'
+			},
+			fontSize: {
+				type: Number,
+				default: 14
+			},
+			splitorColor: {
+				type: String,
+				default: '#333'
+			},
+			day: {
+				type: Number,
+				default: 0
+			},
+			hour: {
+				type: Number,
+				default: 0
+			},
+			minute: {
+				type: Number,
+				default: 0
+			},
+			second: {
+				type: Number,
+				default: 0
+			},
+			timestamp: {
+				type: Number,
+				default: 0
+			}
+		},
+		data() {
+			return {
+				timer: null,
+				syncFlag: false,
+				d: '00',
+				h: '00',
+				i: '00',
+				s: '00',
+				leftTime: 0,
+				seconds: 0
+			}
+		},
+		computed: {
+			dayText() {
+				return t("uni-countdown.day")
+			},
+			hourText(val) {
+				return t("uni-countdown.h")
+			},
+			minuteText(val) {
+				return t("uni-countdown.m")
+			},
+			secondText(val) {
+				return t("uni-countdown.s")
+			},
+			timeStyle() {
+				const {
+					color,
+					backgroundColor,
+					fontSize
+				} = this
+				return {
+					color,
+					backgroundColor,
+					fontSize: `${fontSize}px`,
+					width: `${fontSize * 22 / 14}px`, // 按字体大小为 14px 时的比例缩放
+ 					lineHeight: `${fontSize * 20 / 14}px`,
+					borderRadius: `${fontSize * 3 / 14}px`,
+				}
+			},
+			splitorStyle() {
+				const { splitorColor, fontSize, backgroundColor } = this
+				return {
+					color: splitorColor,
+					fontSize: `${fontSize * 12 / 14}px`,
+					margin: backgroundColor ? `${fontSize * 4 / 14}px` : ''
+				}
+			}
+		},
+		watch: {
+			day(val) {
+				this.changeFlag()
+			},
+			hour(val) {
+				this.changeFlag()
+			},
+			minute(val) {
+				this.changeFlag()
+			},
+			second(val) {
+				this.changeFlag()
+			},
+			start: {
+				immediate: true,
+				handler(newVal, oldVal) {
+					if (newVal) {
+						this.startData();
+					} else {
+						if (!oldVal) return
+						clearInterval(this.timer)
+					}
+				}
+
+			}
+		},
+		created: function(e) {
+			this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+			this.countDown()
+		},
+		// #ifndef VUE3
+		destroyed() {
+			clearInterval(this.timer)
+		},
+		// #endif
+		// #ifdef VUE3
+		unmounted() {
+			clearInterval(this.timer)
+		},
+		// #endif
+		methods: {
+			toSeconds(timestamp, day, hours, minutes, seconds) {
+				if (timestamp) {
+					return timestamp - parseInt(new Date().getTime() / 1000, 10)
+				}
+				return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
+			},
+			timeUp() {
+				clearInterval(this.timer)
+				this.$emit('timeup')
+			},
+			countDown() {
+				let seconds = this.seconds
+				let [day, hour, minute, second] = [0, 0, 0, 0]
+				if (seconds > 0) {
+					day = Math.floor(seconds / (60 * 60 * 24))
+					hour = Math.floor(seconds / (60 * 60)) - (day * 24)
+					minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
+					second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
+				} else {
+					this.timeUp()
+				}
+				if (day < 10) {
+					day = '0' + day
+				}
+				if (hour < 10) {
+					hour = '0' + hour
+				}
+				if (minute < 10) {
+					minute = '0' + minute
+				}
+				if (second < 10) {
+					second = '0' + second
+				}
+				this.d = day
+				this.h = hour
+				this.i = minute
+				this.s = second
+			},
+			startData() {
+				this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+				if (this.seconds <= 0) {
+					this.seconds = this.toSeconds(0, 0, 0, 0, 0)
+					this.countDown()
+					return
+				}
+				clearInterval(this.timer)
+				this.countDown()
+				this.timer = setInterval(() => {
+					this.seconds--
+					if (this.seconds < 0) {
+						this.timeUp()
+						return
+					}
+					this.countDown()
+				}, 1000)
+			},
+			update(){
+				this.startData();
+			},
+			changeFlag() {
+				if (!this.syncFlag) {
+					this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+					this.startData();
+					this.syncFlag = true;
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	$font-size: 14px;
+
+	.uni-countdown {
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		align-items: center;
+
+		&__splitor {
+			margin: 0 2px;
+			font-size: $font-size;
+			color: #333;
+		}
+
+		&__number {
+			border-radius: 3px;
+			text-align: center;
+			font-size: $font-size;
+		}
+	}
+</style>

+ 86 - 0
uni_modules/uni-countdown/package.json

@@ -0,0 +1,86 @@
+{
+  "id": "uni-countdown",
+  "displayName": "uni-countdown 倒计时",
+  "version": "1.2.2",
+  "description": "CountDown 倒计时组件",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "countdown",
+    "倒计时"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 10 - 0
uni_modules/uni-countdown/readme.md

@@ -0,0 +1,10 @@
+
+
+## CountDown 倒计时
+> **组件名:uni-countdown**
+> 代码块: `uCountDown`
+
+倒计时组件。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-countdown)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 1 - 0
util/api.js

@@ -1,4 +1,5 @@
 // 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 = "http://192.168.161.232:8080"
 export const myRequest = (options) => {
 export const myRequest = (options) => {
 	uni.showLoading({
 	uni.showLoading({