Browse Source

no message

DaMowang 2 years ago
parent
commit
5e257d8c2e

+ 7 - 5
src/app.scss

@@ -1,11 +1,12 @@
 /**app.wxss**/
 page {
+    color: #333;
     min-height: 100%;
     background: #F5F6F8;
 }
 
 view,text,div {
-    color: #333;
+    // color: #333;
     word-break: break-all;
     font-family: "SourceHanSansSC-Regular";
     box-sizing: border-box;
@@ -46,14 +47,15 @@ view,text,div {
 /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
 @font-face {
     font-family: 'iconfont';  /* Project id 3748689 */
-    src: url('//at.alicdn.com/t/c/font_3748689_1e2ueg3k0fi.woff2?t=1688545388819') format('woff2'),
-         url('//at.alicdn.com/t/c/font_3748689_1e2ueg3k0fi.woff?t=1688545388819') format('woff'),
-         url('//at.alicdn.com/t/c/font_3748689_1e2ueg3k0fi.ttf?t=1688545388819') format('truetype');
+    src: url('//at.alicdn.com/t/c/font_3748689_ve67hfiiel.woff2?t=1689921473246') format('woff2'),
+         url('//at.alicdn.com/t/c/font_3748689_ve67hfiiel.woff?t=1689921473246') format('woff'),
+         url('//at.alicdn.com/t/c/font_3748689_ve67hfiiel.ttf?t=1689921473246') format('truetype');
   }
 
 .iconfont {
     font-family: "iconfont" !important;
     font-style: normal;
+    color: #333;
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
 }
@@ -61,9 +63,9 @@ view,text,div {
 .clearfix:before,
 .clearfix:after {
     content: "";
-    display: block;
     height: 0;
     clear: both;
+    display: block;
     visibility: hidden;
 }
 

+ 0 - 22
src/components/uni-popup/message.js

@@ -1,22 +0,0 @@
-export default {
-	created() {
-		if (this.type === 'message') {
-			// 不显示遮罩
-			this.maskShow = false 
-			// 获取子组件对象
-			this.childrenMsg = null
-		}
-	},
-	methods: {
-		customOpen() {
-			if (this.childrenMsg) {
-				this.childrenMsg.open()
-			}
-		},
-		customClose() {
-			if (this.childrenMsg) {
-				this.childrenMsg.close()
-			}
-		}
-	}
-}

+ 0 - 25
src/components/uni-popup/popup.js

@@ -1,25 +0,0 @@
-import message from './message.js';
-// 定义 type 类型:弹出类型:top/bottom/center
-const config = {
-	// 顶部弹出
-	top:'top',
-	// 底部弹出
-	bottom:'bottom',
-	// 居中弹出
-	center:'center',
-	// 消息提示
-	message:'top',
-	// 对话框
-	dialog:'center',
-	// 分享
-	share:'bottom',
-}
-
-export default {
-	data(){
-		return {
-			config:config
-		}
-	},
-	mixins: [message],
-}

+ 0 - 243
src/components/uni-popup/uni-popup-dialog.vue

@@ -1,243 +0,0 @@
-<template>
-	<view class="uni-popup-dialog">
-		<view class="uni-dialog-title">
-			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{title}}</text>
-		</view>
-		<view class="uni-dialog-content">
-			<text class="uni-dialog-content-text" v-if="mode === 'base'">{{content}}</text>
-			<input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus" >
-		</view>
-		<view class="uni-dialog-button-group">
-			<view class="uni-dialog-button" @click="close">
-				<text class="uni-dialog-button-text">取消</text>
-			</view>
-			<view class="uni-dialog-button uni-border-left" @click="onOk">
-				<text class="uni-dialog-button-text uni-button-color">确定</text>
-			</view>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	/**
-	 * PopUp 弹出层-对话框样式
-	 * @description 弹出层-对话框样式
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
-	 * @property {String} value input 模式下的默认值
-	 * @property {String} placeholder input 模式下输入提示
-	 * @property {String} type = [success|warning|info|error] 主题样式
-	 *  @value success 成功
-	 * 	@value warning 提示
-	 * 	@value info 消息
-	 * 	@value error 错误
-	 * @property {String} mode = [base|input] 模式、
-	 * 	@value base 基础对话框
-	 * 	@value input 可输入对话框
-	 * @property {String} content 对话框内容
-	 * @property {Boolean} beforeClose 是否拦截取消事件
-	 * @event {Function} confirm 点击确认按钮触发
-	 * @event {Function} close 点击取消按钮触发
-	 */
-
-	export default {
-		name: "uniPopupDialog",
-		props: {
-			value: {
-				type: [String, Number],
-				default: ''
-			},
-			placeholder: {
-				type: [String, Number],
-				default: '请输入内容'
-			},
-			/**
-			 * 对话框主题 success/warning/info/error	  默认 success
-			 */
-			type: {
-				type: String,
-				default: 'error'
-			},
-			/**
-			 * 对话框模式 base/input
-			 */
-			mode: {
-				type: String,
-				default: 'base'
-			},
-			/**
-			 * 对话框标题
-			 */
-			title: {
-				type: String,
-				default: '提示'
-			},
-			/**
-			 * 对话框内容
-			 */
-			content: {
-				type: String,
-				default: ''
-			},
-			/**
-			 * 拦截取消事件 ,如果拦截取消事件,必须监听close事件,执行 done()
-			 */
-			beforeClose: {
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {
-				dialogType: 'error',
-				focus: false,
-				val: ""
-			}
-		},
-		inject: ['popup'],
-		watch: {
-			type(val) {
-				this.dialogType = val
-			},
-			mode(val) {
-				if (val === 'input') {
-					this.dialogType = 'info'
-				}
-			},
-			value(val) {
-				this.val = val
-			}
-		},
-		created() {
-			// 对话框遮罩不可点击
-			this.popup.mkclick = false
-			if (this.mode === 'input') {
-				this.dialogType = 'info'
-				this.val = this.value
-			} else {
-				this.dialogType = this.type
-			}
-		},
-		mounted() {
-			this.focus = true
-		},
-		methods: {
-			/**
-			 * 点击确认按钮
-			 */
-			onOk() {
-				this.$emit('confirm', () => {
-					this.popup.close()
-					if (this.mode === 'input') this.val = this.value
-				}, this.mode === 'input' ? this.val : '')
-			},
-			/**
-			 * 点击取消按钮
-			 */
-			close() {
-				if (this.beforeClose) {
-					this.$emit('close', () => {
-						this.popup.close()
-					})
-					return
-				}
-				this.popup.close()
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.uni-popup-dialog {
-		width: 300px;
-		border-radius: 15px;
-		background-color: #fff;
-	}
-
-	.uni-dialog-title {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		justify-content: center;
-		padding-top: 15px;
-		padding-bottom: 5px;
-	}
-
-	.uni-dialog-title-text {
-		font-size: 16px;
-		font-weight: 500;
-	}
-
-	.uni-dialog-content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		padding: 5px 15px 15px 15px;
-	}
-
-	.uni-dialog-content-text {
-		font-size: 14px;
-		color: #6e6e6e;
-	}
-
-	.uni-dialog-button-group {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		border-top-color: #f5f5f5;
-		border-top-style: solid;
-		border-top-width: 1px;
-	}
-
-	.uni-dialog-button {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-
-		flex: 1;
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		height: 45px;
-	}
-
-	.uni-border-left {
-		border-left-color: #f0f0f0;
-		border-left-style: solid;
-		border-left-width: 1px;
-	}
-
-	.uni-dialog-button-text {
-		font-size: 14px;
-	}
-
-	.uni-button-color {
-		color: $uni-color-primary;
-	}
-
-	.uni-dialog-input {
-		flex: 1;
-		font-size: 14px;
-	}
-
-	.uni-popup__success {
-		color: $uni-color-success;
-	}
-
-	.uni-popup__warn {
-		color: $uni-color-warning;
-	}
-
-	.uni-popup__error {
-		color: $uni-color-error;
-	}
-
-	.uni-popup__info {
-		color: #909399;
-	}
-</style>

+ 0 - 116
src/components/uni-popup/uni-popup-message.vue

@@ -1,116 +0,0 @@
-<template>
-	<view class="uni-popup-message" :class="'uni-popup__'+[type]">
-		<text class="uni-popup-message-text" :class="'uni-popup__'+[type]+'-text'">{{message}}</text>
-	</view>
-</template>
-
-<script>
-	
-	/**
-	 * PopUp 弹出层-消息提示
-	 * @description 弹出层-消息提示
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
-	 * @property {String} type = [success|warning|info|error] 主题样式
-	 *  @value success 成功
-	 * 	@value warning 提示
-	 * 	@value info 消息
-	 * 	@value error 错误
-	 * @property {String} message 消息提示文字
-	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
-	 */
-	
-	export default {
-		name: 'UniPopupMessage',
-		props: {
-			/**
-			 * 主题 success/warning/info/error	  默认 success
-			 */
-			type: {
-				type: String,
-				default: 'success'
-			},
-			/**
-			 * 消息文字
-			 */
-			message: {
-				type: String,
-				default: ''
-			},
-			/**
-			 * 显示时间,设置为 0 则不会自动关闭
-			 */
-			duration: {
-				type: Number,
-				default: 3000
-			}
-		},
-		inject: ['popup'],
-		data() {
-			return {}
-		},
-		created() {
-			this.popup.childrenMsg = this
-		},
-		methods: {
-			open() {
-				if (this.duration === 0) return
-				clearTimeout(this.popuptimer)
-				this.popuptimer = setTimeout(() => {
-					this.popup.close()
-				}, this.duration)
-			},
-			close() {
-				clearTimeout(this.popuptimer)
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	.uni-popup-message {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		background-color: #e1f3d8;
-		padding: 10px 15px;
-		border-color: #eee;
-		border-style: solid;
-		border-width: 1px;
-	}
-	.uni-popup-message-text {
-		font-size: 14px;
-		padding: 0;
-	}
-
-	.uni-popup__success {
-		background-color: #e1f3d8;
-	}
-
-	.uni-popup__success-text {
-		color: #67C23A;
-	}
-
-	.uni-popup__warn {
-		background-color: #faecd8;
-	}
-
-	.uni-popup__warn-text {
-		color: #E6A23C;
-	}
-
-	.uni-popup__error {
-		background-color: #fde2e2;
-	}
-
-	.uni-popup__error-text {
-		color: #F56C6C;
-	}
-
-	.uni-popup__info {
-		background-color: #F2F6FC;
-	}
-
-	.uni-popup__info-text {
-		color: #909399;
-	}
-</style>

+ 0 - 165
src/components/uni-popup/uni-popup-share.vue

@@ -1,165 +0,0 @@
-<template>
-	<view class="uni-popup-share">
-		<view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
-		<view class="uni-share-content">
-			<view class="uni-share-content-box">
-				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
-					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
-					<text class="uni-share-text">{{item.text}}</text>
-				</view>
-
-			</view>
-		</view>
-		<view class="uni-share-button-box">
-			<button class="uni-share-button" @click="close">取消</button>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: 'UniPopupShare',
-		props: {
-			title: {
-				type: String,
-				default: '分享到'
-			}
-		},
-		inject: ['popup'],
-		data() {
-			return {
-				bottomData: [{
-						text: '微信',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
-						name: 'wx'
-					},
-					{
-						text: '支付宝',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png',
-						name: 'wx'
-					},
-					{
-						text: 'QQ',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/gird-3.png',
-						name: 'qq'
-					},
-					{
-						text: '新浪',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-1.png',
-						name: 'sina'
-					},
-					{
-						text: '百度',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-7.png',
-						name: 'copy'
-					},
-					{
-						text: '其他',
-						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-5.png',
-						name: 'more'
-					}
-				]
-			}
-		},
-		created() {},
-		methods: {
-			/**
-			 * 选择内容
-			 */
-			select(item, index) {
-				this.$emit('select', {
-					item,
-					index
-				}, () => {
-					this.popup.close()
-				})
-			},
-			/**
-			 * 关闭窗口
-			 */
-			close() {
-				this.popup.close()
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	.uni-popup-share {
-		background-color: #fff;
-	}
-	.uni-share-title {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		justify-content: center;
-		height: 40px;
-	}
-	.uni-share-title-text {
-		font-size: 14px;
-		color: #666;
-	}
-	.uni-share-content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		justify-content: center;
-		padding-top: 10px;
-	}
-	
-	.uni-share-content-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		flex-wrap: wrap;
-		width: 360px;
-	}
-	
-	.uni-share-content-item {
-		width: 90px;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		justify-content: center;
-		padding: 10px 0;
-		align-items: center;
-	}
-	
-	.uni-share-content-item:active {
-		background-color: #f5f5f5;
-	}
-	
-	.uni-share-image {
-		width: 30px;
-		height: 30px;
-	}
-	
-	.uni-share-text {
-		margin-top: 10px;
-		font-size: 14px;
-		color: #3B4144;
-	}
-	
-	.uni-share-button-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		padding: 10px 15px;
-	}
-	
-	.uni-share-button {
-		flex: 1;
-		border-radius: 50px;
-		color: #666;
-		font-size: 16px;
-	}
-	
-	.uni-share-button::after {
-		border-radius: 50px;
-	}
-</style>

+ 0 - 294
src/components/uni-popup/uni-popup.vue

@@ -1,294 +0,0 @@
-<template>
-	<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
-		<uni-transition v-if="maskShow" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans"
-		 @click="onTap" />
-		<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
-			<view class="uni-popup__wrapper-box" @click.stop="clear">
-				<slot />
-			</view>
-		</uni-transition>
-	</view>
-</template>
-
-<script>
-	import uniTransition from '../uni-transition/uni-transition.vue'
-	import popup from './popup.js'
-	/**
-	 * PopUp 弹出层
-	 * @description 弹出层组件,为了解决遮罩弹层的问题
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
-	 * @property {String} type = [top|center|bottom] 弹出方式
-	 * 	@value top 顶部弹出
-	 * 	@value center 中间弹出
-	 * 	@value bottom 底部弹出
-	 * 	@value message 消息提示
-	 * 	@value dialog 对话框
-	 * 	@value share 底部分享示例
-	 * @property {Boolean} animation = [ture|false] 是否开启动画
-	 * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
-	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
-	 */
-
-	export default {
-		name: 'UniPopup',
-		components: {
-			uniTransition
-		},
-		props: {
-			// 开启动画
-			animation: {
-				type: Boolean,
-				default: true
-			},
-			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
-			// message: 消息提示 ; dialog : 对话框
-			type: {
-				type: String,
-				default: 'center'
-			},
-			// maskClick
-			maskClick: {
-				type: Boolean,
-				default: true
-			}
-		},
-		provide() {
-			return {
-				popup: this
-			}
-		},
-		mixins: [popup],
-		watch: {
-			/**
-			 * 监听type类型
-			 */
-			type: {
-				handler: function(newVal) {
-					this[this.config[newVal]]()
-				},
-				immediate: true
-			},
-			/**
-			 * 监听遮罩是否可点击
-			 * @param {Object} val
-			 */
-			maskClick(val) {
-				this.mkclick = val
-			}
-		},
-		data() {
-			return {
-				duration: 300,
-				ani: [],
-				showPopup: false,
-				showTrans: false,
-				maskClass: {
-					'position': 'fixed',
-					'bottom': 0,
-					'top': 0,
-					'left': 0,
-					'right': 0,
-					'backgroundColor': 'rgba(0, 0, 0, 0.4)'
-				},
-				transClass: {
-					'position': 'fixed',
-					'left': 0,
-					'right': 0,
-				},
-				maskShow: true,
-				mkclick: true,
-				popupstyle: 'top'
-			}
-		},
-		created() {
-			this.mkclick = this.maskClick
-			if (this.animation) {
-				this.duration = 300
-			} else {
-				this.duration = 0
-			}
-		},
-		methods: {
-			clear(e) {
-				// TODO nvue 取消冒泡
-				e.stopPropagation()
-			},
-			open() {
-				this.showPopup = true
-				this.$nextTick(() => {
-					new Promise(resolve => {
-						clearTimeout(this.timer)
-						this.timer = setTimeout(() => {
-							this.showTrans = true
-							// fixed by mehaotian 兼容 app 端
-							this.$nextTick(() => {
-								resolve();
-							})
-						}, 50);
-					}).then(res => {
-						// 自定义打开事件
-						clearTimeout(this.msgtimer)
-						this.msgtimer = setTimeout(() => {
-							this.customOpen && this.customOpen()
-						}, 100)
-						this.$emit('change', {
-							show: true,
-							type: this.type
-						})
-					})
-				})
-			},
-			close(type) {
-				this.showTrans = false
-				this.$nextTick(() => {
-					this.$emit('change', {
-						show: false,
-						type: this.type
-					})
-					clearTimeout(this.timer)
-					// 自定义关闭事件
-					this.customOpen && this.customClose()
-					this.timer = setTimeout(() => {
-						this.showPopup = false
-					}, 300)
-				})
-			},
-			onTap() {
-				if (!this.mkclick) return
-				this.close()
-			},
-			/**
-			 * 顶部弹出样式处理
-			 */
-			top() {
-				this.popupstyle = 'top'
-				this.ani = ['slide-top']
-				this.transClass = {
-					'position': 'fixed',
-					'left': 0,
-					'right': 0,
-				}
-			},
-			/**
-			 * 底部弹出样式处理
-			 */
-			bottom() {
-				this.popupstyle = 'bottom'
-				this.ani = ['slide-bottom']
-				this.transClass = {
-					'position': 'fixed',
-					'left': 0,
-					'right': 0,
-					'bottom': 0
-				}
-			},
-			/**
-			 * 中间弹出样式处理
-			 */
-			center() {
-				this.popupstyle = 'center'
-				this.ani = ['zoom-out', 'fade']
-				this.transClass = {
-					'position': 'fixed',
-					/* #ifndef APP-NVUE */
-					'display': 'flex',
-					'flexDirection': 'column',
-					/* #endif */
-					'bottom': 0,
-					'left': 0,
-					'right': 0,
-					'top': 0,
-					'justifyContent': 'center',
-					'alignItems': 'center'
-				}
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	.uni-popup {
-		position: fixed;
-		/* #ifndef APP-NVUE */
-		z-index: 99;
-		/* #endif */
-	}
-
-	.uni-popup__mask {
-		position: absolute;
-		top: 0;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		background-color: $uni-bg-color-mask;
-		opacity: 0;
-	}
-
-	.mask-ani {
-		transition-property: opacity;
-		transition-duration: 0.2s;
-	}
-
-	.uni-top-mask {
-		opacity: 1;
-	}
-
-	.uni-bottom-mask {
-		opacity: 1;
-	}
-
-	.uni-center-mask {
-		opacity: 1;
-	}
-
-	.uni-popup__wrapper {
-		/* #ifndef APP-NVUE */
-		display: block;
-		/* #endif */
-		position: absolute;
-	}
-
-	.top {
-		/* #ifdef H5 */
-		top: var(--window-top);
-		/* #endif */
-		/* #ifndef H5 */
-		top: 0;
-		/* #endif */
-	}
-
-	.bottom {
-		bottom: 0;
-	}
-
-	.uni-popup__wrapper-box {
-		/* #ifndef APP-NVUE */
-		display: block;
-		/* #endif */
-		position: relative;
-		/* iphonex 等安全区设置,底部安全区适配 */
-		/* #ifndef APP-NVUE */
-		padding-bottom: constant(safe-area-inset-bottom);
-		padding-bottom: env(safe-area-inset-bottom);
-		/* #endif */
-	}
-
-	.content-ani {
-		// transition: transform 0.3s;
-		transition-property: transform, opacity;
-		transition-duration: 0.2s;
-	}
-
-
-	.uni-top-content {
-		transform: translateY(0);
-	}
-
-	.uni-bottom-content {
-		transform: translateY(0);
-	}
-
-	.uni-center-content {
-		transform: scale(1);
-		opacity: 1;
-	}
-</style>

+ 4 - 6
src/main.js

@@ -42,12 +42,10 @@ Vue.prototype.getCache = getCache;
 // 上传
 import { up } from "@/utils/up";
 Vue.prototype.$up = up;
-// 页面跳转
-import { goto } from '@/utils/myfun.js';
-Vue.prototype.goto = goto;
-// 专区判断
-import { tidyTpye } from '@/utils/myfun.js';
-Vue.prototype.tidyTpye = tidyTpye;
+import { goto, tidyTpye, hotelStarf } from '@/utils/myfun.js';
+Vue.prototype.goto = goto;  // 页面跳转
+Vue.prototype.tidyTpye = tidyTpye;  // 专区判断
+Vue.prototype.hotelStarF = hotelStarf;  // 酒店星级判断
 
 App.mpType = 'app'
 

+ 8 - 7
src/manifest.json

@@ -64,14 +64,18 @@
             "postcss" : false,
             "minified" : true
         },
+		"optimization": true,
         "usingComponents" : true,
-        "permission": {
-            "scope.userLocation": {
-                "desc": "你的位置信息将用于搜索附近商家"
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于搜索附近商家"
             }
         },
         "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ],
-        "lazyCodeLoading": "requiredComponents"
+        "lazyCodeLoading" : "requiredComponents",
+        "uniStatistics" : {
+            "enable" : false
+        }
     },
     "mp-alipay" : {
         "usingComponents" : true,
@@ -85,9 +89,6 @@
     "mp-toutiao" : {
         "usingComponents" : true
     },
-    "uniStatistics" : {
-        "enable" : false
-    },
     "h5" : {
         // "devServer": {
         // 	"host": "h5.wmzx.com",

+ 19 - 6
src/pages.json

@@ -208,12 +208,6 @@
 				"enablePullDownRefresh": false
 			}
 		},
-		{
-			"path": "pages/integral-list/index",
-			"style": {
-				"navigationBarTitleText": "积分专区"
-			}
-		},
 		{
 			"path": "pages/pay-agreement/index",
 			"style": {
@@ -351,6 +345,25 @@
 						"navigationBarTitleText": "优惠券"
 					}
 				},
+				{
+					"path": "hotel/index",
+					"style": {
+						"navigationBarTitleText": "酒店民宿"
+					}
+				},
+				{
+					"path": "hotel/hotelList",
+					"style": {
+						"navigationBarTitleText": "酒店民宿"
+					}
+				},
+				{
+					"path": "hotel/hotel",
+					"style": {
+						"navigationBarTextStyle":"white",
+						"navigationStyle": "custom"
+					}
+				},
 
 				{
 					"path": "order/verificationCode",

+ 0 - 2
src/pages/account/consignment.vue

@@ -33,11 +33,9 @@ let app=getApp();
 var appEv = app.$vm.$options;
 import { post } from "@/request/api.js";
 import notGoods from '@/components/not-goods/index.vue'
-import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	export default {
 		components:{
 			notGoods,
-			uniPopup
 		},
 		data() {
 			return {

+ 0 - 499
src/pages/integral-list/index.vue

@@ -1,499 +0,0 @@
-<template>
-  <view class="container">
-
-    <!-- 积分兑换 -->
-    <view class="integral">
-      <view class="integral_title flex_r flex_ac">
-        <view class="inte_icon"></view>
-        <view class="inte_text">积分兑换</view>
-      </view>
-      <view class="goods flex_r" v-for="(item, index) in list" :key="index">
-        <image class="goods_img" :src="item.goodsThumbnailUrl" mode=""></image>
-        <view class="goods_info flex_c flex_jc">
-          <view class="goods_name ellipsis">{{ item.goodsName }}</view>
-          <view class="msg">{{ item.integral }}消费金</view>
-          <view
-            class="info_btn flex_r flex_ac flex_jc"
-            @tap="openConversion(item.goodsId)"
-            >立即兑换</view
-          >
-        </view>
-      </view>
-    </view>
-    <!-- 积分兑换-end -->
-
-    <!-- 兑换弹窗 -->
-    <uni-popup type="center" ref="conversion">
-      <view class="const_con">
-        <image
-          class="closePopup"
-          src="/static/my/f_close.png"
-          mode=""
-          @tap="closePopup"
-        ></image>
-        <view class="const_head flex_r flex_ac flex_jc">请选择兑换方式</view>
-        <view class="const_info">
-          <view class="frist_info flex_r flex_wrap">
-            <view
-              class="frist_list flex_c mar_b30"
-              v-for="(item, index) in way_list"
-              :key="index"
-              @tap="setCurrent(index)"
-            >
-              <view class="flex_r flex_ac">
-                <image
-                  class="frist_img"
-                  :src="
-                    currrent == index
-                      ? '/static/img/xuanzhong_icon.png'
-                      : '/static/img/weixuanzhong_icon.png'
-                  "
-                  mode=""
-                ></image>
-                <view class="frist_text">{{ item.name }}</view>
-              </view>
-              <view class="surplus">剩余({{ item.Integral }}积分)</view>
-            </view>
-          </view>
-          <view class="hint" v-if="isShow">积分不足请用余额或现金支付</view>
-          <view class="pay_way flex_r flex_ac flex_wrap mar_t30" v-if="isShow">
-            <view class="frist_list flex_c">
-              <view class="flex_r flex_ac" @tap="setPayWay(0)">
-                <image
-                  class="frist_img"
-                  :src="
-                    pay_way == 0
-                      ? '/static/img/xuanzhong_icon.png'
-                      : '/static/img/weixuanzhong_icon.png'
-                  "
-                  mode=""
-                ></image>
-                <view class="frist_text">余额</view>
-              </view>
-            </view>
-            <view class="frist_list flex_c">
-              <view class="flex_r flex_ac" @tap="setPayWay(1)">
-                <image
-                  class="frist_img"
-                  :src="
-                    pay_way == 1
-                      ? '/static/img/xuanzhong_icon.png'
-                      : '/static/img/weixuanzhong_icon.png'
-                  "
-                  mode=""
-                ></image>
-                <view class="frist_text">现金</view>
-              </view>
-            </view>
-          </view>
-          <checkbox-group
-            class="flex_r flex_ac flex_jc"
-            @change="checkboxChange"
-          >
-            <label class="option_box mar_t30">
-              <checkbox
-                value="1"
-                :checked="checked"
-                color="#2DB389"
-                style="transform: scale(0.7)"
-              />
-              我已阅读同意<text @tap.stop="getProPage">《购买协议》</text>
-            </label>
-          </checkbox-group>
-          <view class="conversion flex_r flex_ac flex_jc" @tap="confimConver"
-            >确认兑换</view
-          >
-        </view>
-      </view>
-    </uni-popup>
-    <!-- 兑换弹窗-end -->
-  </view>
-</template>
-
-<script>
-let page = 1;
-let app = getApp();
-var appEv = app.$vm.$options;
-import uniPopup from "@/components/uni-popup/uni-popup.vue";
-export default {
-  components: { uniPopup },
-  data() {
-    return {
-      list: [], // 积分商品
-      checked: false, //是否选中协议
-      currrent: 0, // 选中的兑换方式
-      pay_way: 0, //选中的支付方式
-      isShow: false, // 是否显示现金支付
-      goodsId: "", // 选中的商品Id
-    };
-  },
-  onShow: function () {
-    page = 1;
-    this.list = [];
-    this.loadData();
-  },
-  methods: {
-    loadData: function () {
-      this.loadGoods();
-      this.integralMethodChange();
-    },
-    // 获取轮播图
-    loadBacnner: function () {
-      let that = this;
-      const info = reqApi.integralLunBo();
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            that.imgArr = res.data.list;
-          }
-        });
-      }
-    },
-    // 获取积分专区商品列表
-    loadGoods: function () {
-      let that = this;
-      let data = {
-        page: page,
-        limit: 10,
-      };
-      const info = reqApi.getInteGoods(data);
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            let obj = res.data.goods;
-            if (obj.length > 0) {
-              for (var i in obj) {
-                that.list.push(obj[i]);
-              }
-            } else {
-              if (page == 1) {
-                that.haveGoods = true;
-                page = -1;
-              } else {
-                page = -1;
-                appEv.errTips("暂无更多");
-              }
-            }
-          } else {
-            if (page == 1) {
-              that.haveGoods = true;
-              page = -1;
-            } else {
-              page = -1;
-              appEv.errTips("暂无更多");
-            }
-          }
-        });
-      }
-    },
-    // 获取兑换方式
-    integralMethodChange: function () {
-      let that = this;
-      const info = reqApi.integralMethodChange();
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            that.way_list = res.data.data;
-          }
-        });
-      }
-    },
-    // 更改方式
-    setCurrent: function (e) {
-      this.currrent = e;
-      this.pay_way = "";
-      this.isShow = false;
-    },
-    // 更改支付方式
-    setPayWay: function (e) {
-      this.pay_way = e;
-    },
-    // 确认兑换
-    confimConver: function () {
-      let that = this;
-      let isShow = this.isShow;
-      let pay_way = this.pay_way;
-      let checked = this.checked;
-      let currrent = this.currrent;
-      if (currrent === "") {
-        appEv.errTips("请选择兑换方式");
-        return false;
-      }
-      if (isShow && pay_way === "") {
-        appEv.errTips("请选择支付方式");
-        return false;
-      }
-      if (!checked) {
-        appEv.errTips("请阅读并同意购买协议");
-        return false;
-      }
-      let data = {
-        goodsId: this.goodsId,
-        xyType: 1,
-        integralType: this.way_list[this.currrent].type,
-        count: 1,
-      };
-      if (isShow) {
-        data.jeType = this.pay_way == 0 ? 4 : 5;
-      } else {
-        data.jeType = 3;
-      }
-
-      const info = reqApi.integralClickExchange(data);
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            appEv.errTips(res.data.msg);
-            let goodsId = that.goodsId;
-            let count = 1;
-            let goodsType = 5;
-            let ojsType = 1;
-            let payType = !isShow
-              ? 3
-              : isShow && pay_way == 0
-              ? 4
-              : isShow && pay_way == 1
-              ? 5
-              : isShow && that.way_list[that.currrent].Integral == 0
-              ? 6
-              : "";
-            setTimeout(() => {
-              uni.navigateTo({
-                url:
-                  "/pages/to-pay-list/index?goodsId=" +
-                  goodsId +
-                  "&count=" +
-                  count +
-                  "&goodsType=" +
-                  goodsType +
-                  "&ojsType=" +
-                  ojsType +
-                  "&payType=" +
-                  payType,
-              });
-            }, 800);
-          } else {
-            appEv.errTips(res.data.msg);
-            that.isShow = true;
-          }
-        });
-      }
-    },
-    // 更改协议选中情况
-    checkboxChange: function (e) {
-      let index = e.detail.value.indexOf("1");
-      if (index != -1) {
-        this.checked = true;
-      } else {
-        this.checked = false;
-      }
-    },
-    // 点击立即兑换打开弹窗
-    openConversion: function (e) {
-      this.goodsId = e;
-      this.$refs.conversion.open();
-    },
-    // 关闭立即兑换弹窗
-    closePopup: function () {
-      this.$refs.conversion.close();
-    },
-    getProPage: function () {
-      uni.navigateTo({
-        url: "/pages/protocol/index?type=" + 4,
-      });
-    },
-  },
-  onShareAppMessage: function () {
-    var path = "/pages/integral-list/index?agentId=1";
-    if (app.globalData.systemUserInfo && app.globalData.systemUserInfo.userId) {
-      path = path + "?agentId=" + app.globalData.systemUserInfo.userId;
-    }
-
-    var title = `让数字经济赋能美好生活!`;
-    return {
-      title: title,
-      path: path,
-    };
-  },
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    if (page != -1) {
-      var that = this;
-      setTimeout(function () {
-        ++page;
-        that.loadData();
-      }, 800);
-    }
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-// 页面配置
-page {
-  background: #f4f4f4;
-}
-.container {
-  padding: 30rpx;
-  box-sizing: border-box;
-}
-// 页面配置-end
-
-// 顶部广告图
-.banner_top {
-  width: 100%;
-  height: 360rpx;
-}
-// 顶部广告图-end
-
-// 积分兑换
-.integral {
-  width: 100%;
-  overflow: hidden;
-}
-.integral_title {
-  width: 100%;
-  overflow: hidden;
-  padding: 30rpx 0;
-}
-.goods_info {
-  width: calc(100% - 300rpx - 40rpx);
-  overflow: hidden;
-}
-.goods_img {
-  width: 300rpx;
-  height: 208rpx;
-  border-radius: 12rpx;
-  margin-right: 40rpx;
-}
-.inte_icon {
-  width: 22rpx;
-  height: 22rpx;
-  border-radius: 50%;
-  border: 3rpx solid #1bbd89;
-  box-sizing: border-box;
-}
-.goods_name {
-  width: 100%;
-  overflow: hidden;
-  font-family: "SourceHanSansCN-Bold";
-  font-size: 28rpx;
-  color: #1a1a1a;
-}
-.inte_text {
-  font-size: 32rpx;
-  color: #232323;
-  font-family: "SourceHanSansCN-Medium";
-  font-weight: 500;
-  line-height: 1;
-  margin-left: 20rpx;
-}
-.msg {
-  width: 100%;
-  overflow: hidden;
-  color: #18ba87;
-  font-size: 26rpx;
-  margin-top: 16rpx;
-  margin-bottom: 22rpx;
-  font-family: "SourceHanSansCN-Medium";
-}
-.goods {
-  width: 100%;
-  overflow: hidden;
-  background: #fff;
-  border-radius: 12rpx;
-  margin-bottom: 18rpx;
-  padding: 18rpx;
-  box-sizing: border-box;
-  align-items: initial;
-}
-.info_btn {
-  width: 124rpx;
-  height: 40rpx;
-  background-color: #1bbd89;
-  border-radius: 8rpx;
-  color: #fff;
-  font-size: 22rpx;
-  font-family: "SourceHanSansCN-Bold";
-  font-weight: bold;
-}
-// 积分兑换-end
-
-// 兑换弹窗
-.option_box {
-  font-size: 26rpx;
-}
-.option_box text {
-  color: #2db389;
-}
-.hint {
-  font-size: 20rpx;
-  color: #d54912;
-}
-.pay_way {
-  width: 100%;
-  overflow: hidden;
-}
-.frist_list {
-  width: 50%;
-  overflow: hidden;
-}
-.surplus {
-  font-size: 22rpx;
-  color: #a8a8a8;
-}
-.frist_text {
-  font-size: 28rpx;
-  color: #302f2f;
-}
-.frist_img {
-  width: 35rpx;
-  height: 35rpx;
-  margin-right: 32rpx;
-}
-.frist_info {
-  width: 100%;
-  overflow: hidden;
-  align-items: initial;
-}
-.closePopup {
-  width: 42rpx;
-  height: 42rpx;
-  position: absolute;
-  right: 0;
-  top: -65rpx;
-}
-.const_con {
-  width: 689rpx;
-  border-radius: 10rpx;
-  background: #fff;
-  position: relative;
-}
-.const_info {
-  width: 100%;
-  overflow: hidden;
-  padding: 30rpx 50rpx;
-  box-sizing: border-box;
-}
-.const_head {
-  width: 100%;
-  height: 97rpx;
-  border-bottom: 3rpx solid rgba(0, 0, 0, 0.15);
-  font-size: 40rpx;
-  color: #1bbd89;
-  font-family: "SourceHanSansCN-Medium";
-}
-.conversion {
-  width: 269rpx;
-  height: 68rpx;
-  background: #1bbe8a;
-  font-family: "SourceHanSansCN-Medium";
-  color: #fff;
-  font-size: 32rpx;
-  border-radius: 34rpx;
-  margin: 40rpx auto 0;
-}
-// 兑换弹窗-end
-</style>

+ 1 - 4
src/pages/my-tea-list/index.vue

@@ -70,12 +70,9 @@
 let app = getApp();
 var appEv = app.$vm.$options;
 import uniCopy from "@/utils/copy";
-import popup from "@/components/uni-popup/uni-popup.vue";
 import { post } from "@/request/api.js";
 export default {
-    components: {
-        popup,
-    },
+    components: {},
     data() {
         return {
             higherInfo: "",

+ 1 - 1
src/pages/orderingfood/merchantlist.vue

@@ -180,7 +180,7 @@ export default {
         .mm {
             margin: auto 0;
             text-align: center;
-            line-height: 108rpx;
+            line-height: 98rpx;
         }
     }
     .regional {

+ 1 - 1
src/pages/orderingfood/tabs.js

@@ -36,7 +36,7 @@ export default [
   },
   {
       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/83906365c174dcc7acf620d7247f80f9f1818d6epng",
-      url: "",
+      url: "/pagesB/hotel/index",
       tit: "酒店"
   },
   {

+ 0 - 2
src/pages/product/p_details.vue

@@ -112,7 +112,6 @@ let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
 import { post } from "@/request/api.js";
-import uniPopup from "@/components/uni-popup/uni-popup.vue";
 import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
 import swiperBanner from "@/components/swiperBanner";
 import uniGoodsNav from "@/components/uni-goods-nav/uni-goods-nav.vue";
@@ -120,7 +119,6 @@ import uniNumberBox from "@/components/uni-number-box/uni-number-box.vue";
 import authorizeModule from "@/components/authorize-module/index";
 export default {
     components: {
-        uniPopup,
         jyfParser,
         uniGoodsNav,
         swiperBanner,

+ 1 - 2
src/pages/product/productRetail.vue

@@ -36,10 +36,9 @@ let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
 import { post } from "@/request/api.js";
-import uniPopup from '@/components/uni-popup/uni-popup.vue'
 import notGoods from "@/components/not-goods/index.vue";
 export default {
-    components: { uniPopup, notGoods },
+    components: { notGoods },
     data() {
         return {
             goods: [], // 商品列表

+ 1 - 2
src/pages/sign/index.vue

@@ -74,10 +74,9 @@ var tim;
 let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
-import uniPopup from "@/components/uni-popup/uni-popup";
 import { post } from "@/request/api.js";
 export default {
-    components: { uniPopup },
+    components: {},
     data() {
         return {
             integerInfo: {}, // 积分详情

+ 4 - 1
src/pagesB/cinema/cinemaTicket.vue

@@ -34,6 +34,10 @@
                     <img class="await_img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/416c89124df9a69bb1cbfb55b1007b086031a57fpng" alt="">
                     <div class="txt">待出票</div>
                 </div>
+                <div class="await" v-else-if="ticket.orderStatus=='CLOSE'">
+                    <img class="await_img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/7e29ee15fa2aff20d026cf86023c2ae97238ffcbpng" alt="">
+                    <div class="txt">出票失败</div>
+                </div>
             </div>
             <div class="card detail">
                 <div class="tit">订单详情</div>
@@ -116,7 +120,6 @@ export default {
     },
     methods: {
         getTicket(da) {
-            // da = { tradeNo: "ML20230602756506924" }
             post("local/orderMovie", da).then(res => {
                 if (res.code == 0) {
                     if (res.data.detail.code == 200) {

+ 662 - 0
src/pagesB/components/date-picker/date-picker.vue

@@ -0,0 +1,662 @@
+<template>
+    <transition :name="transition">
+        <div class="calendar-tz" v-if="isShow" :class="isFixed&&'fixed'">
+            <slot name="header"></slot>
+            <div class="week-number">
+                <span v-for="(item,index) in weekList" :style="{color:(index==0||index==weekList.length-1)&&themeColor}" :key="index">{{item}}</span>
+            </div>
+            <p class="tips" v-if="title">{{title}}</p>
+            <div class="content" id="scrollWrap">
+                <div class="con" v-for="(item,index) in calendar" :key="index" :id="item.year+''+item.month">
+                    <h3 v-text="item.year + '年' + item.month + '月'"></h3>
+                    <span class="month-bg" :style="{color:getBetweenColor}">{{item.month}}</span>
+                    <ul class="each-month">
+                        <li class="each-day" v-for="(day,idx) in item.dayList" :key="idx" :class="[addClassBg(day, item.month, item.year)]" :style="{background:themeOpacityBg(day, item.month, item.year)}" @click="chooseDate(day, item.month, item.year)">
+                            <div :class="[addClassName(day, item.month, item.year)]" :style="{background:themeBg(day, item.month, item.year)}">
+                                <p class="day-tip" :style="{color:themeColor}"><i v-text="setTip(day, item.month, item.year,1)"></i></p>
+                                <p class="day">{{day?day:''}}</p>
+                                <p class="recent"><i v-text="setTip(day, item.month, item.year,2)"></i></p>
+                            </div>
+                        </li>
+                    </ul>
+                </div>
+            </div>
+			<div class="footer">
+				<div class="footbtn" @click="confirm">确认</div>
+			</div>
+        </div>
+    </transition>
+</template>
+<script>
+// 参数如下
+// is-show 控制控件的显示隐藏,模式false
+// start-date 默认当天,当mode=2、3的模式下分别为(酒店\往返)的出发日期
+// end-date 当mode=2、3的模式下分别为(酒店\往返)的离开日期
+// between-start 和 between-end 可以操作的日期范围
+// theme-color 日历的主题色,例 '#FF6600'或者简写'#f60'(默认#00B76C)
+// mode 模式选择(默认1标准模式),2酒店模式,3往返模式
+// transition 支持动画,属性为slide
+// init-month 初始月份数(默认6个月)最小1个月
+// title 日历顶部的一段文本
+// is-fixed 日历是否定位全屏显示,默认true
+// 回调函数
+// @callback:日期选择后获取到的数据(所有你想要的都有)
+export default {
+    props: {
+        isShow: { //是否显示
+            type: [Boolean],
+            default () {
+                return false;
+            }
+        },
+        isFixed: { //是否定位全屏
+            type: [Boolean],
+            default () {
+                return true;
+            }
+        },
+        transition: { //动画类型slide
+            type: [String],
+            default () {
+                return "";
+            }
+        },
+        title: { //头部的一段文本
+            type: [String, Object],
+            default () {
+                return "";
+            }
+        },
+        mode: { //模式:1普通日历,2酒店,3飞机往返
+            type: [String, Number],
+            default () {
+                return 1;
+            }
+        },
+        startDate: { //开始日期
+            type: [String, Object, Date]
+        },
+        endDate: { //结束日期
+            type: [String, Object, Date]
+        },
+        betweenStart: { //日历可选范围开始
+            type: [String, Object, Date],
+            default () {
+                return "";
+            }
+        },
+        betweenEnd: { //日历可选结束日期
+            type: [String, Object, Date],
+            default () {
+                return "";
+            }
+        },
+        initMonth: { //初始化的月数
+            type: [String, Number],
+            default () {
+                return 6;
+            }
+        },
+        themeColor: { //主题色
+            type: [String],
+            default: "#00B76C"
+        }
+    },
+    data() {
+        return {
+            startDates: "",
+            endDates: "",
+            betweenStarts: "",
+            betweenEnds: "",
+            calendar: [],
+            weekList: ["日", "一", "二", "三", "四", "五", "六"],
+			choose: {}
+        };
+    },
+    watch: {
+        // isShow() {
+        //     this.init();
+        // },
+        // betweenStart() {
+        //     this.init();
+        // },
+        // betweenEnd() {
+        //     this.init();
+        // }
+    },
+    mounted() {
+        this.init();
+    },
+    computed: {
+        //设置主题色入住离开之间的背景色
+        getBetweenColor() {
+            if (!this.themeColor) return;
+            var hex = this.themeColor;
+            if (hex.length == 4) {
+                hex = `#${hex[1]}${hex[1]}${hex[2]}${hex[2]}${hex[3]}${hex[3]}`;
+            }
+            var str = "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + ",0.1)";
+            return str;
+        }
+    },
+    methods: {
+        init() {
+            var date = new Date();
+            this.year = date.getFullYear();
+            this.month = date.getMonth() + 1;
+            this.day = date.getDate();
+            this.today = new Date(this.year + "/" + this.month + "/" + this.day) * 1;
+            if (!this.startDate) {
+                const year = date.getFullYear(),
+                    month = date.getMonth() + 1,
+                    day = date.getDate();
+                this.startDates = this.resetTime(year + "/" + month + "/" + day);
+                this.startYear = year;
+                this.startMonth = month;
+            } else {
+                this.startDates = this.resetTime(this.startDate);
+                var dd = this.startDate.replace(/-/g, "/").split("/");
+                this.startYear = dd[0];
+                this.startMonth = dd[1];
+            }
+            if (!this.endDate) {
+                var temp = this.startDates + 24 * 60 * 60 * 1000;
+                var dateTemp = new Date(temp);
+                const year = dateTemp.getFullYear(),
+                    month = dateTemp.getMonth() + 1,
+                    day = dateTemp.getDate();
+                this.endDates = this.resetTime(year + "/" + month + "/" + day);
+                this.endYear = year;
+                this.endMonth = month;
+            } else {
+                this.endDates = this.resetTime(this.endDate);
+                var dd = this.endDate.replace(/-/g, "/").split("/");
+                this.endYear = dd[0];
+                this.endMonth = dd[1];
+            }
+			this.choose = {
+                startStr: this.dateFormat(this.startDates),
+                endStr: this.dateFormat(this.endDates),
+				dayCount: (this.endDates - this.startDates) / 24 / 3600 / 1000
+			}
+            this.betweenStarts = this.resetTime(this.betweenStart);
+            this.betweenEnds = this.resetTime(this.betweenEnd);
+            this.createClendar(); //创建日历数据
+        },
+        //创建每个月日历数据,传入月份1号前面用null填充
+        createDayList(month, year) {
+            const count = this.getDayNum(month, year),
+                _week = new Date(year + "/" + month + "/1").getDay();
+            let list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
+            for (let i = 29; i <= count; i++) {
+                list.push(i);
+            }
+            for (let i = 0; i < _week; i++) {
+                list.unshift(null);
+            }
+            return list;
+        },
+        //计算传入月份有多少天
+        getDayNum(month, year) {
+            let dayNum = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+            if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
+                dayNum[1] = 29;
+            }
+            return dayNum[month - 1];
+        },
+        //根据当天和结束日期创建日历数据
+        createClendar() {
+            var yearTemp = this.year;
+            var monthTemp = this.month;
+            if (!!this.betweenStarts) {
+                //如果有范围起始日期,可选范围从betweenStart开始
+                yearTemp = new Date(this.betweenStarts).getFullYear();
+                monthTemp = new Date(this.betweenStarts).getMonth() + 1;
+            }
+            this.calendar = [];
+            for (let i = 0; i < this.initMonth; i++) {
+                let year = yearTemp;
+                let month = monthTemp + i;
+                let _monthData = {
+                    dayList: [],
+                    month: "",
+                    year: ""
+                };
+                var m = Math.ceil(month / 12);
+                if (m > 0) {
+                    year += m - 1;
+                } else {
+                    year += m - 1;
+                }
+                if (month > 12) {
+                    month = month % 12 == 0 ? 12 : month % 12;
+                }
+                if (month <= 0) {
+                    month = 12 + month % 12;
+                }
+                _monthData.year = year;
+                _monthData.month = month;
+                _monthData.dayList = this.createDayList(month, year);
+                this.calendar.push(_monthData);
+            }
+            //h5默认页面加载到当前日期start-date的位置
+            if (document) {
+                this.scrollTop(this.startYear, this.startMonth);
+            }
+        },
+        scrollTop(year, month) {
+            var id = year + "" + parseInt(month)
+            setTimeout(() => {
+                var obj = document.getElementById(id)
+                if (!obj) return
+                var wrap = document.getElementById("scrollWrap");
+                wrap.scrollTop = obj.offsetTop - 40;
+            }, 0);
+        },
+        //添加日历样式
+        addClassName(day, month, year) {
+            if (!day) return;
+            const _date = new Date(year + "/" + month + "/" + day);
+            let className = [];
+            if (_date.getDay() == 0 || _date.getDay() == 6) { //周末或周六样式
+                className.push('weekend')
+            }
+            if (_date * 1 == this.today) {
+                className.push("today");
+            }
+            if (this.mode == 1) {
+                if (_date * 1 == this.startDates) {
+                    className.push("trip-time");
+                }
+            } else {
+                if (_date * 1 == this.startDates || _date * 1 == this.endDates) {
+                    className.push("trip-time");
+                }
+            }
+            if (this.betweenStarts) {
+                _date * 1 < this.betweenStarts && className.push("disabled");
+            } else {
+                _date * 1 < this.today && className.push("disabled"); //当天和结束日期之外不可选
+            }
+            _date * 1 > this.betweenEnds && className.push("disabled");
+            return className.join(" ");
+        },
+        //入住离开的区间背景色
+        addClassBg(day, month, year) {
+            if (!day) return;
+            const _date = this.resetTime(year + "/" + month + "/" + day);
+            let className = [];
+            if (_date >= this.startDates && _date <= this.endDates && this.mode > 1) {
+                className.push("between");
+            }
+            return className.join(" ");
+        },
+        //theme入住离开的区间背景色
+        themeOpacityBg(day, month, year) {
+            if (!this.themeColor) return;
+            if (!day) return;
+            const _date = this.resetTime(year + "/" + month + "/" + day);
+            if (_date >= this.startDates && _date <= this.endDates && this.mode > 1) {
+                return this.getBetweenColor;
+            }
+        },
+        //theme获取普通日期选中样式背景
+        themeBg(day, month, year) {
+            if (!this.themeColor) return;
+            const _date = this.resetTime(year + "/" + month + "/" + day);
+            //正常模式
+            if (this.mode == 1) {
+                if (_date == this.startDates) {
+                    return this.themeColor;
+                }
+            } else {
+                //酒店和往返模式
+                if (_date == this.startDates || _date == this.endDates) {
+                    return this.themeColor;
+                }
+            }
+        },
+        //清除时间 时 分 秒 毫秒
+        resetTime(dateStr) {
+            var date = new Date(dateStr.replace(/-/g, "/"));
+            date.setHours(0);
+            date.setMinutes(0);
+            date.setSeconds(0);
+            date.setMilliseconds(0);
+            return date * 1;
+        },
+        //flag==1(返回今天,明天,后天),flag==2(返回入住,离开,去返)
+        setTip(day, month, year, flag) {
+            if (!day) return
+            var tip = ""
+            var _date = this.resetTime(year + "/" + month + "/" + day);
+            if (flag == 1) {
+                if (_date == this.today) {
+                    tip = "今天";
+                } else if (_date - this.today == 24 * 3600 * 1000) {
+                    tip = "明天";
+                } else if (_date - this.today == 2 * 24 * 3600 * 1000) {
+                    tip = "后天";
+                }
+                return tip
+            } else {
+                if (this.mode == 2) {
+                    if (_date == this.endDates) {
+                        tip = "离开";
+                    } else if (_date == this.startDates) {
+                        tip = "入住";
+                    }
+                } else if (this.mode == 3) {
+                    if (_date == this.startDates && !this.endDates) {
+                        tip = "去/返";
+                    } else {
+                        if (_date == this.endDates) {
+                            tip = "返程";
+                        } else if (_date == this.startDates) {
+                            tip = "去程";
+                        }
+                    }
+                }
+                return tip;
+            }
+        },
+        //是否是选中当天,或者入住离开当天
+        isCurrent(day, month, year) {
+            if (!day) {
+                return false;
+            }
+            const _date = this.resetTime(year + "/" + month + "/" + day);
+            //正常模式
+            if (this.mode == 1) {
+                if (_date == this.startDates) {
+                    return true;
+                }
+            } else {
+                //酒店和往返模式
+                if (_date == this.startDates || _date == this.endDates) {
+                    return true;
+                }
+            }
+        },
+        dateFormat(times) {
+            let date = new Date(times);
+            let recent = "";
+            if (times == this.today) {
+                recent = "今天";
+            } else if (times - this.today === 24 * 3600 * 1000) {
+                recent = "明天";
+            } else if (times - this.today === 2 * 24 * 3600 * 1000) {
+                recent = "后天";
+            }
+            var year = date.getFullYear()
+            var month = parseInt(date.getMonth() + 1) > 9 ? parseInt(date.getMonth() + 1) : '0' + parseInt(date.getMonth() + 1)
+            var day = date.getDate() > 9 ? date.getDate() : '0' + date.getDate()
+            return {
+                dateStr: year + "-" + month + "-" + day,
+                week: "周" + this.weekList[date.getDay()],
+                recent,
+				year,
+				month: Number(month),
+				day: Number(day),
+            };
+        },
+        chooseDate(day, month, year) {
+            const _date = this.resetTime(year + "/" + month + "/" + day);
+            const week = this.weekList[new Date(_date).getDay()];
+            //判断日期区域是否可点击
+            if (!day) return;
+            if (this.betweenStarts) {
+                if (_date * 1 < this.betweenStarts) return;
+            } else {
+                if (_date < this.today) return;
+            }
+            if (_date > this.betweenEnds) return;
+            //判断酒店或者往返模式的选择逻辑
+            if (this.startDates && this.endDates && _date > this.endDates) {
+                this.startDates = _date;
+                this.endDates = "";
+            } else if (this.endDates && _date > this.endDates) {
+                this.endDates = _date;
+            } else if (_date >= this.startDates && _date <= this.endDates) {
+                this.startDates = _date;
+                this.endDates = "";
+            } else if (_date < this.startDates) {
+                this.startDates = _date;
+                this.endDates = "";
+            } else if (_date > this.startDates) {
+                if (this.mode == 1) {
+                    this.startDates = _date;
+                } else {
+                    this.endDates = _date;
+                }
+            }
+            const choose = {
+                startStr: this.dateFormat(this.startDates)
+            };
+            if (this.mode == 1) {
+                // this.$emit("callback", choose);
+				this.choose = choose;
+            } else if (this.mode == 2 && this.startDates && this.endDates) {
+                choose.dayCount = (this.endDates - this.startDates) / 24 / 3600 / 1000;
+                choose.endStr = this.dateFormat(this.endDates);
+                // this.$emit("callback", choose);
+				this.choose = choose;
+            } else if (this.mode == 3) {
+                if (this.startDates && this.endDates) {
+                    choose.dayCount = (this.endDates - this.startDates) / 24 / 3600 / 1000;
+                    choose.endStr = this.dateFormat(this.endDates);
+                } else if (this.startDates && !this.endDates) {
+                    choose.dayCount = 0;
+                    choose.endStr = this.dateFormat(this.startDates);
+                }
+                // this.$emit("callback", choose);
+				this.choose = choose;
+            }
+        },
+		confirm(){
+			let da = Object.assign({}, this.choose)
+			this.$emit("callback", da);
+		},
+		getInit(){
+        	this.init();
+        	this.confirm();
+		}
+    }
+};
+</script>
+<style lang="scss" scoped>
+$color: #00B76C;
+
+.calendar-tz {
+    width: 100%;
+    height: 100vh;
+    background: #fff;
+    display: -webkit-box;
+    display: flex;
+    -webkit-flex-direction: column;
+    flex-direction: column;
+
+    &.fixed {
+        position: fixed;
+        width: 100%;
+        height: 100%;
+        left: 0;
+        top: 0;
+        z-index: 900;
+    }
+
+    .week-number {
+        background: #fff;
+        padding: 0 1%;
+        box-shadow: 0 2px 15px rgba(100, 100, 100, 0.1);
+
+        span {
+            display: inline-block;
+            text-align: center;
+            padding: 12px 0;
+            font-size: 14px;
+            width: 14.28%;
+
+            &:first-child,
+            &:last-child {
+                color: $color;
+            }
+        }
+    }
+
+    .tips {
+        padding: 6px 10px;
+        background: #fff7dc;
+        font-size: 12px;
+        color: #9e8052;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    .content {
+        -webkit-box-flex: 1;
+        flex: 1;
+        overflow-y: scroll;
+        -webkit-overflow-scrolling: touch;
+
+        .con {
+            color: #333;
+            padding-top: 10px;
+            position: relative;
+
+            h3 {
+                width: 100%;
+                font-weight: normal;
+                text-align: center;
+                font-size: 16px;
+                padding: 10px 0;
+            }
+
+            .month-bg {
+                position: absolute;
+                text-align: center;
+                opacity: 0.4;
+                left: 0;
+                right: 0;
+                bottom: 0;
+                top: 20%;
+                font-size: 220px;
+                font-weight: bold;
+                color: #f8f8f8;
+            }
+
+            .each-month {
+                display: block;
+                width: 98%;
+                font-size: 0;
+                margin: 0 auto;
+                padding-left: 0;
+                padding-bottom: 10px;
+                border-bottom: 1px solid #eee;
+
+                .each-day {
+                    position: relative;
+                    display: inline-block;
+                    text-align: center;
+                    vertical-align: middle;
+                    width: 14.28%;
+                    font-size: 16px;
+                    height: 50px;
+                    margin: 2px auto;
+
+                    div {
+                        display: inline-block;
+                        font-size: 14px;
+                        width: 98%;
+                        height: 100%;
+                        justify-content: space-around;
+                        display: -webkit-box;
+                        display: flex;
+                        -webkit-flex-direction: column;
+                        flex-direction: column;
+                        border-radius: 4px;
+                    }
+
+                    &.between {
+                        background: rgba(75, 217, 173, 0.1);
+                    }
+
+                    .day {
+                        font-size: 16px;
+                    }
+
+                    .day-tip,
+                    .recent {
+                        font-size: 10px;
+                        height: 14px;
+
+                        i {
+                            font-size: 10px;
+                        }
+                    }
+
+                    .recent {
+                        color: #ccc;
+                    }
+
+                    .disabled {
+                        color: #ccc !important;
+
+                        .day-tip {
+                            color: #ccc !important;
+                        }
+                    }
+
+                    .today {
+                        background: rgba(100, 100, 100, 0.1);
+                    }
+
+                    .trip-time {
+                        background: $color;
+                        color: #fff !important;
+
+                        .recent,
+                        .day-tip {
+                            color: #fff !important;
+                        }
+                    }
+
+                    .weekend {
+                        color: $color;
+                    }
+                }
+            }
+        }
+    }
+}
+
+/***右侧进入动画***/
+.slide-enter-active,
+.slide-leave-active {
+    -webkit-transition: all 0.2s ease;
+    transition: all 0.2s ease;
+}
+
+.slide-enter,
+.slide-leave-to {
+    -webkit-transform: translateX(100%);
+    transform: translateX(100%);
+}
+
+.footer{
+    height: 150rpx;
+    .footbtn{
+        margin-top: 16rpx;
+        width: calc(100% - 64rpx);
+        margin-left: 32rpx;
+        text-align: center;
+        background-color: $color;
+        color: #fff;
+        font-size: 36rpx;
+        height: 76rpx;
+        line-height: 76rpx;
+        border-radius: 38rpx;
+    }
+}
+</style>

+ 168 - 0
src/pagesB/components/h-address/address.vue

@@ -0,0 +1,168 @@
+<template>
+	<view class="t-index-address">
+		<scroll-view class="t-index-address__scroll-view" :scroll-into-view="scrollview" :scroll-y="true" :enable-flex="true">
+			<div class="city_hot">
+				<div class="hot_item" v-for="(i,s) in hotCitys" :key="s" @click="$emit('select', i)">{{ i.cityName }}</div>
+			</div>
+			<view :id="group.initials" v-for="group in cityList" :key="group.initials">
+				<view class="t-index-address__anchor">
+					<text>{{ group.initials }}</text>
+				</view>
+				<view class="t-index-address__list">
+					<view class="t-index-address__cell" v-for="(city, index) in group.list" :key="index" @click="$emit('select', city)">
+						<text>{{ city.cityName }}</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+		<view class="t-index-address__sidebar">
+			<view class="t-index-address__index" v-for="group in cityList" :key="group.initials" @touchstart.stop.prevent="onTouchMove(group.initials)" @touchend.stop.prevent="onTouchStop" @touchcancel.stop.prevent="onTouchStop">
+				<span>{{ group.initials }}</span>
+			</view>
+		</view>
+		<view class="t-index-address__alert" v-if="touchmove">
+			<text>{{ activeIndex }}</text>
+		</view>
+	</view>
+</template>
+<script>
+import { post } from "@/request/api.js";
+
+export default {
+	data() {
+		return {
+			scrollview: "A",
+			hotCitys: [],
+			cityList: [],
+			activeIndex: "A",
+			touchmove: false,
+		};
+	},
+	watch: {
+		activeIndex(value) {
+			this.scrollview = value;
+		},
+	},
+	methods: {
+		initCityList() {
+			post("local/hotel/hotCity").then(res => {
+				if (res.code == 0) {
+					this.hotCitys = res.data;
+				}
+			})
+			post("local/hotel/cityList").then(res => {
+				if (res.code == 0) {
+					let json = [];
+					for (const k in res.data) {
+						json.push(res.data[k])
+					}
+					this.cityList = json;
+				}
+			})
+		},
+		onTouchMove(index) {
+			this.activeIndex = index;
+			this.touchmove = true;
+		},
+		onTouchStop() {
+			this.touchmove = false;
+		},
+	},
+	mounted() {
+		this.initCityList();
+	},
+};
+</script>
+<style lang="scss" scoped>
+.t-index-address {
+	width: 100%;
+	height: 100vh;
+	background: #fff;
+	position: relative;
+	z-index: 888;
+
+	&__scroll-view {
+		width: 100%;
+		height: 100%;
+		max-height: 100vh;
+	}
+
+	&__anchor {
+		padding: 15rpx 30rpx;
+		width: 100%;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #606266;
+		background-color: rgb(245, 245, 245);
+	}
+
+	&__list {
+		padding: 0 70rpx 0 30rpx;
+	}
+
+	&__cell {
+		height: 100rpx;
+		line-height: 100rpx;
+		border-bottom: 1rpx solid #f2f2f2;
+
+		&:last-child {
+			border: none;
+		}
+	}
+
+	&__sidebar {
+		position: fixed;
+		top: 50%;
+		right: 0;
+		transform: translateY(-50%);
+		z-index: 99;
+	}
+
+	&__index {
+		padding: 10rpx 20rpx;
+		font-size: 22rpx;
+		font-weight: 500;
+		line-height: 1;
+	}
+
+	&__alert {
+		position: fixed;
+		top: 50%;
+		right: 90rpx;
+		z-index: 99;
+		margin-top: -60rpx;
+		width: 120rpx;
+		height: 120rpx;
+		font-size: 50rpx;
+		color: #fff;
+		border-radius: 24rpx;
+		background-color: rgba(0, 0, 0, 0.5);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+}
+
+.city_hot {
+	padding: 28rpx 32rpx;
+	display: grid;
+	justify-content: space-between;
+	// 划分列 功能函数关键字 repeat (auto-fill,100rpx)
+	// 根据子元素的盒子的份额自动计算可以平铺几次
+	grid-template-columns: repeat(auto-fill, 100rpx);
+	// grid-gap 是 row-gap 和 column-gap 的简写形式。
+	grid-gap: 0 1px;
+	margin-bottom: -10rpx;
+
+	.hot_item {
+		width: 100rpx;
+		text-align: center;
+		height: 44rpx;
+		line-height: 44rpx;
+		font-size: 24rpx;
+		background-color: rgba($color: #000, $alpha: 0.08);
+		margin-bottom: 10rpx;
+		border-radius: 8rpx;
+	}
+}
+</style>

+ 395 - 0
src/pagesB/components/nni-slider/slider.vue

@@ -0,0 +1,395 @@
+<template>
+    <view class="cj-slider" @mousemove="onSliMouseMove" @mouseup="onSliMouseUp">
+        <!-- <view class="mouse-move" :style="{height: moveHeight + 'rpx'}"></view> -->
+        <view class="cj-slider__line" :class="[disabled ? 'cj-slider--disabled' : '']" :style="{ backgroundColor: inactiveColor, height: height + 'rpx' }" @click="onClick"></view>
+        <view class="cj-slider__gap" :style="[ barStyle, { height: height + 'rpx', backgroundColor: activeColor } ]" @click="onClick">
+            <view class="cj-slider__button-wrap" @mousedown="onMouseDown(1, $event)" @mousemove="onMouseMove($event)" @mouseleave="onMouseLeave(1)" @mouseup="onMouseUp(1)" @touchstart="onTouchStart(1, $event)" @touchmove="onTouchMove(1, $event)" @touchend="onTouchEnd(1)" @touchcancel="onTouchEnd">
+                <slot v-if="$slots.default  || $slots.$default" />
+                <view v-else class="cj-slider__button" :style="[blockStyle, { height: blockWidth + 'rpx', width: blockWidth + 'rpx', borderColor: activeColor }]">
+                    <!-- <text class="numsize">{{value[0]}}</text> -->
+                </view>
+            </view>
+            <view class="cj-slider__button-wrap2" @mousedown="onMouseDown(2, $event)" @mousemove="onMouseMove($event)" @mouseleave="onMouseLeave(2)" @mouseup="onMouseUp(2)" @touchstart="onTouchStart(2, $event)" @touchmove="onTouchMove(2, $event)" @touchend="onTouchEnd(2)" @touchcancel="onTouchEnd">
+                <slot v-if="$slots.default  || $slots.$default" />
+                <view v-else class="cj-slider__button" :style="[blockStyle, { height: blockWidth + 'rpx', width: blockWidth + 'rpx', borderColor: activeColor }]">
+                    <!-- <text class="numsize">{{value[1]}}</text> -->
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+/**
+ * slider 滑块选择器
+ * @property {Number | String} value 滑块默认值(默认[最小值,最大值])
+ * @property {Number | String} min 最小值(默认0)
+ * @property {Number | String} max 最大值(默认100)
+ * @property {Number | String} step 步长(默认1)
+ * @property {Number | String} blockWidth 滑块宽度,高等于宽(30)
+ * @property {Number | String} height 滑块条高度,单位rpx(默认6)
+ * @property {String} inactiveColor 底部条背景颜色(默认#c0c4cc)
+ * @property {String} activeColor 主题颜色(默认#2979ff)
+ * @property {Object} blockStyle 给滑块自定义样式,对象形式
+ * @property {Boolean} disabled 是否禁用滑块(默认为false)
+ * @property {Number | String} moveHeight 鼠标离开滑块仍可滑动的区域高度,单位rpx(默认100)
+ * @event {Function} start 滑动触发
+ * @event {Function} moving 正在滑动中
+ * @event {Function} end 滑动结束
+ * @example <cj-slider v-model="value" />
+ */
+export default {
+    name: 'cj-slider',
+    props: {
+        // 当前进度百分比值
+        value: {
+            type: Array,
+            default () {
+                return []
+            }
+        },
+        // 是否禁用滑块
+        disabled: {
+            type: Boolean,
+            default: false
+        },
+        // 滑块宽度,高等于宽,单位rpx
+        blockWidth: {
+            type: [Number, String],
+            default: 36
+        },
+        // 最小值
+        min: {
+            type: [Number, String],
+            default: 0
+        },
+        // 最大值
+        max: {
+            type: [Number, String],
+            default: 100
+        },
+        // 步进值
+        step: {
+            type: [Number, String],
+            default: 1
+        },
+        // 滑块条高度,单位rpx
+        height: {
+            type: [Number, String],
+            default: 6
+        },
+        // 主题颜色
+        activeColor: {
+            type: String,
+            default: '#f17474'
+        },
+        // 进度条的背景颜色
+        inactiveColor: {
+            type: String,
+            default: '#c0c4cc'
+        },
+        // 用户对滑块的自定义颜色
+        blockStyle: {
+            type: Object,
+            default () {
+                return {};
+            }
+        },
+        // 鼠标可离开滑块后仍能滑动的范围高度
+        moveHeight: {
+            type: [Number, String],
+            default: '500'
+        }
+    },
+    data() {
+        return {
+            mouseLeave: false, // 鼠标移出了滑块
+            mouseType: 1, // 1 左滑块 2 右滑块
+            mouseDown: false, // 鼠标按下
+            startX: 0,
+            status: 'end',
+            newValue: 0,
+            distanceX: 0,
+            startValue: 0,
+            barStyle: {},
+            sliderRect: {
+                left: 0,
+                width: 0
+            }
+        };
+    },
+    created() {
+        // 如果不是长度为2的数组,默认值为[最小值, 最大值]
+        if (Object.prototype.toString.call(this.value) == '[object Array]' && this.value.length === 2) {
+            this.updateValue(this.value[0], this.value[1], false);
+        } else {
+            this.$emit('input', Array(this.min, this.max))
+        }
+    },
+	watch: {
+		value: {
+			immediate: true,
+			deep: true,
+			handler(va) {
+				// 如果不是长度为2的数组,默认值为[最小值, 最大值]
+				if (Object.prototype.toString.call(va) == '[object Array]' && va.length === 2) {
+					this.updateValue(va[0], va[1], false);
+				} else {
+					this.$emit('input', Array(this.min, this.max))
+				}
+			}
+		}
+	},
+    mounted() {
+        // 获取滑块条的尺寸信息
+        this.$uGetRect('.cj-slider').then(rect => {
+            this.sliderRect = rect;
+        });
+    },
+    methods: {
+        onTouchStart(type, event) {
+            if (this.disabled) return;
+            this.startX = 0;
+            // 触摸点集
+            let touches = event.touches[0];
+            // 触摸点到屏幕左边的距离
+            this.startX = touches.clientX;
+            // 此处的this.value虽为props值,但是通过$emit('input')进行了修改
+            this.startValue = type === 1 ? this.format(this.value[0]) : this.format(this.value[1]);
+            // 标示当前的状态为开始触摸滑动
+            this.status = 'start';
+        },
+        onMouseDown(type, event) {
+            if (this.disabled) return;
+            this.mouseDown = true;
+            this.mouseType = type
+            this.startX = event.clientX || 0;
+            this.startValue = type === 1 ? this.format(this.value[0]) : this.format(this.value[1]);
+            this.status = 'start';
+        },
+        onTouchMove(type, event) {
+            if (this.disabled) return;
+            // 连续触摸的过程会一直触发本方法,但只有手指触发且移动了才被认为是拖动了,才发出事件
+            // 触摸后第一次移动已经将status设置为moving状态,故触摸第二次移动不会触发本事件
+            if (this.status == 'start') this.$emit('start');
+            let touches = event.touches[0]
+            // 滑块的左边不一定跟屏幕左边接壤,所以需要减去最外层父元素的左边值
+            this.distanceX = touches.clientX - this.sliderRect.left
+            // 获得移动距离对整个滑块的百分比值,此为带有多位小数的值,不能用此更新视图
+            // 否则造成通信阻塞,需要每改变一个step值时修改一次视图
+            this.newValue = (this.distanceX / this.sliderRect.width) * (this.max - this.min) + this.min
+            this.status = 'moving'
+            // 发出moving事件
+            this.$emit('moving');
+            if (type === 1) {
+                this.updateValue(this.newValue, this.format(this.value[1]), true);
+            } else {
+                this.updateValue(this.format(this.value[0]), this.newValue, true);
+            }
+        },
+        onMouseMove(event) {
+            if (!this.mouseDown) return;
+            if (this.disabled) return;
+            if (this.status == 'start') this.$emit('start');
+            // 滑块的左边不一定跟屏幕左边接壤,所以需要减去最外层父元素的左边值
+            this.distanceX = event.clientX - this.sliderRect.left
+            // 获得移动距离对整个滑块的百分比值,此为带有多位小数的值,不能用此更新视图
+            // 否则造成通信阻塞,需要每改变一个step值时修改一次视图
+            this.newValue = (this.distanceX / this.sliderRect.width) * (this.max - this.min) + this.min
+            this.status = 'moving'
+            // 发出moving事件
+            this.$emit('moving');
+            if (this.mouseType === 1) {
+                this.updateValue(this.newValue, this.format(this.value[1]), true);
+            } else {
+                this.updateValue(this.format(this.value[0]), this.newValue, true);
+            }
+        },
+        onMouseLeave(type) {
+            this.mouseLeave = true
+        },
+        onTouchEnd(type) {
+            if (this.disabled) return;
+            if (this.status === 'moving') {
+                if (type === 1) {
+                    this.updateValue(this.newValue, this.format(this.value[1]), true);
+                } else {
+                    this.updateValue(this.format(this.value[0]), this.newValue, true);
+                }
+                this.$emit('end');
+            }
+            this.status = 'end';
+        },
+        onMouseUp(type) {
+            this.mouseDown = false;
+            this.mouseLeave = false;
+            if (this.disabled) return;
+            if (this.status === 'moving') {
+                if (type === 1) {
+                    this.updateValue(this.newValue, this.format(this.value[1]), true);
+                } else {
+                    this.updateValue(this.format(this.value[0]), this.newValue, true);
+                }
+                this.$emit('end');
+            }
+            this.status = 'end';
+        },
+        onSliMouseUp() {
+            // 鼠标在滑块范围内松开
+            this.mouseDown = false;
+            this.mouseLeave = false;
+        },
+        onSliMouseMove(e) {
+            // 监听整个滑动内的鼠标移动,因为PC端只能监听到小滑块内的移动,移动过快鼠标移出了小滑块则移动失败。
+            if (!this.mouseDown) return;
+            if (!this.mouseLeave) return;
+            this.onMouseMove(e)
+        },
+        updateValue(value, value2, drag) {
+            // 去掉小数部分,同时也是对step步进的处理
+            const widthB1 = this.format(value)
+            const widthB2 = this.format(value2)
+            const widthB1B = Math.round((widthB1 - this.min) * 100 / (this.max - this.min))
+            const widthB2B = Math.round((widthB2 - this.min) * 100 / (this.max - this.min))
+            // 不允许滑动的值超过max最大值,百分比也不能超过100
+            if (widthB1 > widthB2 || widthB2 > this.max || widthB2B > 100) return;
+            // 设置移动的百分比值
+            let barStyle = {
+                width: widthB2B - widthB1B + '%',
+                left: widthB1B + '%',
+            };
+            // 移动期间无需过渡动画
+            if (drag == true) {
+                barStyle.transition = 'none';
+            } else {
+                // 非移动期间,删掉对过渡为空的声明,让css中的声明起效
+                delete barStyle.transition;
+            }
+            // 修改value值,这里使用change改变,使用input H5桌面端会卡死,
+            this.$emit('input', Array(widthB1, widthB2));
+            this.barStyle = barStyle;
+        },
+        format(value) {
+            // 将小数变成整数,为了减少对视图的更新,造成视图层与逻辑层的阻塞
+            return Math.round(Math.max(this.min, Math.min(value, this.max)) / this.step) * this.step;
+        },
+        onClick(event) {
+            if (this.disabled) return;
+            // 直接点击滑块的情况,计算方式与onTouchMove方法相同
+            const widthB1 = this.value[0]
+            const widthB2 = this.value[1]
+            const value = this.format(((event.detail.x - this.sliderRect.left) / this.sliderRect.width) * (this.max - this
+                    .min) +
+                this.min);
+            if (value < widthB1 || (value - widthB1) <= (widthB2 - value)) {
+                // 点击位置在左滑块的左边 || 点击位置在中间,且靠近左滑块 => 移动左滑块到该位置
+                this.updateValue(value, widthB2, false)
+            } else {
+                // 点击位置在右滑块的右边 || 点击位置在中间,且靠近右滑块 => 移动右滑块到该位置
+                this.updateValue(widthB1, value, false)
+            }
+        },
+        $uGetRect(selector, all) {
+            // $uGetRect为uView自带的节点查询简化方法
+            return new Promise(resolve => {
+                uni.createSelectorQuery().
+                in(this)[all ? 'selectAll' : 'select'](selector)
+                    .boundingClientRect(rect => {
+                        if (all && Array.isArray(rect) && rect.length) {
+                            resolve(rect)
+                        }
+                        if (!all && rect) {
+                            resolve(rect)
+                        }
+                    })
+                    .exec()
+            })
+        },
+    }
+};
+</script>
+<style lang="scss" scoped>
+.cj-slider {
+    position: relative;
+    // background-color: #ebedf0;
+
+    &__line {
+        position: absolute;
+        width: 100%;
+        background-color: #ebedf0;
+    }
+
+    &__gap {
+        position: relative;
+        // 动画有bug,暂时取消
+        // transition: width 0.2s;
+        background-color: #f17474;
+    }
+
+    &__button {
+        width: 24px;
+        height: 24px;
+        border-radius: 50%;
+        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
+        background-color: #fff;
+		border: 4rpx solid #f17474;
+        cursor: pointer;
+        position: relative;
+		box-sizing: border-box;
+
+        .numsize {
+            position: absolute;
+            width: 60rpx;
+            height: 40rpx;
+            background-color: #f17474;
+            color: #fff;
+            top: -50rpx;
+            left: 50%;
+            margin-left: -30rpx;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            border-radius: 10rpx;
+
+            &::after {
+                content: ' ';
+                position: absolute;
+                width: 0;
+                height: 0;
+                left: 22rpx;
+                top: 36rpx;
+                // border: 5rpx solid;   
+                // border-color: #f17474 transparent transparent #f17474;
+
+                border: 10rpx solid transparent;
+                border-top-color: #f17474;
+            }
+        }
+    }
+
+    &__button-wrap {
+        position: absolute;
+        top: 50%;
+        left: 0;
+        transform: translate3d(-50%, -50%, 0);
+    }
+
+    &__button-wrap2 {
+        position: absolute;
+        top: 50%;
+        right: 0;
+        transform: translate3d(50%, -50%, 0);
+    }
+}
+
+.cj-slider--disabled {
+    opacity: 0.5;
+}
+
+.mouse-move {
+    position: fixed;
+    left: 0;
+    right: 0;
+    transform: translateY(-50%);
+    opacity: 0;
+}
+</style>

+ 243 - 0
src/pagesB/components/swiper-preview/index.vue

@@ -0,0 +1,243 @@
+<template>
+    <view class="swiper-content" v-show="show">
+        <view class="hander-top">
+            <view class="icon-back-wrap" @click="onBack">
+                <image class="icon-back" src="@/pagesB/static/preview/icon-back.png" mode="widthFix" />
+            </view>
+            <view class="count">{{currentImg + 1}} / {{ imgs.length }}</view>
+            <view></view>
+        </view>
+        <swiper class="swiper-img" :current="currentImg" :duration="300" @change="changeSwiper">
+            <swiper-item class="swiper-item" v-for="(item, index) in imgs" :key="index">
+                <view class="img-page">
+                    <movable-area scale-area>
+                        <movable-view direction="all" scale="true" scale-min="1" scale-max="4">
+                            <image class="max-img" :src="item.path" :lazy-load="true" mode="widthFix" />
+                        </movable-view>
+                    </movable-area>
+                </view>
+            </swiper-item>
+        </swiper>
+        <view class="item-bottom">
+            <scroll-view class="scroll-view_H " :scroll-x="true" :scroll-into-view="scrollTopIndex" :scroll-with-animation="true" scroll-left="20">
+                <view class="img-page-box scroll-view-item_H" :class="currentImg == index ? 'img-page-checked' : ''" v-for="(item, index) in imgs" :key="index" :id="`scrollToIndex${index}`" @click.stop="toImg(index)">
+                    <image class="img" :src="item.path" mode="aspectFill" />
+                </view>
+            </scroll-view>
+        </view>
+        <view class="handle-wrap">
+            <view class="w-64 h-64" @click="isScale = !isScale">
+                <image v-show="isScale" class="w-64 h-64" src="@/pagesB/static/preview/icon-scale-yes.png" mode="widthFix" />
+                <image v-show="!isScale" class="w-64 h-64" src="@/pagesB/static/preview/icon-scale.png" mode="widthFix" />
+            </view>
+            <view class="w-64 h-64" @click="isCollect = !isCollect">
+                <image v-show="isCollect" class="w-64 h-64" src="@/pagesB/static/preview/icon-collect-yes.png" mode="widthFix" />
+                <image v-show="!isCollect" class="w-64 h-64" src="@/pagesB/static/preview/icon-collect.png" mode="widthFix" />
+            </view>
+            <view class="w-64 h-64" @click="isLike = !isLike">
+                <image v-show="isLike" class="w-64 h-64" src="@/pagesB/static/preview/icon-like-yes.png" mode="widthFix" />
+                <image v-show="!isLike" class="w-64 h-64" src="@/pagesB/static/preview/icon-like.png" mode="widthFix" />
+            </view>
+            <image class="w-64 h-64" src="@/pagesB/static/preview/icon-set-wallpaper.png" mode="widthFix" />
+            <image class="w-64 h-64" src="@/pagesB/static/preview/icon-share.png" mode="widthFix" />
+            <image class="w-64 h-64" src="@/pagesB/static/preview/icon-download.png" mode="widthFix" />
+        </view>
+    </view>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            show: false,
+            imgs: [
+                "https://pic2.zhimg.com/80/v2-6bc06520079e780ac1c550729f5cfa8d_1440w.webp",
+                "https://img.tukuppt.com/photo-big/00/02/23/6188eaff33ec07243.jpg",
+                "https://img0.baidu.com/it/u=4231555811,1903718579&fm=253&app=138&size=w931",
+                "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0509%2F1e1bac6cj00rbkpwf001ec000hs00q8c.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
+                "https://pic2.zhimg.com/80/v2-6bc06520079e780ac1c550729f5cfa8d_1440w.webp",
+                "https://img.tukuppt.com/photo-big/00/02/23/6188eaff33ec07243.jpg",
+                "https://img0.baidu.com/it/u=4231555811,1903718579&fm=253&app=138&size=w931",
+                "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0509%2F1e1bac6cj00rbkpwf001ec000hs00q8c.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
+            ],
+            currentImg: 0,
+            isPop: false,
+            scrollTopIndex: "",
+
+            isScale: false,
+            isCollect: false,
+            isLike: false,
+        };
+    },
+    onLoad(options) {},
+    methods: {
+        changeSwiper(e) {
+            this.currentImg = e.detail.current;
+            this.scrollTopIndex = `scrollToIndex${e.detail.current}`;
+        },
+        toImg(index) {
+            this.currentImg = index;
+        },
+        onBack() {
+            // uni.navigateBack();
+            this.show = false;
+        },
+        open(da){
+            let { imgs, current } = da;
+            this.imgs = imgs || [];
+            this.currentImg = current || 0;
+            this.show = true
+        },
+    },
+};
+</script>
+<style lang="scss" scoped>
+.swiper-content {
+    width: 100%;
+    height: 100vh;
+    position: fixed;
+    left: 0;
+    top: 0;
+}
+
+movable-view {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    width: 100%;
+    height: 100%;
+}
+
+movable-area {
+    position: fixed;
+    overflow: hidden;
+    width: 100%;
+    height: 100%;
+    transform: scale();
+}
+
+movable-view image {
+    width: 100%;
+}
+
+uni-image>img {
+    z-index: -1 !important;
+}
+
+.hander-top {
+    position: absolute;
+    z-index: 1000;
+    top: 108rpx;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    padding: 0 32rpx;
+    box-sizing: border-box;
+
+    .icon-back-wrap {
+        width: 64rpx;
+        height: 64rpx;
+
+        .icon-back {
+            width: 64rpx;
+            height: 64rpx;
+        }
+    }
+
+    .count {
+        box-sizing: border-box;
+        padding: 8rpx 24rpx;
+
+        color: #fff;
+        border-radius: 24rpx;
+        background: rgba(0, 0, 0, .4);
+
+        font-size: 28rpx;
+    }
+}
+
+.swiper-img {
+    width: 100vw;
+    height: 100vh;
+
+    background-color: #000;
+
+    .swiper-item {
+        width: 100vw;
+        height: 100vh;
+
+        .img-page {
+            display: flex;
+            align-items: center;
+
+            width: 100vw;
+            height: 100vh;
+
+            .max-img {
+                width: 100%;
+            }
+        }
+    }
+}
+
+.item-bottom {
+    position: fixed;
+    z-index: 9999;
+    bottom: 110rpx;
+    left: 0rpx;
+
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+
+    width: 100vw;
+
+    //  height: 200rpx;
+    padding: 30rpx;
+
+    transition: ease-in-out .3s;
+}
+
+.small-list-page {
+    min-height: 60rpx;
+}
+
+.scroll-Y {
+    height: 300rpx;
+}
+
+.scroll-view_H {
+    width: 100%;
+    box-sizing: border-box;
+    padding-right: 32rpx;
+    white-space: nowrap;
+}
+
+.scroll-view-item_H {
+    display: inline-block;
+
+    margin-right: 10rpx;
+
+    transition: ease-in .1s;
+    transform: scale(.8);
+
+    border-radius: 11rpx;
+    background: #c2c2c2;
+
+    &:last-child {
+        margin-right: 0;
+    }
+
+    .img {
+        display: block;
+
+        width: 160rpx;
+        height: 272rpx;
+    }
+}
+
+.img-page-checked {
+    transform: translateY(-28rpx) scale(1);
+}
+</style>

+ 298 - 0
src/pagesB/hotel/hotel.vue

@@ -0,0 +1,298 @@
+<template>
+    <div class="hotel">
+        <div class="head_img" @click="onpreview">
+            <image :src="detail.mainImage" mode="aspectFill" class="bg_img" />
+        </div>
+        <div class="head_info">
+            <div class="head_name flex_r flex_jb flex_ac">
+                <div class="name">{{ detail.hotelName }}</div>
+                <div class="h_tags">
+                    <span>{{ detail.avgScore }}分</span>
+                    <span>{{ hotelStarF(detail.hotelStar) }}</span>
+                </div>
+            </div>
+            <div class="h_address flex_r flex_jb flex_as">
+                <div class="address">{{ detail.address }}</div>
+                <div class="iconfont ico">&#xe6b3;</div>
+            </div>
+            <div class="RatePlan">
+                <div class="Room" v-for="(i,s) in RatePlan" :key="s">
+                    <div class="Room_row flex_r flex_jb" @click="onshow(s)">
+                        <div class="h_img">
+                            <div class="img_num">{{i.pictures.length}}</div>
+                            <image :src="i.pictures[0].path" mode="aspectFill" class="img"/>
+                        </div>
+                        <div class="info">
+                            <div class="RName">{{i.roomName}}</div>
+                            <div class="tegs">
+                                <span>{{ i.bedType }}</span>
+                                <span>{{ i.windowType }}</span>
+                                <span>{{ i.capacity }}人入住</span>
+                                <span>{{ i.useableArea }}</span>
+                            </div>
+                            <div class="tegs">
+                                <span>{{ i.floor }}</span>
+                            </div>
+                            <div class="item_price">
+                                <div class="dinB price" v-if="i.ratePlans[0]">{{ i.ratePlans[0].averagePrice }}</div>
+                                <div class="price" v-else>暂无报价</div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="Plans" v-if="i.show">
+                        <div class="p_li" v-for="(a,b) in i.ratePlans" :key="b">
+                            <div class="ratePlanName">
+                                <span>{{ a.ratePlanName }}</span>
+                                <span class="breakfast">{{ a.breakfast }}</span>
+                            </div>
+                            <div class="cancelRule">{{ a.cancelRule.desc }}</div>
+                            <div class="reserve flex_r flex_je flex_ae">
+                                <div class="price dinB">{{ a.averagePrice }}</div>
+                                <div class="reserve_btn"><div class="t1">预订</div>在线付</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 图片查看组件 -->
+        <preview ref="previewimg" />
+    </div>
+</template>
+
+<script>
+import preview from "@/pagesB/components/swiper-preview/index.vue";
+import { getCache } from "@/utils/storage.js";
+import { post } from "@/request/api.js";
+export default {
+    name: "hotel",
+    props: {},
+    components: { preview },
+    data() {
+        return {
+            query: {},
+            hotelID: "",
+            detail: {},
+            RatePlan: [],
+        };
+    },
+    methods: {
+        gethotel() {
+            let { checkInDate, checkOutDate } = this.query;
+            post("/local/hotel/detail", {
+                hotelID: this.hotelID,
+                checkInDate, checkOutDate,
+            }).then((res) => {
+                if (res.code == 0) {
+                    this.detail = res.data.data;
+                }
+            });
+            post("/local/hotel/room", {
+                hotelID: this.hotelID,
+                checkInDate, checkOutDate,
+            }).then((res) => {
+                if (res.code == 0) {
+                    this.RatePlan = res.data.data.rooms;
+                }
+            });
+        },
+        onpreview() {
+            if (this.detail.pictures.length) {
+                this.$refs.previewimg.open({
+                    imgs: this.detail.pictures,
+                    current: 0,
+                });
+            }
+        },
+        onshow(i){
+            this.$set(this.RatePlan[i],'show',!this.RatePlan[i].show)
+        }
+    },
+    onLoad(da) {
+        this.hotelID = da.id;
+        this.query = getCache("hotelquery");
+        this.gethotel();
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.head_img {
+    .bg_img {
+        width: 100%;
+        height: 460rpx;
+    }
+}
+.head_info {
+    padding: 0 30rpx;
+    .head_name {
+        font-size: 36rpx;
+        font-weight: 600;
+        padding: 8rpx 0;
+    }
+    .h_tags {
+        font-size: 25rpx;
+        font-weight: 400;
+        span {
+            margin-right: 18rpx;
+            &:last-child {
+                margin-right: 0;
+            }
+        }
+    }
+    .h_address {
+        padding: 8rpx 0;
+        margin-bottom: 30rpx;
+        .address {
+            width: calc(100% - 100rpx);
+            font-size: 24rpx;
+        }
+        .ico {
+            width: 60rpx;
+            height: 50rpx;
+            text-align: center;
+            line-height: 50rpx;
+            font-size: 50rpx;
+        }
+    }
+}
+.RatePlan{
+    .Room{
+        background-color: #fff;
+        padding: 15rpx 18rpx;
+        margin-bottom: 12rpx;
+        border-radius: 10rpx;
+        box-shadow: 4rpx 4rpx 18rpx 2rpx rgba(17, 18, 29, 0.1);
+        &:last-child{
+            margin-bottom: 0;
+        }
+        .h_img{
+            position: relative;
+            width: 160rpx;
+            height: 180rpx;
+            .img{
+                width: 160rpx;
+                height: 180rpx;
+                border-radius: 8rpx;
+            }
+            .img_num{
+                background-color: rgba($color: #000, $alpha: 0.6);
+                position: absolute;
+                right: 12rpx;
+                bottom: 6rpx;
+                color: #fff;
+                font-size: 26rpx;
+                padding: 0 10rpx;
+                border-radius: 6rpx;
+            }
+        }
+        .info{
+            position: relative;
+            width: calc(100% - 186rpx);
+            .RName{
+                font-size: 34rpx;
+                font-weight: 600;
+                margin-bottom: 8rpx;
+            }
+            .tegs{
+                font-size: 24rpx;
+                color: #666;
+                margin-bottom: 8rpx;
+                &:last-child{
+                    margin-bottom: 0;
+                }
+                span{
+                    margin-right: 16rpx;
+                    &:last-child{
+                        margin-right: 0;
+                    }
+                }
+            }
+            .item_price{
+                width: 100%;
+                text-align: right;
+                position: absolute;
+                bottom: 0;right: 0;
+            }
+            .price{
+                color: #666;
+                font-size: 28rpx;
+            }
+            .dinB{
+                font-size: 36rpx;
+                color: #00B76C;
+                &::before{
+                    content: "¥";
+                    font-size: 22rpx;
+                }
+                &::after{
+                    content: "起";
+                    margin-left: 6rpx;
+                    font-size: 22rpx;
+                }
+            }
+        }
+        .Plans{
+            margin-top: 20rpx;
+            padding: 16rpx 22rpx;
+            border-radius: 10rpx;
+            background-color: rgba($color: #000, $alpha: 0.05);
+        }
+        .p_li{
+            padding: 12rpx 0;
+            min-height: 100rpx;
+            margin-bottom: 10rpx;
+            border-bottom: 1rpx solid rgba($color: #000, $alpha: 0.05);
+            &:last-child{
+                margin-bottom: 0;
+                border-bottom: none;
+            }
+            .ratePlanName{
+                font-size: 30rpx;
+                font-weight: 600;
+                span{
+                    vertical-align: middle;
+                }
+            }
+            .breakfast{
+                font-size: 24rpx;
+                margin-top: 6rpx;
+                font-weight: 400;
+                margin-left: 16rpx;
+            }
+            .cancelRule{
+                font-size: 24rpx;
+                margin-top: 6rpx;
+                color: #555;
+            }
+            .reserve{
+                .price{
+                    font-size: 36rpx;
+                    color: #00B76C;
+                    margin-right: 20rpx;
+                    &::before{
+                        content: "¥";
+                        font-size: 24rpx;
+                    }
+                }
+                .reserve_btn{
+                    text-align: center;
+                    font-size: 20rpx;
+                    color: #555;
+                    border: 1rpx solid #00B76C;
+                    border-radius: 10rpx;
+                    width: 80rpx;
+                    .t1{
+                        background: #00B76C;
+                        color: #fff;
+                        font-size: 24rpx;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 129 - 0
src/pagesB/hotel/hotelList.vue

@@ -0,0 +1,129 @@
+<template>
+    <div class="hotelList">
+		<scroll-view @scrolltolower="scrolltolower" class="scroll-view" :scroll-y="true" :lower-threshold="100">
+            <div class="h_List">
+                <div class="hotel_item flex_r flex_jb" v-for="(i,s) in hotelList" :key="s" @click="hotelById(i.hotelID)">
+                    <image :src="i.mainImage" mode="aspectFill" class="h_img"/>
+                    <div class="info">
+                        <div class="hotelName">{{i.hotelName}}</div>
+                        <div class="address">{{ i.address }}</div>
+                        <div class="avgScore flex_r flex_jb">
+                            <div class="avgScore_num">
+                                <span>{{i.avgScore}}分</span>
+                                <span class="hotelStar">{{ hotelStarF(i.hotelStar) }}</span>
+                            </div>
+                            <div class="dinB price" v-if="i.startingPrice">{{ i.startingPrice }}</div>
+                            <div class="price" v-else>暂无报价</div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </scroll-view>
+    </div>
+</template>
+
+<script>
+import { getCache } from "@/utils/storage.js"
+import { post } from "@/request/api.js";
+export default {
+    name: "hotelList",
+    props: {},
+    components: {},
+    data() {
+        return {
+            query: {},
+            hotelList: []
+        };
+    },
+    methods: {
+        gethotelList(){
+            post("local/hotel/hotelList", this.query).then(res => {
+                if (res.code == 0) {
+                    this.hotelList = res.data.data.hotelList
+                }
+            })
+        },
+        scrolltolower(){
+            console.log("scrolltolower");
+        },
+        hotelById(id){
+            this.goto("/pagesB/hotel/hotel",{id});
+        }
+    },
+    onLoad(da) {
+        this.query = getCache("hotelquery");
+        this.gethotelList();
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.scroll-view{
+    height: 100vh;
+}
+.h_List{
+    padding: 28rpx 32rpx;
+}
+.hotel_item{
+    background-color: #fff;
+    padding: 26rpx 30rpx;
+    margin-bottom: 16rpx;
+    border-radius: 12rpx;
+    box-shadow: 4rpx 4rpx 18rpx 2rpx rgba(17, 18, 29, 0.1);
+    &:last-child{
+        margin-bottom: 0;
+    }
+    .h_img{
+        width: 160rpx;
+        height: 230rpx;
+        border-radius: 8rpx;
+    }
+    .info{
+        position: relative;
+        width: calc(100% - 186rpx);
+        .hotelName{
+            font-size: 34rpx;
+            font-weight: 600;
+            margin-bottom: 8rpx;
+        }
+        .address{
+            font-size: 24rpx;
+            color: #666;
+        }
+        .avgScore{
+            width: 100%;
+            position: absolute;
+            bottom: 0;right: 0;
+        }
+        .avgScore_num{
+            font-size: 26rpx;
+            .hotelStar{
+                margin-left: 16rpx;
+                font-size: 24rpx;
+            }
+            span{
+                vertical-align: middle;
+            }
+        }
+        .price{
+            color: #666;
+            font-size: 30rpx;
+        }
+        .dinB{
+            font-size: 36rpx;
+            color: #00B76C;
+            &::before{
+                content: "¥";
+                font-size: 22rpx;
+            }
+            &::after{
+                content: "起";
+                margin-left: 6rpx;
+                font-size: 22rpx;
+            }
+        }
+    }
+}
+</style>

+ 461 - 0
src/pagesB/hotel/index.vue

@@ -0,0 +1,461 @@
+<template>
+    <div class="hotel">
+        <div class="formbox">
+            <div class="tabtit">酒店预约</div>
+            <div class="formbar">
+                <div class="li flex_r flex_jb flex_ac">
+                    <div class="flex_r flex_ac">
+                        <div class="address" @click="showAddress = !showAddress">
+                            <span class="address_name">{{qda.cityName}}</span>
+                            <span class="iconfont ico">&#xeb6d;</span>
+                        </div>
+                        <div class="addressStr ellipsis">{{ addrStr }}</div>
+                    </div>
+                    <div @click="locationf" class="location">
+                        <span class="iconfont ico2">&#xe61e;</span>
+                        <div class="it">当前位置</div>
+                    </div>
+                </div>
+                <div class="li flex_r flex_jb flex_ac" @click="showCaledar = !showCaledar">
+                    <div class="day">
+                        <div class="ti">入住</div>
+                        <div class="daytxt">{{startStr.month}}月{{startStr.day}}日</div>
+                    </div>
+                    <div class="lab">共 {{dayCount}} 晚</div>
+                    <div class="day">
+                        <div class="ti">离店</div>
+                        <div class="daytxt">{{endStr.month}}月{{endStr.day}}日</div>
+                    </div>
+                </div>
+                <div class="li">
+                    <input type="text" v-model="qda.queryText" placeholder="关键字/位置/品牌/酒店名称">
+                </div>
+                <div class="li" @click="popupShow = true">
+                    <input type="text" placeholder="价格/星级">
+                </div>
+            </div>
+        </div>
+        <date-picker mode="2" ref="dayPicker" :isShow.sync="showCaledar" @callback="pickerChange" />
+        <h-address @select="selectaddress" v-show="showAddress" />
+        <dev class="ni_popup" v-if="popupShow">
+            <div class="starLevel">
+                <div class="h_numinfo">每晚均价<span class="msg">{{numinfo}}</span></div>
+                <div class="sliderBar">
+                    <div class="num flex_r flex_jb"><span>¥0</span><span>¥1500+</span></div>
+                    <div class="sb">
+                        <nni-slider v-model="priceRange" activeColor="#00B76C" max="1500" />
+                    </div>
+                </div>
+                <div class="nums">
+                    <div :class="{num_item:true,active:activef(i)}" v-for="(i,s) in priceRs" :key="s" @click="onRange(i)">{{i.txt}}</div>
+                </div>
+                <div class="LevelB">
+                    <div class="tit">星级</div>
+                    <div class="ls flex_r flex_jb">
+                        <div :class="{ls_i:true,active:Leve == i.v}" v-for="(i,s) in Levels" :key="s" @click="onLevel(i)">{{i.t}}</div>
+                    </div>
+                </div>
+                <div class="pbtn flex_r flex_jse">
+                    <div class="btn" @click="reset">重置</div>
+                    <div class="btn corg" @click="confirm">确认</div>
+                </div>
+            </div>
+        </dev>
+        <div class="footimg">
+            <image @click="search" class="btn" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/7603bae2564783682b68b025003cae9012f917dcpng" mode="widthFix">
+            <image class="img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2fd3f66be733feca588418d4a9537b3b1560431cpng" mode="widthFix">
+        </div>
+    </div>
+</template>
+<script>
+import DatePicker from "@/pagesB/components/date-picker/date-picker.vue";
+import HAddress from "@/pagesB/components/h-address/address.vue";
+import nniSlider from "@/pagesB/components/nni-slider/slider.vue";
+const showmap = new QQMapWX({ key: 'NWSBZ-ZUME4-LLTU6-XSQGB-YBKAT-U4FCZ' });
+import QQMapWX from '@/utils/qqmap-wx-jssdk.min.js';
+import { post } from "@/request/api.js";
+import { setCache } from "@/utils/storage.js"
+export default {
+    name: "hotel",
+    props: {},
+    components: {
+        DatePicker,
+        HAddress,
+        nniSlider
+    },
+    data() {
+        return {
+            qda: {
+                cityName: "",
+                cityCode: "",
+                checkInDate: "",
+                checkOutDate: "",
+                pageIndex: 1,
+                pageSize: 20,
+            },
+            showCaledar: false,
+            showAddress: false,
+            startDate: '',
+            endDate: '',
+            startStr: {},
+            endStr: {},
+            dayCount: 1,
+            addrStr: "",
+            popupShow: false,
+            priceRange: [],
+            numinfo: "",
+            priceRs: [
+                { p: [0, 100], txt: "¥100以下" },
+                { p: [100, 200], txt: "¥100-200" },
+                { p: [200, 300], txt: "¥200-300" },
+                { p: [300, 400], txt: "¥300-400" },
+                { p: [400, 600], txt: "¥400-600" },
+                { p: [600, 800], txt: "¥600-800" },
+                { p: [800, 1500], txt: "¥800-1500" },
+                { p: [1500,1500], txt: "¥1500以上" },
+            ],
+            Leve: undefined,
+            Levels: [
+                {v:2,t:"二星/经济"},
+                {v:3,t:"三星/舒适"},
+                {v:4,t:"四星/高档"},
+                {v:5,t:"五星/豪华"},
+            ]
+        };
+    },
+    methods: {
+        pickerChange(da) {
+            this.startStr = da.startStr;
+            this.endStr = da.endStr;
+            this.dayCount = da.dayCount;
+            this.qda.checkInDate = da.startStr.dateStr;
+            this.qda.checkOutDate = da.endStr.dateStr;
+            this.showCaledar = false
+        },
+        selectaddress(da) {
+            this.qda.cityName = da.cityName;
+            this.qda.cityCode = da.cityCode;
+            this.addrStr = ""
+            this.showAddress = false
+        },
+        search() {
+            let qd = Object.assign({}, this.qda)
+            setCache("hotelquery",qd);
+            this.goto("/pagesB/hotel/hotelList");
+        },
+        // 获取当前位置
+        async getLocation() {
+            let { lat, lng } = await uni.Location();
+            this.adres = { longitude: lng, latitude: lat };
+            this.getToCity()
+        },
+        getToCity() {
+            post("local/hotel/city", this.adres).then(res => {
+                if (res.code == 0) {
+                    let da = res.data
+                    this.qda.cityName = da.cityName;
+                    this.qda.cityCode = da.cityCode;
+                }
+            })
+        },
+        locationf() {
+            this.getLocation();
+            let that = this
+            showmap.reverseGeocoder({
+                success(result) {
+                    let da = result.result
+                    let { district, street, street_number } = da.address_component
+                    that.addrStr = district + street_number
+                    let { lat, lng } = da.location
+                    that.qda = { ...that.qda, longitude: lng, latitude: lat }
+                    console.log('逆地址解析:', result.result);
+                }
+            });
+        },
+        onRange(va){
+            this.priceRange = va.p
+            setTimeout(()=>{
+                this.numinfo = va.txt
+            },0)
+        },
+        activef(va){
+            if(va.p[0]==this.priceRange[0]&&va.p[1]==this.priceRange[1]){
+                return true
+            }else return false
+        },
+        onLevel(va){
+            if(this.Leve == va.v){
+                this.Leve = undefined
+            }else this.Leve = va.v
+        },
+        confirm(){
+            if(this.priceRange.length){
+                this.qda.minPrice = this.priceRange[0]
+                if(this.priceRange[0]!=this.priceRange[1]){
+                    this.qda.maxPrice = this.priceRange[1]
+                }else{
+                    delete this.qda.maxPrice;
+                }
+            }
+            if(this.Leve){
+                this.qda.hotelStars = this.Leve
+            }
+            this.popupShow = false
+        },
+        reset(){
+            this.priceRange = [];
+            delete this.qda.minPrice;
+            delete this.qda.maxPrice;
+            this.Leve = "";
+            delete this.qda.hotelStars;
+            this.popupShow = false
+        }
+    },
+    watch: {
+        priceRange: {
+            immediate: true,
+            deep: true,
+            handler(va) {
+                this.numinfo = `¥${va[0]} - ${va[1]}`
+            }
+        }
+    },
+    onLoad(da) {
+        this.$refs.dayPicker.getInit();
+        this.getLocation();
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+<style scoped lang='scss'>
+.hotel {
+    width: 100%;
+    height: 1350rpx;
+    background-image: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/d81f521c3f0e885edabe6bf86f9d5a0853f64cb0jpg");
+    background-size: 100% 100%;
+    position: relative;
+}
+
+.formbox {
+    width: calc(100% - 60rpx);
+    position: absolute;
+    left: 30rpx;
+    top: 450rpx;
+}
+
+.tabtit {
+    background-color: #fff;
+    width: 250rpx;
+    height: 80rpx;
+    line-height: 80rpx;
+    border-radius: 10rpx 10rpx 0 0;
+    font-size: 38rpx;
+    font-weight: 600;
+    text-align: center;
+    color: #00B76C;
+}
+
+.formbar {
+    background-color: #fff;
+    border-radius: 0 10rpx 10rpx 10rpx;
+    padding: 16rpx 40rpx 22rpx;
+
+    .li {
+        border-bottom: 1px solid #d8d8d8;
+
+        &:last-child {
+            border-bottom: 0px;
+        }
+
+        padding: 18rpx 0;
+
+        .ico {
+            font-size: 20rpx;
+            margin-left: 16rpx;
+        }
+
+        .address {
+            padding: 0 12rpx;
+
+            .address_name {
+                display: inline-block;
+                font-weight: 600;
+                min-width: 66rpx;
+            }
+
+            span {
+                vertical-align: middle;
+            }
+        }
+
+        input {
+            font-size: 28rpx;
+        }
+
+        .lab {
+            border-bottom: 4rpx solid #00B76C;
+            padding-bottom: 8rpx;
+            font-size: 28rpx;
+            color: #00B76C;
+        }
+
+        .day {
+            width: 166rpx;
+            text-align: center;
+
+            .ti {
+                color: #999;
+                font-size: 24rpx;
+                margin-bottom: 6rpx;
+            }
+
+            .daytxt {
+                font-size: 36rpx;
+                color: #00B76C;
+                font-weight: 600;
+            }
+        }
+
+        .day,
+        .lab {
+            vertical-align: middle;
+        }
+    }
+
+    .addressStr {
+        width: 366rpx;
+        margin-left: 16rpx;
+    }
+    .location{
+        text-align: center;
+        .ico2 {
+            font-size: 36rpx;
+            color: #000;
+        }
+        .it{
+            font-size: 20rpx;
+            color: #999;
+        }
+    }
+}
+
+.ni_popup {
+    width: 100%;
+    height: 100vh;
+    background-color: rgba($color: #000, $alpha: .4);
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 999;
+    .pbtn{
+        margin-top: 50rpx;
+        .btn{
+            color: #666;
+            font-size: 34rpx;
+            width: 250rpx;
+            text-align: center;
+            background-color: rgba($color: #00B76C, $alpha: .3);
+            height: 70rpx;
+            border-radius: 35rpx;
+            line-height: 70rpx;
+        }
+        .corg{
+            background-color: #00B76C;
+            color: #fff;
+        }
+    }
+}
+
+.starLevel {
+    width: 100%;
+    height: 720rpx;
+    padding: 26rpx 32rpx;
+    background-color: #fff;
+    border-radius: 32rpx 32rpx 0 0;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+
+    .h_numinfo {
+        margin-bottom: 26rpx;
+        font-size: 32rpx;
+
+        .msg {
+            color: #00B76C;
+            margin-left: 12rpx;
+        }
+    }
+
+    .sliderBar {
+        .num {
+            color: #999;
+            font-size: 24rpx;
+            margin-bottom: 18rpx;
+        }
+
+        .sb {
+            padding: 0 18rpx;
+        }
+    }
+
+    .nums {
+        display: grid;
+        justify-content: space-between;
+        grid-template-columns: repeat(auto-fill, 160rpx);
+        margin-bottom: -10rpx;
+        margin-top: 45rpx;
+        grid-gap: 0 1px;
+
+        .num_item {
+            color: #333;
+            width: 160rpx;
+            text-align: center;
+            height: 50rpx;
+            line-height: 50rpx;
+            font-size: 26rpx;
+            background-color: rgba($color: #000, $alpha: 0.08);
+            margin-bottom: 12rpx;
+            border-radius: 8rpx;
+            &.active{
+                color: #000;
+                background-color: rgba($color: #00B76C, $alpha: 0.8);
+            }
+        }
+    }
+    .LevelB{
+        margin-top: 45rpx;
+        .tit{
+            font-size: 32rpx;
+            margin-bottom: 20rpx;
+        }
+        .ls_i{
+            color: #333;
+            font-size: 26rpx;
+            background-color: rgba($color: #000, $alpha: 0.08);
+            padding: 8rpx 22rpx;
+            border-radius: 8rpx;
+            &.active{
+                color: #000;
+                background-color: rgba($color: #00B76C, $alpha: 0.8);
+            }
+        }
+    }
+}
+
+.footimg{
+    width: 100%;
+    position: fixed;
+    bottom: -10rpx;
+    left: 0;
+    .btn{
+        width: 250rpx;
+        position: absolute;
+        left: calc(50% - 125rpx);
+        top: -8rpx;
+    }
+    .img{
+        width: 100%;
+    }
+}
+</style>

+ 1 - 4
src/pagesB/invoice/editinvoice.vue

@@ -113,15 +113,12 @@
   </div>
 </template>
 <script>
-import uniPopup from "@/components/uni-popup/uni-popup.vue";
 import { post } from "@/request/api.js";
 let app = getApp();
 var appEv = app.$vm.$options;
 export default {
   name: "editinvoice",
-  components: {
-    uniPopup,
-  },
+  components: {},
   data() {
     return {
       type: 1,

BIN
src/pagesB/static/preview/icon-back.png


+ 3 - 1
src/request/request.js

@@ -1,5 +1,7 @@
-import host from "./config.js"
+import host from "./config.js";
 import { goto } from '@/utils/myfun.js';
+// let pages = getCurrentPages();
+// let currentRoute = pages[pages.length - 1];
 
 export default ({ url, method, params, header, baseURL }) => {
 	baseURL = baseURL ? baseURL : host.Hhost;

+ 29 - 16
src/utils/myfun.js

@@ -52,7 +52,7 @@ export function goto(url, json) {
     let params = "";
     if (json) {
         params = [];
-        let da = Object.keys(json).map(function (key) {
+        let da = Object.keys(json).map(function(key) {
             if (json[key]) return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
         });
         da.forEach(e => {
@@ -60,31 +60,44 @@ export function goto(url, json) {
         });
         params = params.join("&")
     }
-    uni.navigateTo({
-        url: url + '?' + params
-    });
+    uni.navigateTo({ url: url + '?' + params });
 }
 
 // tidyTpye
 export function tidyTpye(va) {
-    switch (va) {
-        case '1': return "零售专区";
-        case '2': return "批发专区";
-        case '3': return "货易优选";
-        case '4': return "甄选好物";
-        case '5': return "茶宝兑换";
-        case '6': return "天天捡漏";
+    let a = Number(va)
+    switch (a) {
+        case 1: return "零售专区";
+        case 2: return "批发专区";
+        case 3: return "货易优选";
+        case 4: return "甄选好物";
+        case 5: return "茶宝兑换";
+        case 6: return "天天捡漏";
         default: return ""
     }
 }
 
+export function hotelStarf(va) {
+    switch (va) {
+        case 1: return "一星级";
+        case 2: return "二星级";
+        case 3: return "三星级";
+        case 4: return "四星级";
+        case 5: return "五星级";
+        case 6: return "经济型";
+        case 7: return "舒适型";
+        case 8: return "高档型";
+        case 9: return "豪华型";
+        default: return ""
+    }
+}
 
 /**
  * json对象数组按照某个属性排序:降序排列
  * @param {Object} propertyName
  */
 let compareDesc = (propertyName) => {
-    return function (object1, object2) {
+    return function(object1, object2) {
         var value1 = object1[propertyName];
         var value2 = object2[propertyName];
         if (value2 < value1) {
@@ -98,11 +111,11 @@ let compareDesc = (propertyName) => {
 }
 
 /**
-* json对象数组按照某个属性排序:升序排列
-* @param {Object} propertyName
-*/
+ * json对象数组按照某个属性排序:升序排列
+ * @param {Object} propertyName
+ */
 let compareAsc = (propertyName) => {
-    return function (object1, object2) {
+    return function(object1, object2) {
         var value1 = object1[propertyName];
         var value2 = object2[propertyName];
         if (value2 < value1) {

+ 0 - 0
src/static/utils/qqmap-wx-jssdk.min.js → src/utils/qqmap-wx-jssdk.min.js


+ 2 - 6
src/utils/run_now.js

@@ -91,14 +91,10 @@ Array.prototype.remove = function (val) {
     }
 };
 
-// // 逆地址解析reverseGeocoder
-// import QQMapWX from '@/static/utils/qqmap-wx-jssdk.min.js'
+// 逆地址解析reverseGeocoder
+// import QQMapWX from '@/utils/qqmap-wx-jssdk.min.js'
 // const showmap = new QQMapWX({ key: 'NWSBZ-ZUME4-LLTU6-XSQGB-YBKAT-U4FCZ' });
 // showmap.reverseGeocoder({
-//     location: {
-//         latitude: res.latitude,
-//         longitude: res.longitude
-//     },
 //     success(result) {
 //         console.log('逆地址解析:', result);
 //     }

+ 8 - 568
src/utils/utils.js

@@ -1,77 +1,4 @@
-// 比较微信版本v1:用户当前版本;v2:当前程序所需要求兼容的版本
-function compareVersion(v1, v2) {
-    v1 = v1.split('.')
-    v2 = v2.split('.')
-    const len = Math.max(v1.length, v2.length)
 
-    while (v1.length < len) {
-        v1.push('0')
-    }
-    while (v2.length < len) {
-        v2.push('0')
-    }
-
-    for (let i = 0; i < len; i++) {
-        const num1 = parseInt(v1[i])
-        const num2 = parseInt(v2[i])
-
-        if (num1 > num2) {
-            return 1
-        } else if (num1 < num2) {
-            return -1
-        }
-    }
-
-    return 0
-}
-
-/* 系统当前日期+时间 */
-function formatTime(date) {
-    var year = date.getFullYear()
-    var month = date.getMonth() + 1
-    var day = date.getDate()
-
-    var hour = date.getHours()
-    var minute = date.getMinutes()
-    var second = date.getSeconds()
-
-
-    return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
-}
-
-function formatTime2(date) {
-    var year = date.getFullYear()
-    var month = date.getMonth() + 1
-    var day = date.getDate()
-
-
-    return [year, month, day].map(formatNumber).join('-')
-}
-
-function formatTime3(number, format) {
-
-    var formateArr = ['Y', 'M', 'D', 'h', 'm', 's'];
-    var returnArr = [];
-
-    var date = new Date(number * 1000);
-    returnArr.push(date.getFullYear());
-    returnArr.push(formatNumber(date.getMonth() + 1));
-    returnArr.push(formatNumber(date.getDate()));
-
-    returnArr.push(formatNumber(date.getHours()));
-    returnArr.push(formatNumber(date.getMinutes()));
-    returnArr.push(formatNumber(date.getSeconds()));
-
-    for (var i in returnArr) {
-        format = format.replace(formateArr[i], returnArr[i]);
-    }
-    return format;
-}
-
-function formatNumber(n) {
-    n = n.toString()
-    return n[1] ? n : '0' + n
-}
 /* 日期转时间戳 */
 function timeToUnix(stringTime) {
     if (stringTime) {
@@ -84,14 +11,14 @@ function timeToUnix(stringTime) {
 }
 /* 倒计时:时+分+秒 */
 function changeTimeStamp(timeStamp, hasTimeRemaining) {
-	var distancetime;
-	if(hasTimeRemaining){
-		distancetime = timeStamp;
-	}else{
-		var curTimeStamp = timeToUnix();
-		distancetime = parseInt(timeStamp) - curTimeStamp;
-	}
-    
+    var distancetime;
+    if (hasTimeRemaining) {
+        distancetime = timeStamp;
+    } else {
+        var curTimeStamp = timeToUnix();
+        distancetime = parseInt(timeStamp) - curTimeStamp;
+    }
+
 
     if (distancetime > 0) {
         //如果大于0.说明尚未到达截止时间       
@@ -115,491 +42,4 @@ function changeTimeStamp(timeStamp, hasTimeRemaining) {
     } else {
         return false
     }
-}
-
-// md5
-function md5(string) {
-    var x = Array();
-    var k, AA, BB, CC, DD, a, b, c, d;
-    var S11 = 7,
-        S12 = 12,
-        S13 = 17,
-        S14 = 22;
-    var S21 = 5,
-        S22 = 9,
-        S23 = 14,
-        S24 = 20;
-    var S31 = 4,
-        S32 = 11,
-        S33 = 16,
-        S34 = 23;
-    var S41 = 6,
-        S42 = 10,
-        S43 = 15,
-        S44 = 21;
-    string = Utf8Encode(string);
-    x = ConvertToWordArray(string);
-    a = 0x67452301;
-    b = 0xEFCDAB89;
-    c = 0x98BADCFE;
-    d = 0x10325476;
-    for (k = 0; k < x.length; k += 16) {
-        AA = a;
-        BB = b;
-        CC = c;
-        DD = d;
-        a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
-        d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
-        c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
-        b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
-        a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
-        d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
-        c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
-        b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
-        a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
-        d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
-        c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
-        b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
-        a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
-        d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
-        c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
-        b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
-        a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
-        d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
-        c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
-        b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
-        a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
-        d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
-        c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
-        b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
-        a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
-        d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
-        c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
-        b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
-        a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
-        d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
-        c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
-        b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
-        a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
-        d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
-        c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
-        b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
-        a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
-        d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
-        c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
-        b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
-        a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
-        d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
-        c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
-        b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
-        a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
-        d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
-        c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
-        b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
-        a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
-        d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
-        c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
-        b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
-        a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
-        d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
-        c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
-        b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
-        a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
-        d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
-        c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
-        b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
-        a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
-        d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
-        c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
-        b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
-        a = AddUnsigned(a, AA);
-        b = AddUnsigned(b, BB);
-        c = AddUnsigned(c, CC);
-        d = AddUnsigned(d, DD);
-    }
-    var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
-    return temp.toUpperCase();
-}
-
-function RotateLeft(lValue, iShiftBits) {
-    return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
-}
-
-function AddUnsigned(lX, lY) {
-    var lX4, lY4, lX8, lY8, lResult;
-    lX8 = (lX & 0x80000000);
-    lY8 = (lY & 0x80000000);
-    lX4 = (lX & 0x40000000);
-    lY4 = (lY & 0x40000000);
-    lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
-    if (lX4 & lY4) {
-        return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
-    }
-    if (lX4 | lY4) {
-        if (lResult & 0x40000000) {
-            return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
-        } else {
-            return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
-        }
-    } else {
-        return (lResult ^ lX8 ^ lY8);
-    }
-}
-
-function F(x, y, z) {
-    return (x & y) | ((~x) & z);
-}
-
-function G(x, y, z) {
-    return (x & z) | (y & (~z));
-}
-
-function H(x, y, z) {
-    return (x ^ y ^ z);
-}
-
-function I(x, y, z) {
-    return (y ^ (x | (~z)));
-}
-
-function FF(a, b, c, d, x, s, ac) {
-    a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
-    return AddUnsigned(RotateLeft(a, s), b);
-}
-
-function GG(a, b, c, d, x, s, ac) {
-    a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
-    return AddUnsigned(RotateLeft(a, s), b);
-}
-
-function HH(a, b, c, d, x, s, ac) {
-    a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
-    return AddUnsigned(RotateLeft(a, s), b);
-}
-
-function II(a, b, c, d, x, s, ac) {
-    a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
-    return AddUnsigned(RotateLeft(a, s), b);
-}
-
-function ConvertToWordArray(string) {
-    var lWordCount;
-    var lMessageLength = string.length;
-    var lNumberOfWords_temp1 = lMessageLength + 8;
-    var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
-    var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
-    var lWordArray = Array(lNumberOfWords - 1);
-    var lBytePosition = 0;
-    var lByteCount = 0;
-    while (lByteCount < lMessageLength) {
-        lWordCount = (lByteCount - (lByteCount % 4)) / 4;
-        lBytePosition = (lByteCount % 4) * 8;
-        lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
-        lByteCount++;
-    }
-    lWordCount = (lByteCount - (lByteCount % 4)) / 4;
-    lBytePosition = (lByteCount % 4) * 8;
-    lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
-    lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
-    lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
-    return lWordArray;
-}
-
-function WordToHex(lValue) {
-    var WordToHexValue = "",
-        WordToHexValue_temp = "",
-        lByte, lCount;
-    for (lCount = 0; lCount <= 3; lCount++) {
-        lByte = (lValue >>> (lCount * 8)) & 255;
-        WordToHexValue_temp = "0" + lByte.toString(16);
-        WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
-    }
-    return WordToHexValue;
-}
-
-function Utf8Encode(string) {
-    var utftext = "";
-    for (var n = 0; n < string.length; n++) {
-        var c = string.charCodeAt(n);
-        if (c < 128) {
-            utftext += String.fromCharCode(c);
-        } else if ((c > 127) && (c < 2048)) {
-            utftext += String.fromCharCode((c >> 6) | 192);
-            utftext += String.fromCharCode((c & 63) | 128);
-        } else {
-            utftext += String.fromCharCode((c >> 12) | 224);
-            utftext += String.fromCharCode(((c >> 6) & 63) | 128);
-            utftext += String.fromCharCode((c & 63) | 128);
-        }
-    }
-    return utftext;
-}
-// md5 end
-
-// base64_encode
-function base64_encode(str) { // 编码,配合encodeURIComponent使用
-    var c1, c2, c3;
-    var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-    var i = 0,
-        len = str.length,
-        strin = '';
-    while (i < len) {
-        c1 = str.charCodeAt(i++) & 0xff;
-        if (i == len) {
-            strin += base64EncodeChars.charAt(c1 >> 2);
-            strin += base64EncodeChars.charAt((c1 & 0x3) << 4);
-            strin += "==";
-            break;
-        }
-        c2 = str.charCodeAt(i++);
-        if (i == len) {
-            strin += base64EncodeChars.charAt(c1 >> 2);
-            strin += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
-            strin += base64EncodeChars.charAt((c2 & 0xF) << 2);
-            strin += "=";
-            break;
-        }
-        c3 = str.charCodeAt(i++);
-        strin += base64EncodeChars.charAt(c1 >> 2);
-        strin += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
-        strin += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
-        strin += base64EncodeChars.charAt(c3 & 0x3F)
-    }
-    return strin
-}
-
-function base64_decode(input) { // 解码,配合decodeURIComponent使用
-    var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-    var output = "";
-    var chr1, chr2, chr3;
-    var enc1, enc2, enc3, enc4;
-    var i = 0;
-    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
-    while (i < input.length) {
-        enc1 = base64EncodeChars.indexOf(input.charAt(i++));
-        enc2 = base64EncodeChars.indexOf(input.charAt(i++));
-        enc3 = base64EncodeChars.indexOf(input.charAt(i++));
-        enc4 = base64EncodeChars.indexOf(input.charAt(i++));
-        chr1 = (enc1 << 2) | (enc2 >> 4);
-        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
-        chr3 = ((enc3 & 3) << 6) | enc4;
-        output = output + String.fromCharCode(chr1);
-        if (enc3 != 64) {
-            output = output + String.fromCharCode(chr2);
-        }
-        if (enc4 != 64) {
-            output = output + String.fromCharCode(chr3);
-        }
-    }
-    return utf8_decode(output);
-}
-
-
-function utf8_decode(utftext) { // utf-8解码
-    var string = '';
-    let i = 0;
-    let c = 0;
-    let c1 = 0;
-    let c2 = 0;
-    while (i < utftext.length) {
-        c = utftext.charCodeAt(i);
-        if (c < 128) {
-            string += String.fromCharCode(c);
-            i++;
-        } else if ((c > 191) && (c < 224)) {
-            c1 = utftext.charCodeAt(i + 1);
-            string += String.fromCharCode(((c & 31) << 6) | (c1 & 63));
-            i += 2;
-        } else {
-            c1 = utftext.charCodeAt(i + 1);
-            c2 = utftext.charCodeAt(i + 2);
-            string += String.fromCharCode(((c & 15) << 12) | ((c1 & 63) << 6) | (c2 & 63));
-            i += 3;
-        }
-    }
-    return string;
-}
-// base64_encode end
-
-// emoji图片表情转表情字符串
-function emoji_utf16toEntities(str='') {
-    var patt = /[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则 
-    str = str.replace(patt, function (char) {
-        var H, L, code;
-        if (char.length === 2) {
-            H = char.charCodeAt(0); // 取出高位 
-            L = char.charCodeAt(1); // 取出低位 
-            code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00; // 转换算法 
-            return "&#" + code + ";";
-        } else {
-            return char;
-        }
-    });
-    return str;
-}
-
-// 表情字符串转emoji图片表情
-function emoji_uncodeUtf16(str='') {
-    var reg = /\&#.*?;/g;
-    var result = str.replace(reg, function (char) {
-        var H, L, code;
-        if (char.length == 9) {
-            code = parseInt(char.match(/[0-9]+/g));
-            H = Math.floor((code - 0x10000) / 0x400) + 0xD800;
-            L = (code - 0x10000) % 0x400 + 0xDC00;
-            return unescape("%u" + H.toString(16) + "%u" + L.toString(16));
-        } else {
-            return char;
-        }
-    });
-    return result;
-}
-// 时间戳转日期
-function formatDateTime(timeStamp, type = 'datetime', delimiter = '-') {
-    var date = new Date();
-    // date.setTime(timeStamp / 1000);
-    date.setTime(timeStamp);
-    var y = date.getFullYear();
-    var m = date.getMonth() + 1;
-    m = m < 10 ? ('0' + m) : m;
-    var d = date.getDate();
-    d = d < 10 ? ('0' + d) : d;
-    var h = date.getHours();
-    h = h < 10 ? ('0' + h) : h;
-    var minute = date.getMinutes();
-    var second = date.getSeconds();
-    minute = minute < 10 ? ('0' + minute) : minute;
-    second = second < 10 ? ('0' + second) : second;
-    if (type == 'date') {
-        return y + delimiter + m + delimiter + d;
-    }
-    if (type == 'datehm') {
-        return y + delimiter + m + delimiter + d + ' ' + h + ':' + minute;
-    }
-    if (type == 'hz') {
-        return y + "年" + m + "月" + d + '日 ' + h + '时' + minute + '分' + second + '秒';
-    }
-    if (type == 'hzhm') {
-        return y + "年" + m + "月" + d + '日 ' + h + '时' + minute + '分';
-    }
-    return y + delimiter + m + delimiter + d + ' ' + h + ':' + minute + ':' + second;
-};
-/**
- * canvas绘图相关,把文字转化成只能行数,多余显示省略号
- * ctx: 当前的canvas
- * text: 文本
- * contentWidth: 文本最大宽度
- * lineNumber: 显示几行
- */
-function transformContentToMultiLineText(ctx, text='', contentWidth, lineNumber) {
-    var textArray = text.split(""); // 分割成字符串数组
-    var temp = "";
-    var row = [];
-
-    for (var i = 0; i < textArray.length; i++) {
-        if (ctx.measureText(temp).width < contentWidth) {
-            temp += textArray[i];
-        } else {
-            i--; // 这里添加i--是为了防止字符丢失
-            row.push(temp);
-            temp = "";
-        }
-    }
-    row.push(temp);
-
-    // 如果数组长度大于2,则截取前两个
-    if (row.length > lineNumber) {
-        var rowCut = row.slice(0, lineNumber);
-        var rowPart = rowCut[lineNumber-1];
-        var test = "";
-        var empty = [];
-        for (var a = 0; a < rowPart.length; a++) {
-            if (ctx.measureText(test).width < contentWidth) {
-                test += rowPart[a];
-            } else {
-                break;
-            }
-        }
-        empty.push(test); // 处理后面加省略号
-        var group = empty[0] + '...'
-        rowCut.splice(lineNumber - 1, 1, group);
-        row = rowCut;
-    }
-    
-    return row;
-}
-
-/* 保留两位小数 */
-function getTwoFloat(num = 0) {
-    return (Math.round(num * 100) / 100).toFixed(2);
-}
-//验证手机号码
-function checkPhoneNum(str){
-    if (!str || str == '') {
-        return false;
-    }
-    var phoneTest = /(^1[3|4|5|6|7|8|9][0-9]{9}$)/;
-    return phoneTest.test(str);
-}
-
-class ToPayOpre {
-    // 支付
-    toPay(info = appEv.parameter("info"), callback) {
-        var that = this;
-        uni.requestPayment({
-            ...info,
-            success: function (res) {
-                that.payReturn(false, callback);
-            },
-            fail: function (res) {
-                that.payReturn(true, callback);
-            }
-        })
-    }
-    payReturn(isFail, callback) {
-        uni.hideLoading();
-        // 支付失败
-        if (isFail) {
-            appEv.errTips('支付失败', 3000);
-        } else {
-            // 支付成功
-            uni.showToast({
-                title: '支付成功',
-                icon: 'success',
-                duration: 1200,
-                mask: true
-            })
-        }
-        
-        // 跳转订单列表
-        setTimeout(function () {
-            if (callback) {
-                callback(isFail);
-            } else {
-                uni.redirectTo({
-                    url: '/pages/chengbei-order-list/index'
-                })
-            }
-        }, 1200);
-    }
-}
-
-
-module.exports = {
-    compareVersion: compareVersion,
-    formatTime: formatTime,
-    formatTime2: formatTime2,
-    formatTime3: formatTime3,
-    unxiNum: timeToUnix,
-    changeTimeStamp: changeTimeStamp,
-    md5: md5,
-    base64_encode,
-    base64_decode,
-    utf8_decode,
-    emoji_utf16toEntities,
-    emoji_uncodeUtf16,
-    formatDateTime,
-    transformContentToMultiLineText,
-    getTwoFloat,
-	ToPayOpre
 }

+ 0 - 9
tsconfig.json

@@ -1,9 +0,0 @@
-{
-  "compilerOptions": {
-    "types": [
-      "@dcloudio/types",
-      "miniprogram-api-typings",
-      "mini-types"
-    ]
-  }
-}