Explorar o código

Merge branch 'master' of http://git.ringzle.com:3000/htcwl/hotelHomestayWx

lifanzai hai 10 meses
pai
achega
9e3b10cd11

+ 33 - 19
components/Charts/LineOne.vue

@@ -5,13 +5,9 @@
 </template>
 
 <script>
-	// import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
 	export default {
-		name: 'TemplateContent',
-		// mixins: [template_page_mixin],
 		data() {
 			return {
-
 				// 公司营收
 				revenueChartData: {},
 				revenueOpts: {
@@ -48,28 +44,46 @@
 						},
 					},
 				},
-
+				dataList: [],
+				list: {},
+				fromData: {
+					dateDay: '2024-01',
+					homestayId: '1744620500506251265'
+				},
 			}
 		},
 		onReady() {
-			this.drawRevenueCharts(); //公司营收
+			let obj = wx.getStorageSync('fromData')
+			this.fromData.dateDay = obj.dateDay
+			this.fromData.homestayId = obj.homestayId
+			this.drawRevenueCharts();
+
 		},
 		methods: {
-			// 公司营收 绘制
+			// 交易趋势
 			drawRevenueCharts() {
-				let res = {
-					categories: ["01-01", "", "01-08", "", "01-15", "", "01-22", "", "01-29"],
-					series: [{
-							name: "收入",
-							data: [6800, 8040, 5203, 9850, 7510, 6301, 5968, 9808, 5200],
-							legendShape: "circle",
-							color: "#4088FE",
-							pointShape: "none",
-						},
-
+				let obj = wx.getStorageSync('fromData')
+				this.list = obj
+				this.list.dealLineChant.forEach(item => {
+					this.dataList.push(item.orderAmount)
+				})
+				let list1 = {
+					categories: [
+						"01-01", "", "", "", "", "", "",
+						"01-08", "", "", "", "", "", "",
+						"01-15", "", "", "", "", "", "",
+						"01-22", "", "", "", "", "", "",
+						"01-29", "", ""
 					],
-				};
-				this.revenueChartData = JSON.parse(JSON.stringify(res));
+					series: [{
+						name: "收入",
+						data: this.dataList,
+						legendShape: "circle",
+						color: "#4088FE",
+						pointShape: "none",
+					}, ],
+				}
+				this.revenueChartData = JSON.parse(JSON.stringify(list1));
 			},
 
 		}

+ 24 - 15
components/Charts/LineTwo.vue

@@ -5,13 +5,9 @@
 </template>
 
 <script>
-	import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
 	export default {
-		name: 'TemplateContent',
-		mixins: [template_page_mixin],
 		data() {
 			return {
-
 				// 公司营收
 				revenueChartData: {},
 				revenueOpts: {
@@ -22,6 +18,7 @@
 						disableGrid: true,
 					},
 					yAxis: {
+						// gridColor: "rgba(230,230,230,0.6)",
 						gridColor: "rgba(200,200,200,0.6)",
 						disabled: false,
 						disableGrid: false,
@@ -30,6 +27,7 @@
 						data: [{
 							axisLineColor: "#FFFFFF",
 							min: 0,
+							max: 1
 						}],
 					},
 					legend: {
@@ -47,27 +45,38 @@
 						},
 					},
 				},
-
+				dataList: [],
+				list: {},
+				fromData: {
+					dateDay: '2024-01',
+					homestayId: '1744620500506251265'
+				},
 			}
 		},
 		onReady() {
-			this.drawRevenueCharts(); //公司营收
+			this.drawRevenueCharts();
 		},
 		methods: {
-
-			// 公司营收 绘制
+			// 交易趋势
 			drawRevenueCharts() {
-				let res = {
-					categories: ["01-01", "", "01-08", "", "01-15", "", "01-22", "", "01-29"],
+				let obj = wx.getStorageSync('fromData')
+				this.list = obj
+				this.list.checkedInChant.forEach(item => {
+					this.dataList.push(item.checkedInRatio)
+				})
+				let list1 = {
+					categories: ["01-01", "", "", "", "", "", "", "01-08", "", "", "", "", "", "", "01-15",
+						"", "", "", "", "", "", "01-22", "", "", "", "", "", "", "01-29", "", "",
+					],
 					series: [{
-						name: "收入",
-						data: [0.1, 0.3, 0.4, 0.3, 0.6, 0.7, 0.4, 1, 0.5],
+						name: "入住率",
+						data: this.dataList,
 						legendShape: "circle",
 						color: "#600EFF",
 						pointShape: "none",
-					}],
-				};
-				this.revenueChartData = JSON.parse(JSON.stringify(res));
+					}, ],
+				}
+				this.revenueChartData = JSON.parse(JSON.stringify(list1));
 			},
 
 		}

+ 38 - 37
components/Charts/PieCharts.vue

@@ -1,6 +1,6 @@
 <template>
-	<view class="charts-box" style="min-height: 630rpx;">
-		<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" style="width: 630rpx; height: 600rpx;" />
+	<view class="charts-box" style="min-height: 580rpx;">
+		<qiun-data-charts type="ring" :opts="optsPie" :chartData="chartDataPie" />
 	</view>
 </template>
 
@@ -8,15 +8,12 @@
 	export default {
 		data() {
 			return {
-				chartData: {},
-				//您可以通过修改 config-ucharts.js 文件中下标为 ['ring'] 的节点来配置全局默认参数,如都是默认参数,
-				// 此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】
-				// 即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
-				opts: {
+				chartDataPie: {},
+				optsPie: {
 					rotate: false,
 					rotateLock: false,
 					color: ['#1372FF', '#F89F2A', '#02C493'],
-					padding: [10, 15, 15, 10],
+					padding: [30, 30, 30, 35],
 					dataLabel: true,
 					enableScroll: false,
 					legend: {
@@ -36,7 +33,7 @@
 					},
 					extra: {
 						ring: {
-							ringWidth: 35,
+							ringWidth: 25,
 							activeOpacity: 0.5,
 							activeRadius: 10,
 							offsetAngle: 0,
@@ -46,41 +43,45 @@
 							borderColor: "#FFFFFF"
 						}
 					},
-				}
+				},
+				fromData: {
+					dateDay: '2024-01',
+					homestayId: '1744620500506251265'
+				},
+				list: {}
 			};
 		},
 		onReady() {
+
 			this.getServerData();
 		},
 		methods: {
 			getServerData() {
-				//模拟从服务器获取数据时的延时
-				setTimeout(() => {
-					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-					let res = {
-						series: [{
-							data: [{
-									"name": "房费",
-									"value": 21964.00,
-									"labelText": "房费 72%"
-								},
-								{
-									"name": "商品",
-									"value": 6514.00,
-									"labelText": "商品 21%"
-								},
-								{
-									"name": "其他",
-									"value": 2514.00,
-									"labelText": "其他 7%",
-								},
+				let obj = wx.getStorageSync('fromData')
+				this.list = obj
+				this.list = {
+					series: [{
+						data: [{
+								"name": "房费",
+								"value": this.list.roomAmount,
+								"labelText": "房费" + this.list.roomRatio + '%'
+							},
+							{
+								"name": "商品",
+								"value": this.list.othersAmount,
+								"labelText": "商品" + this.list.othersRatio + '%'
+							},
+							{
+								"name": "其他",
+								"value": this.list.breakfastAmount,
+								"labelText": "其他" + this.list.breakfastRatio + '%',
+							},
 
-							],
+						],
 
-						}]
-					};
-					this.chartData = JSON.parse(JSON.stringify(res));
-				}, 500);
+					}],
+				}
+				this.chartDataPie = JSON.parse(JSON.stringify(this.list));
 			},
 		}
 	};
@@ -89,7 +90,7 @@
 <style scoped>
 	/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
 	.charts-box {
-		width: 630rpx;
-		height: 600rpx;
+		width: 600rpx !important;
+		height: 560rpx !important;
 	}
 </style>

+ 2 - 2
http/baseApi.js

@@ -1,11 +1,11 @@
 // const BaseApi = 'http://192.168.2.190:8080' //汪瑶
 // const BaseApi = 'http://192.168.2.205:8080' //汪辉
-// const BaseApi = 'http://192.168.2.19:8080' //李勇
+const BaseApi = 'http://192.168.2.19:8080' //李勇
 // const BaseApi = 'http://192.168.3.13:8080' //徐涛
 // const BaseApi = 'http://192.168.2.39:8080' //肖添伟
 // const BaseApi = 'http://192.168.3.6:8080' //朱壮波
 
-const BaseApi = 'https://i.ringzle.com/island-cloud-server' //测试服务器
+// const BaseApi = 'https://i.ringzle.com/island-cloud-server' //测试服务器
 
 export {
 	BaseApi

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "hotelHomestay",
-    "appid" : "__UNI__40A92BD",
+    "appid" : "__UNI__3A1C8AF",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 6 - 0
pages.json

@@ -151,6 +151,12 @@
 						"navigationBarTitleText": "酒店民宿信息 ",
 						"enablePullDownRefresh": false
 					}
+				}, {
+					"path": "stayInfo/roomPosition",
+					"style": {
+						"navigationBarTitleText": "位置定位 ",
+						"enablePullDownRefresh": false
+					}
 				}
 
 			]

+ 7 - 2
pages/my/index.vue

@@ -17,7 +17,7 @@
 				</view>
 			</view>
 			<view class="o_menus">
-				<view v-for="(item,index) in menus" :key="index">
+				<view v-for="(item,index) in menus" :key="index" @click="specifiedOrder(index)">
 					<image :src="item.img"></image>
 					<text>{{item.title}}</text>
 				</view>
@@ -77,8 +77,13 @@
 				]
 			}
 		},
-		
+
 		methods: {
+			specifiedOrder(index) {
+				uni.navigateTo({
+					url: '/pagesMy/orderList/orderList?Type='+index
+				})
+			},
 			navigatorAllOrder() {
 				uni.navigateTo({
 					url: '/pagesMy/orderList/orderList'

+ 38 - 21
pages/statistics/index.vue

@@ -4,29 +4,33 @@
 		<view class="hander">
 			<!-- 2024年1月 -->
 			<view
-				class="tn-flex tn-flex-col-center justify-content-item tn-margin-right tn-padding-xs tn-text-sm tn-bg-gray--light tn-radius tn-color-gray--dark"
-				style="border-radius: 12rpx;">
+				class="tn-flex tn-flex-col-center  tn-margin-right tn-padding-xs tn-text-sm tn-bg-gray--light tn-radius tn-color-gray--dark"
+				style="border-radius: 12rpx; width: 160rpx;">
 				<picker @change="bindDateChange" mode="date" :value="date" :start="startDate" :end="endDate"
 					fields="month">
-					<text class="tn-padding-left-xs tn-padding-right-xs">{{date}}</text>
+					<text class="tn-padding-left-xs tn-padding-right-xs">{{date}}
+					</text>
 				</picker>
 			</view>
+			<view style="width: 60rpx; line-height: 48rpx; height: 48rpx; margin: 15rpx 0 ; ">
+				<u-icon name="arrow-down" color="#000000" size="20"></u-icon>
+			</view>
 		</view>
+
 		<view class="hander-price">
 			<view class="one">
 				<view class="left">
 					总营业额
 				</view>
 				<view class="right">
-					共124
+					共{{list.totalNums}}
 				</view>
 			</view>
 			<view class="two">
 				<text>¥</text>
-				<text>15424.00</text>
+				<text>{{list.totalAmount}}</text>
 			</view>
 		</view>
-
 		<view class="echarts-one">
 			<view class="title">
 				营业概况
@@ -37,7 +41,7 @@
 						房费
 					</view>
 					<view class="price">
-						{{}}¥21964.00
+						{{list.roomAmount}}
 					</view>
 				</view>
 				<view class="list">
@@ -45,7 +49,7 @@
 						商品
 					</view>
 					<view class="price">
-						{{}}¥6514.00
+						{{list.breakfastAmount}}
 					</view>
 				</view>
 				<view class="list">
@@ -53,14 +57,13 @@
 						其他
 					</view>
 					<view class="price">
-						{{}}¥2514.00
+						{{list.othersAmount}}
 					</view>
 				</view>
 
 			</view>
 			<view class="Pie_charts">
 				<PieCharts></PieCharts>
-
 			</view>
 		</view>
 		<view class="echarts-two">
@@ -109,31 +112,42 @@
 			return {
 				h: uni.getSystemInfoSync().windowHeight,
 				mt: uni.getSystemInfoSync().statusBarHeight + 54,
-				date: '2023-07',
+				date: '2024-01',
+				fromData: {
+					dateDay: '2024-01',
+					homestayId: '1744620500506251265'
+				},
+				list: {}
 			}
 		},
-		onReady() {},
+		onReady() {
+			this.getList()
+		},
 		methods: {
-
 			bindDateChange(e) {
 				this.date = e.detail.value
+				this.fromData.dateDay = e.detail.value
+				this.getList()
 			},
 			// 时间
 			startDate() {
-				return this.getDate('start');
+				return this.getDate('start')
 			},
 			endDate() {
-				return this.getDate('end');
+				return this.getDate('end')
+			},
+			getList() {
+				this.$api.get('/merchant/hotel/mine/getHotelCountInfo', this.fromData).then(res => {
+					console.log(res);
+					this.list = res.data.data
+					wx.setStorageSync('fromData', this.list)
+				})
 			},
 		}
-	};
+	}
 </script>
 
 <style scoped lang="less">
-	// .charts {
-	// 	width: 700rpx;
-	// 	height: 630rpx;
-	// }
 	.charts-box {
 		width: 100%;
 		height: 630rpx;
@@ -155,6 +169,9 @@
 		background-color: #fff;
 		text-align: center;
 		line-height: 48rpx;
+		display: flex !important;
+		justify-content: space-between !important;
+
 	}
 
 	.hander-price {
@@ -234,7 +251,7 @@
 		}
 
 		.Pie_charts {
-			height: 630rpx;
+			height: 600rpx;
 			width: 630rpx;
 			// background-color: aqua;
 		}

+ 217 - 34
pagesMy/orderList/orderList.vue

@@ -1,35 +1,66 @@
 <template>
 	<view class="pages">
-		<TopTabs :list="tabList" @changeTab="changeTab" :placeholder="'输入景点名称/订单号'">
-		</TopTabs>
+		<!-- <TopTabs :list="tabList" @changeTab="changeTab">
+		</TopTabs> -->
+		<view class="tb">
+			<view class="tabs">
+				<view v-for="(item,index) in tabList" :key="index" @tap="changeTab1(index)">
+					<text :class="index==current?'active':''">{{item.name}}</text>
+				</view>
+			</view>
+		</view>
 		<view class="mainContain">
-			<view class="card" >
+			<view class="card" v-for="item,index  in dataList" :key="index">
 				<view class="header">
-					<span style="font-weight: 700;">订单号:A20231213102359619119</span>
+					<span style="font-weight: 700;">订单号:{{item.orderCode}}</span>
 
-					<text :class="statusClass[0]">{{status[0]}}</text>
+					<text v-if='item.orderStatus==-1&&item.status==1' class="orange">待确认</text>
+					<text v-else-if='item.status==0&&item.orderStatus==-1' class="red">待支付</text>
+					<text v-else-if='item.orderStatus==1&&item.status==1' class="green">已预订</text>
+					<text v-else :class="statusClass[item.orderStatus]">{{status[item.orderStatus]}}</text>
 				</view>
 				<view class="mainContent">
-					<view class="image">
-
-					</view>
+					<image class="image" :src="item.cover" mode="aspectFill"></image>
 					<view class="middle">
-						<span class="title">海景房-306</span>
+						<span class="title">{{item.houseBaseName}}-{{item.roomNumber}}</span>
 						<span class='info'>
-							<span>郑一璇</span>
-							<span>15753988251</span>
-							<span>03/11 - 03/12 (共两晚)</span>
+							<span>{{item.guestName}}</span>
+							<span>{{item.guestPhone}}</span>
+							<span>{{item.arriveDate}}到{{item.leaveDate}} </span>
 						</span>
 					</view>
 					<view class="price">
-						¥1288.0
+						¥{{item.orderAmount}}
 					</view>
 				</view>
-				<view class="bottom" @click="handleDetail()">
+				<view class="bottom"  v-if="item.orderStatus==-1">
+					<view class="refuse">
+						拒绝
+					</view>
+					<view class="btn">
+						确认订单
+					</view>
+				</view>
+				<view class="bottom"  v-else-if="item.orderStatus==1">
 					<view class="btn">
 						办理入住
 					</view>
 				</view>
+				<view class="bottom" v-else-if="item.orderStatus==2">
+					<view class="btn">
+						办理退房
+					</view>
+				</view>
+				<view class="bottom" @click="handleDetail(item)" v-else-if="item.orderStatus==3">
+					<view class="detail">
+						详情
+					</view>
+				</view>
+				<view class="bottom" @click="handleDetail(item)" v-else-if="item.orderStatus==4">
+					<view class="detail">
+						详情
+					</view>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -44,17 +75,24 @@
 		},
 		data() {
 			return {
+				current: 0,
+				mysearch: '',
+				dataList: [],
+				limit: 10,
+				page: 1,
 				statusClass: [
+					'',
 					'green',
 					'blue',
 					'grey',
-					'orange'
+					'grey',
 				],
 				status: [
+					'',
 					'已预订',
 					'已入住',
+					'已退房',
 					'已取消',
-					'待确认'
 				],
 				// mt: uni.getSystemInfoSync().statusBarHeight + 44,
 				tabList: [{
@@ -75,27 +113,94 @@
 				],
 			}
 		},
+		onLoad(option) {
+			if (option.Type) {
+				const type = parseInt(option.Type) + 1
+				console.log(type, 'option');
+				console.log(option.Type, 'option11111');
+				this.changeTab1(type)
+			} else {
+				this.getOrderList()
+			}
+		},
 		methods: {
-			handleDetail() {
+			changeTab1(index) {
+				this.current = index;
+				this.changeTab(index)
+			},
+			getOrderList(orderStatus) {
+				this.$api.get('/merchant/hotel/order/getMerchantOrderPageList', {
+					homestayId: '1711268640588517378',
+					limit: this.limit,
+					page: this.page,
+					orderStatus: orderStatus ? orderStatus : ''
+				}).then((res => {
+					if (res.data.code == 0) {
+						this.dataList = res.data.data.list
+						this.dataList.forEach((i, index) => {
+							this.dataList[index].arriveDate = i.arriveDate.slice(0, 10)
+							this.dataList[index].leaveDate = i.leaveDate.slice(0, 10)
+						})
+						console.log(this.dataList, 'this.dataList');
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+							icon: 'none'
+						})
+					}
+
+
+				}))
+			},
+			getOrderByStatusList() {
+				this.$api.get('/merchant/hotel/order/getMerchantOrderPageList', {
+					homestayId: '1711268640588517378',
+					limit: this.limit,
+					page: this.page,
+					status: 0
+				}).then((res => {
+					if (res.data.code == 0) {
+						this.dataList = res.data.data.list
+						this.dataList.forEach((i, index) => {
+							this.dataList[index].arriveDate = i.arriveDate.slice(0, 10)
+							this.dataList[index].leaveDate = i.leaveDate.slice(0, 10)
+						})
+						console.log(this.dataList, 'this.dataList');
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+							icon: 'none'
+						})
+					}
+
+
+				}))
+			},
+			handleDetail(item) {
 				uni.navigateTo({
-					url: '/pagesMy/orderList/alreadyBook'
+					url: '/pages/house/orderInfo?orderId='+item.orderCode
 				})
 			},
 			changeTab(index) {
+				console.log(index, 'index------');
 				this.tabIdx = index;
-				// switch (index) {
-				// 	case 0:
-				// 		this.gtiList()
-				// 		break
-				// 	case 1:
-				// 		this.getiList(0)
-				// 		break
-				// 	case 2:
-				// 		this.getiList(1)
-				// 		break
-				// 	case 3:
-				// 		this.getiList(-3)
-				// }
+				switch (index) {
+					case 0:
+						this.getOrderList()
+						break
+					case 1:
+						this.getOrderList(-1)
+						break
+					case 2:
+						this.getOrderByStatusList()
+						break
+					case 3:
+						this.getOrderList(1)
+						break
+					case 4:
+						this.getOrderList(4)
+						break
+				}
 			},
 		}
 	}
@@ -104,7 +209,64 @@
 <style lang="scss" scoped>
 	.pages {
 		background: #F9FAFC;
-		height: 100vh;
+
+		.tb {
+			width: 100%;
+
+			top: 0;
+			left: 0;
+			z-index: 999;
+
+			.searchBoxParent {
+				width: 100%;
+				background: #fff;
+				padding: 20rpx 24rpx 6rpx;
+				box-sizing: border-box;
+
+				.searchBox {
+					width: 100%;
+					background-color: #fff;
+				}
+			}
+
+			.tabs {
+				background: #fff;
+				padding: 26rpx 0;
+				display: flex;
+				align-items: center;
+				width: 100%;
+
+				&>view {
+					width: 25%;
+					font-size: 28rpx;
+					font-family: PingFangSC-Regular, PingFang SC;
+					font-weight: 400;
+					color: black;
+					line-height: 40rpx;
+					position: relative;
+					text-align: center;
+				}
+
+				.active {
+					font-size: 32rpx;
+					font-family: PingFang-SC-Bold, PingFang-SC;
+					font-weight: bold;
+					color: black;
+					line-height: 45rpx;
+				}
+
+				.active::after {
+					position: absolute;
+					content: '';
+					width: 50rpx;
+					height: 8rpx;
+					background: #1372FF;
+					bottom: -26rpx;
+					left: 60%;
+					margin-left: -42rpx;
+				}
+			}
+		}
 
 		.green {}
 
@@ -125,6 +287,10 @@
 					border-bottom: 1px #f3f3f3 solid;
 					padding: 20rpx;
 
+					.red {
+						color: indianred;
+					}
+
 					.green {
 						color: #39CE77;
 					}
@@ -151,10 +317,9 @@
 					justify-content: space-evenly;
 
 					.image {
-						background: url('https://i.ringzle.com/file/20231024/a68c2b2909d84930bbec1e5c7adbb0b4.jpg');
 						background-repeat: no-repeat;
 						background-size: cover;
-						width: 180rpx;
+						width: 198rpx;
 						height: 180rpx;
 						border-radius: 16rpx;
 					}
@@ -164,6 +329,7 @@
 						display: flex;
 						flex-direction: column;
 						justify-content: space-between;
+						margin-left: 25rpx;
 
 
 						.title {
@@ -201,12 +367,29 @@
 					display: flex;
 					justify-content: flex-end;
 
+					.refuse {
+						margin-right: 30rpxs;
+						border: 1rpx solid orangered;
+						border-radius: 35rpx;
+						color: orangered;
+						padding: 13rpx 34rpx;
+					}
+
 					.btn {
 						background: #1372FF;
 						border-radius: 35rpx;
 						color: white;
 						padding: 13rpx 34rpx;
+						margin-left: 30rpx;
+
+					}
 
+					.detail {
+
+						border: 1rpx solid darkgrey;
+						border-radius: 35rpx;
+						color: darkgrey;
+						padding: 13rpx 34rpx;
 					}
 				}
 

+ 306 - 0
pagesMy/stayInfo/roomPosition.vue

@@ -0,0 +1,306 @@
+<template>
+	<view class="pages">
+		<view class="content">
+			<view class="card">
+				<view class="card1" @tap="open()">
+					<text>所属城市
+						<text style="margin-left: 30rpx;" v-if="str.name==undefined||str.name==''">请选择所属城市</text>
+						<text style="margin-left: 30rpx;" v-else>{{str.name}}</text>
+					</text>
+					<text>></text>
+				</view>
+			</view>
+			<view class="card">
+				<view class="card1">
+					<text style="margin-right: 30rpx;">详细地址</text>
+					<u--input placeholder="请输入您的地址" border="none" v-model="formData.areaDetail"></u--input>
+				</view>
+			</view>
+			<view class="card">
+				<view class="card1">
+					<text>单元、门牌号</text>
+				</view>
+				<view style="margin-top: 20rpx;">
+					<span>
+						<u--textarea border='none' :maxlength='300' count v-model="formData.introduction"
+							placeholder="请输入单元、门牌号" height='250'></u--textarea>
+					</span>
+				</view>
+			</view>
+			<view class="card">
+				<view class="card1">
+					<text>地图位置</text>
+				</view>
+				<view style="margin-top: 20rpx;" class="collapseTitle">
+					点击地图可调整至更精确位置
+				</view>
+				<view style="margin-top: 20rpx;">
+					<view class="content-map">
+						<map style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" :scale="16"
+							:title="title" />
+					</view>
+				</view>
+			</view>
+			<cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble"
+				@confirm="confirm" @cancel="cancel" :visible="visible" />
+		</view>
+
+
+		<view class="bottom">
+			<view class="btn">
+				确定
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
+	// 引入高德地图api提供的微信小程序的接口
+	var amapFile = require('@/utils/amap-wx.130.js');
+	// 创建地图
+	var myAmapFun = new amapFile.AMapWX({
+		key: '1173b1eb83eb93bff1fb4a5987503a51'
+	}); //key值要申请为 去高德地图申请微信小程序的key
+	// var myAmapFun = new amapFile.AMapWX({key: ''}); //key我的
+	export default {
+		data() {
+			return {
+				selectIndex: undefined,
+				selectAddr: {},
+				searchWords: "",
+				id: 1, // 使用 marker点击事件 需要填写id
+				title: 'map',
+				latitude: 39.91667, // 纬度
+				longitude: 116.41667, // 经度
+				markers: [{
+					latitude: 39.91667, // 纬度
+					longitude: 116.41667, // 经度
+					width: 30,
+					height: 30,
+					iconPath: ''
+					// iconPath: '../../static/ditu.png'
+				}],
+				dataTips: [],
+				// type: '',
+				value: '',
+				value1: '',
+				fileList: [],
+				fileList1: [],
+				imgUrlList: [],
+				fileList2: [],
+				result: '',
+				visible: false,
+				maskCloseAble: true,
+				str: {
+					name: '浙江省舟山市嵊泗县'
+				},
+				defaultValue: '330922',
+				// defaultValue: ['河北省','唐山市','丰南区'],
+				column: 3,
+				address: '',
+				formData: {}
+			}
+		},
+		components: {
+			cityPicker
+		},
+		onLoad(option) {
+			if (option) {
+				console.log(option, 'option11111111option');
+				this.formData = JSON.parse(option.item)
+				console.log(this.formData, 'this.formData');
+				this.latitude = this.formData.lat
+				this.longitude = this.formData.lon
+				this.markers[0].latitude=this.formData.lat
+				this.markers[0].longitude=this.formData.lon
+			}
+
+			// var self = this;
+			// this.myPosition()
+			// uni.getLocation({
+			// 	type: 'gcj02',
+			// 	success: function(res) {
+			// 		console.log(res, '当前地址定位');
+			// 		if (res.errMsg == "getLocation:ok") {
+			// 			console.log(self.mark, 'onload里面看看');
+			// 			self.longitude = res.longitude;
+			// 			self.latitude = res.latitude;
+			// 			self.$set(self.markers[0], "longitude", res.longitude);
+			// 			self.$set(self.markers[0], "latitude", res.latitude);
+			// 			self.mapFlafg = true;
+			// 			console.log(self.markers, "markers")
+			// 			// self.markers[0].longitude = res.longitude;
+			// 			// self.markers[0].latitude = res.latitude;
+			// 		}
+			// 	},
+			// 	complete: () => {
+			// 		// 获取当前位置的地点列表
+			// 		myAmapFun.getPoiAround({
+			// 			location: self.longitude + ',' + self.latitude,
+			// 			success: (data) => {
+			// 				console.log("获取当前的列表", data);
+			// 				this.dataTips = data.poisData;
+			// 			},
+			// 			fail: (info) => {
+			// 				console.log(info, '点击地图错误信息1')
+			// 			}
+			// 		})
+			// 	}
+			// });
+		},
+		methods: {
+			myPosition() {
+				var myAmapFun = new amapFile.AMapWX({
+					key: '1173b1eb83eb93bff1fb4a5987503a51'
+				});
+				let that = this;
+				//获取地址
+				myAmapFun.getRegeo({
+					success: function(data) {
+						that.longitude = data[0].longitude
+						that.latitude = data[0].latitude
+						console.log(that.longitude, that.latitude, '1111');
+					},
+					fail: function(info) {
+						//失败回调
+						console.log(info)
+						uni.navigateBack();
+					}
+				})
+			},
+			open() {
+				this.visible = true
+			},
+			confirm(val) {
+				this.str = val
+				console.log(this.str, '333')
+				this.visible = false
+			},
+			cancel() {
+				this.visible = false
+			},
+			onShareAppMessage(res) {
+				if (res.from === 'button') { // 来自页面内分享按钮
+					console.log(res.target, '1')
+				}
+				return {
+					title: 'data-cityPicker省市区地址选择器!',
+					path: '/pages/cityPicker/cityPicker'
+				}
+			},
+			onShareTimeline(res) {
+				if (res.from === 'button') { // 来自页面内分享按钮
+					console.log(res.target, '2')
+				}
+				return {
+					title: 'data-cityPicker省市区地址选择器!'
+				}
+			},
+			change() {
+
+			},
+			close() {
+
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	/deep/.u-cell__body {
+		padding: 0;
+	}
+
+	::v-deep .u-cell__body {
+		padding: 0;
+	}
+
+	.pages {
+		height: 100vh;
+		background: #F9FAFC;
+
+		.content {
+			padding: 20rpx;
+			height: 100vh;
+
+			.card {
+				background: #fff;
+				border-radius: 16rpx;
+				padding: 30rpx 33rpx;
+				margin-bottom: 20rpx;
+
+				.upload {
+					margin-top: 48rpx;
+					width: 100%;
+					height: 200rpx;
+					border-radius: 16rpx;
+					background-color: #F5F8FA;
+					display: flex;
+					align-items: center;
+					text-align: center;
+
+					.upload-one {
+						margin: 0 245rpx;
+						width: 200rpx;
+						height: 200rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+
+				.collapseTitle {
+					font-size: 22rpx;
+					color: #a5a5a5;
+					margin-bottom: 20rpx;
+				}
+
+				.card1 {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					align-items: center;
+
+					.as-content {
+						color: #a5a5a5;
+					}
+				}
+			}
+		}
+
+		.content-map {
+			border: 1rpx solid black;
+			height: 355rpx;
+		}
+
+		.bottom {
+			position: absolute;
+			bottom: 0;
+			height: 9%;
+			background: #fff;
+			width: 100%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			flex-direction: column;
+
+			.btn {
+				background: #33AFFC;
+				color: white;
+				text-align: center;
+				height: 73rpx;
+				line-height: 73rpx;
+				align-self: center;
+				border-radius: 35rpx;
+				width: 80%;
+
+			}
+		}
+	}
+</style>

+ 229 - 29
pagesMy/stayInfo/stayInfo.vue

@@ -2,52 +2,86 @@
 	<view class="pages">
 		<view class="content">
 			<view class="card">
-				<view class="card1">
+				<view class="card1" @click="goToPosition()">
 					<text>位置定位</text>
 					<text>></text>
 				</view>
 			</view>
 			<view class="card">
 				<view class="card1">
-					<text>联系电话</text>
-					<text>
-						<u--input placeholder="请输入内容" border="surround" v-model="value" @change="change"></u--input>
-					</text>
+					<text style="margin-right: 30rpx;">联系电话</text>
+					<u--input placeholder="请输入内容" border="none" v-model="stayInfo.landlinePhone"></u--input>
 				</view>
 			</view>
 			<view class="card">
 				<view class="card1">
 					<text>酒店简介</text>
-					<span style="margin-top: 20rpx;">
-						<u--textarea :maxlength='300' count v-model="value1" placeholder="请输入酒店简介"
-							height='250'></u--textarea>
+				</view>
+				<view style="margin-top: 20rpx;">
+					<span>
+						<u--textarea border='none' :maxlength='300' count v-model="stayInfo.introduction"
+							placeholder="请输入酒店简介" height='250'></u--textarea>
 					</span>
 				</view>
 			</view>
-			<view class="card">
-				<view class="card1">
-					<u-collapse @change="change" @close="close" @open="open">
-						<u-collapse-item title="内饰照片" name="Docs guide">
-							<text class="u-collapse-content">涵盖uniapp各个方面,给开发者方向指导和设计理念,让您茅塞顿开,一马平川</text>
+			<view class="card" style="padding: 0;">
+				<view>
+					<u-collapse :border='false' accordion @change="change" @close="close" @open="open">
+						<u-collapse-item title="环境\内饰照片(0/10)" name="Docs guide">
+							<text class="collapseTitle">至少上传1张,建议上传5-10张,需展示完整内饰</text>
+							<view class="upload" v-if="stayInfo.picList.length==0">
+								<u-upload :fileList="stayInfo.picList" multiple :maxCount="10"
+									:maxSize="10 * 1024 * 1024" @afterRead="afterRead" @delete="deletePic"
+									@oversize="overSize">
+									<view class="upload-one">
+										<image
+											src="https://i.ringzle.com/file/20240103/1d3cf8e7ad184d17a253b3b08dfd0c53.png"
+											mode="aspectFill"></image>
+									</view>
+								</u-upload>
+							</view>
+							<view class="uploads" v-else>
+								<u-upload :fileList="stayInfo.picList" multiple :maxCount="10"
+									:maxSize="10 * 1024 * 1024" @afterRead="afterRead" @delete="deletePic"
+									@oversize="overSize">
+									<view class="upload-image">
+										<image
+											src="https://i.ringzle.com/file/20240103/1d3cf8e7ad184d17a253b3b08dfd0c53.png"
+											mode="aspectFill"></image>
+									</view>
+								</u-upload>
+							</view>
 						</u-collapse-item>
+						<!-- <u-collapse-item title="环境照片" name="Docs guide">
+							<text class="collapseTitle">至少上传1张,建议上传5-10张,需展示完整环境</text>
+							<view class="upload" v-if="fileList1.length==0">
+								<u-upload :fileList="fileList1" multiple :maxCount="10" :maxSize="10 * 1024 * 1024"
+									@afterRead="afterRead" @delete="deletePic" @oversize="overSize">
+									<view class="upload-one">
+										<image
+											src="https://i.ringzle.com/file/20240103/1d3cf8e7ad184d17a253b3b08dfd0c53.png"
+											mode="aspectFill">
+										</image>
+									</view>
+								</u-upload>
+							</view>
+							<view class="uploads" v-else>
+								<u-upload :fileList="fileList1" multiple :maxCount="10" :maxSize="10 * 1024 * 1024"
+									@afterRead="afterRead" @delete="deletePic" @oversize="overSize">
+									<view class="upload-image">
+										<image
+											src="https://i.ringzle.com/file/20240103/1d3cf8e7ad184d17a253b3b08dfd0c53.png"
+											mode="aspectFill"></image>
+									</view>
+								</u-upload>
+							</view>
+						</u-collapse-item> -->
 					</u-collapse>
-
 				</view>
 			</view>
-			<view class="card">
-				<view class="card1">
-					<u-collapse @change="change" @close="close" @open="open">
-						<u-collapse-item title="环境照片" name="Docs guide">
-							<text class="u-collapse-content">涵盖uniapp各个方面,给开发者方向指导和设计理念,让您茅塞顿开,一马平川</text>
-						</u-collapse-item>
-					</u-collapse>
 
-				</view>
-			</view>
 		</view>
-
 		<view class="bottom">
-
 			<view class="btn">
 				确定
 			</view>
@@ -60,10 +94,43 @@
 		data() {
 			return {
 				value: '',
-				value1: ''
+				value1: '',
+				fileList: [],
+				fileList1: [],
+				imgUrlList: [],
+				fileList2: [],
+				stayInfo: {
+					picList: []
+				}
 			}
 		},
+		onLoad() {
+			this.getStayInfo()
+		},
 		methods: {
+			goToPosition() {
+				const qwe=JSON.stringify(this.stayInfo)
+				console.log(qwe,'qweqweqweqwe');
+				uni.navigateTo({
+					url: '/pagesMy/stayInfo/roomPosition?item=' + JSON.stringify(this.stayInfo)
+				})
+			},
+			getStayInfo() {
+				this.$api.get('/merchant/hotel/mine/getMerchantHomestayInfo/' + '1711268640588517378').then(res => {
+					if (res.data.code == 0) {
+						this.stayInfo = res.data.data
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+
+						})
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 1500)
+					}
+					console.log(res, 'res------');
+				})
+			},
 			change() {
 
 			},
@@ -72,30 +139,163 @@
 			},
 			open() {
 
-			}
+			},
+			// 删除图片
+			deletePic(event) {
+				console.log('jinlaile1');
+				this[`stayInfo.picList{event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				console.log('jinlaile2', event);
+				// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+				let lists = [].concat(event.file)
+				let fileListLen = this.stayInfo.picList.length
+				lists.map((item) => {
+					this.stayInfo.picList.push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this.stayInfo.picList[fileListLen]
+					this.stayInfo.picList.splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
+				}
+			},
+			uploadFilePromise(url) {
+				console.log('jinlaile3');
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								resolve(res.data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			// 	deletePic(event) {
+			// 		this.fileList.splice(event.index, 1);
+			// 	},
+			// 	overSize(e) {
+			// 		uni.$u.toast('上传图片大小不能超过10MB!');
+			// 	},
+			// 	// 新增图片
+			// 	async afterRead(event) {
+			// 		console.log('jinlaile');
+			// 		// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+			// 		let Lists = [].concat(event.file);
+			// 		let fileListLen = this.fileList.length;
+			// 		Lists.map((item) => {
+			// 			this.picList.push(
+			// 				item.url,
+			// 			)
+			// 		})
+
+			// 		for (let i = 0; i < Lists.length; i++) {
+			// 			const result = await this.uploadFilePromise(Lists[i].url);
+			// 			wx.getImageInfo({
+			// 				src: Lists[i].url,
+			// 				success: res => {
+			// 					this.imgUrlList.push(result)
+			// 				}
+			// 			})
+			// 		}
+			// 	},
+			// 	//上传图片
+			// 	uploadFilePromise(url) {
+			// 		return new Promise((resolve, reject) => {
+			// 			let a = uni.uploadFile({
+			// 				url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload',
+			// 				filePath: url,
+			// 				name: 'file',
+			// 				header: {
+			// 					token: wx.getStorageSync('access_token')
+			// 				},
+			// 				success: (res) => {
+			// 					let data = JSON.parse(res.data);
+			// 					this.fileList.push({
+			// 						url: data.data.url
+			// 					})
+			// 					resolve(data.data.url);
+			// 				}
+			// 			});
+			// 		})
+			// 	},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
+	/deep/.u-cell__body {
+		padding: 0;
+	}
+
+	::v-deep .u-cell__body {
+		padding: 0;
+	}
+
 	.pages {
 		height: 100vh;
 		background: #F9FAFC;
 
 		.content {
 			padding: 20rpx;
+			height: 100vh;
 
 			.card {
 				background: #fff;
 				border-radius: 16rpx;
-				padding: 30rpx 20rpx;
-
+				padding: 30rpx 33rpx;
 				margin-bottom: 20rpx;
 
+				.upload {
+					margin-top: 48rpx;
+					width: 100%;
+					height: 200rpx;
+					border-radius: 16rpx;
+					background-color: #F5F8FA;
+					display: flex;
+					align-items: center;
+					text-align: center;
+
+					.upload-one {
+						margin: 0 245rpx;
+						width: 200rpx;
+						height: 200rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+
+				.collapseTitle {
+					font-size: 22rpx;
+					color: #a5a5a5;
+					margin-bottom: 20rpx;
+				}
+
 				.card1 {
 					display: flex;
 					flex-direction: row;
 					justify-content: space-between;
+					align-items: center;
+
 				}
 			}
 		}

+ 10 - 0
uni_modules/piaoyi-cityPicker/changelog.md

@@ -0,0 +1,10 @@
+## 1.1.1(2023-12-06)
+defaultValue可以传入defaultValue:['河北省','唐山市','丰南区']数组类型以及defaultValue: '420103'地区编码字符串类型
+## 1.1.0(2023-12-05)
+即默认值传入地区编码,也支持传入中文省市区数组
+## 1.0.9(2023-12-04)
+优化
+## 1.0.8(2023-10-24)
+修复东菀市和中山市下各镇的行政编码错误问题
+## 1.0.4(2023-09-15)
+改为uni_modules规范

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 10712 - 0
uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/cityData.js


+ 281 - 0
uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker.vue

@@ -0,0 +1,281 @@
+<template>
+	<view class="pupop">
+		<view class="popup-box" :animation="animationData">
+			<view class="pupop-btn">
+				<view @tap="cancel">取消</view>
+				<view @tap="confirm" style="color: #2979ff;">确定</view>
+			</view>
+			<picker-view :value="value" :indicator-style="indicatorStyle" @change="bindChange" class="picker-view">
+				<picker-view-column>
+					<view class="item" v-for="(item,index) in provinceList" :key="index">{{item.name}}</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view class="item" v-for="(item,index) in cityList" :key="index">{{item.name}}</view>
+				</picker-view-column>
+				<picker-view-column v-if="column == 3">
+					<view class="item" v-for="(item,index) in areaList" :key="index">{{item.name}}</view>
+				</picker-view-column>
+			</picker-view>
+		</view>
+		<view @tap="close" @touchmove.stop.prevent :class="visible ? 'pupop-model' : 'pupop-models'"></view>
+	</view>
+</template>
+
+<script>
+	import {
+		addressList
+	} from './cityData.js'
+	export default {
+		data() {
+			return {
+				value: [],
+				addressList,
+				provinceList: [],
+				cityList: [],
+				areaList: [],
+				indicatorStyle: `height: 50px;`,
+				provinceIndex: 0,
+				cityIndex: 0,
+				areaIndex: 0,
+				animationData: {}
+			}
+		},
+		props: {
+			column: {
+				type: Number,
+				default: 3
+			},
+			defaultValue: {
+				default: () => ''
+			},
+			visible: {
+				type: Boolean,
+				default: () => false
+			},
+			maskCloseAble: {
+				type: Boolean,
+				default: () => true
+			},
+		},
+		watch: {
+			visible (val) {
+				this.changeActive()
+			},
+			defaultValue() {
+				this.init()
+			}
+		},
+		created() {
+			this.init()
+		},
+		methods: {
+			init () {
+				var provinceList = []
+				addressList.filter(item => {
+					provinceList.push({
+						code: item.code,
+						name: item.name
+					})
+				})
+				this.provinceList = [...provinceList]
+				if (!this.defaultValue) {
+					this.cityList = addressList[0].children
+					this.areaList = addressList[0].children[0].children
+				} else {
+					var city = {11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外 "}
+					if (Array.isArray(this.defaultValue) && this.defaultValue.length >= 2) {
+						console.log(this.defaultValue)
+						var province = this.defaultValue[0]
+						var city = this.defaultValue[1]
+						this.provinceIndex = 0
+						this.cityIndex = 0
+						this.areaIndex = 0
+						this.provinceIndex = addressList.findIndex(obj => {
+							return obj.name == province
+						})
+						this.provinceIndex = this.provinceIndex >= 0 ? this.provinceIndex : 0
+						this.cityList = addressList[this.provinceIndex].children
+						this.cityIndex = this.cityList.findIndex(obj => {
+							return obj.name == city
+						})
+						this.cityIndex = this.cityIndex >= 0 ? this.cityIndex : 0
+						this.areaList = this.cityList[this.cityIndex].children
+						if (this.defaultValue.length > 2) {
+							this.areaIndex = this.areaList.findIndex(obj => {
+								return obj.name == this.defaultValue[2]
+							})
+						}
+						this.areaIndex = this.areaIndex >= 0 ? this.areaIndex : 0
+						this.$nextTick(() => {
+							if (this.column == 3) {
+								this.value = JSON.parse(JSON.stringify([this.provinceIndex, this.cityIndex, this.areaIndex]))
+							} else if (this.column == 2) {
+								this.value = JSON.parse(JSON.stringify([this.provinceIndex, this.cityIndex]))
+							}
+						})
+					} else if (/^\d{6}$/.test(this.defaultValue)) {
+						var province = this.defaultValue.substr(0, 2)
+						var city = this.defaultValue.substr(0, 4)
+						this.provinceIndex = 0
+						this.cityIndex = 0
+						this.areaIndex = 0
+						this.provinceIndex = addressList.findIndex(obj => {
+							return obj.code == province
+						})
+						this.provinceIndex = this.provinceIndex >= 0 ? this.provinceIndex : 0
+						this.cityList = addressList[this.provinceIndex].children
+						this.cityIndex = this.cityList.findIndex(obj => {
+							return obj.code == city
+						})
+						this.cityIndex = this.cityIndex >= 0 ? this.cityIndex : 0
+						this.areaList = this.cityList[this.cityIndex].children
+						this.areaIndex = this.areaList.findIndex(obj => {
+							return obj.code == this.defaultValue
+						})
+						this.areaIndex = this.areaIndex >= 0 ? this.areaIndex : 0
+						this.$nextTick(() => {
+							if (this.column == 3) {
+								this.value = JSON.parse(JSON.stringify([this.provinceIndex, this.cityIndex, this.areaIndex]))
+							} else if (this.column == 2) {
+								this.value = JSON.parse(JSON.stringify([this.provinceIndex, this.cityIndex]))
+							}
+						})
+					} else {
+						uni.showToast({
+							title: '地区编码格式不正确',
+							icon: 'none'
+						})
+						console.log('地区编码格式不正确')
+					}
+				}
+				this.changeActive()
+			},
+			confirm () {
+				if (this.column == 3) {
+					this.$emit('confirm', {
+						code: addressList[this.provinceIndex].children[this.cityIndex].children[this.areaIndex].code,
+						name: addressList[this.provinceIndex].name + addressList[this.provinceIndex].children[this.cityIndex].name + addressList[this.provinceIndex].children[this.cityIndex].children[this.areaIndex].name,
+						provinceName: addressList[this.provinceIndex].name,
+						cityName: addressList[this.provinceIndex].children[this.cityIndex].name,
+						areaName: addressList[this.provinceIndex].children[this.cityIndex].children[this.areaIndex].name
+					})
+				} else if (this.column == 2) {
+					this.$emit('confirm', {
+						code: addressList[this.provinceIndex].children[this.cityIndex].children[this.areaIndex].code.substring(0, 4) + '00',
+						name: addressList[this.provinceIndex].name + addressList[this.provinceIndex].children[this.cityIndex].name,
+						provinceName: addressList[this.provinceIndex].name,
+						cityName: addressList[this.provinceIndex].children[this.cityIndex].name
+					})
+				} else {
+					uni.showToast({
+						title: '目前column只能传2和3',
+						icon: 'none'
+					})
+				}
+			},
+			cancel () {
+				this.$emit('cancel')
+			},
+			// 动画
+			changeActive () {
+				var active = '-315px'
+				if (this.visible) {
+					active = 0
+				}
+				var animation = uni.createAnimation({
+					duration: 400,
+					timingFunction: 'linear'
+				})
+				animation.bottom(active).step()
+				this.animationData = animation.export()
+			},
+			bindChange(e) {
+				e.detail.value[0] = e.detail.value[0] || 0
+				e.detail.value[1] = e.detail.value[1] || 0
+				e.detail.value[2] = e.detail.value[2] || 0
+				if (e.detail.value[0] != this.provinceIndex) {
+					// console.log('监听第一列')
+					this.provinceChange(e.detail.value[0])
+				} else if (e.detail.value[1] != this.cityIndex) {
+					// console.log('监听第二列')
+					this.cityChange(e.detail.value[1])
+				} else if (e.detail.value[2] != this.areaIndex) {
+					// console.log('监听第三列')
+					this.areaChange(e.detail.value[2])
+				}
+			},
+			// 监听第一列变化
+			provinceChange (e) {
+				this.provinceIndex = e
+				this.cityIndex = 0
+				this.areaIndex = 0
+				this.value = [...[e, 0, 0]]
+				this.cityList = addressList[e].children
+				this.areaList = addressList[e].children[0].children
+			},
+			// 监听第二列变化
+			cityChange (e) {
+				this.cityIndex = e
+				this.areaIndex = 0
+				// console.log(this.cityIndex, this.areaIndex)
+				this.value = [...[this.provinceIndex, e, 0]]
+				this.cityList = addressList[this.provinceIndex].children
+				this.areaList = addressList[this.provinceIndex].children[e].children
+			},
+			// 监听第三列变化
+			areaChange (e) {
+				this.areaIndex = e
+			},
+			// 点击模态框
+			close () {
+				if (this.maskCloseAble) {
+					this.cancel()
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.pupop {
+		.popup-box {
+			position: fixed;
+			left: 0;
+			bottom: -315px;
+			z-index: 99999;
+			background: #fff;
+			padding-bottom: 50px;
+			.pupop-btn{
+				height: 40px;
+				display: flex;
+				align-items: center;
+				padding: 0 30upx;
+				justify-content: space-between;
+			}
+		}
+		.pupop-model {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 9999;
+			background: rgba(0, 0, 0, .5);
+		}
+		.pupop-models{
+			display: none;
+		}
+		.picker-view {
+			width: 750rpx;
+			height: 225px;
+			margin-top: 20rpx;
+		}
+		.item {
+			height: 50px;
+			align-items: center;
+			justify-content: center;
+			text-align: center;
+			line-height: 50px;
+		}
+	}
+</style>

+ 27 - 0
uni_modules/piaoyi-cityPicker/package.json

@@ -0,0 +1,27 @@
+{
+    "id": "piaoyi-cityPicker",
+    "name": " data-cityPicker省市区地址选择器",
+    "displayName": " data-cityPicker省市区地址选择器",
+    "version": "1.1.1",
+    "description": "常用省市区选择器,默认值支持地区编码和中文数组,支持2列和3列配置,可反选,自定义模态框、弹框",
+    "keywords": [
+        "省市区",
+        "支持2列和3列配置",
+        "默认值支持地区编码和中文数组",
+        "动画",
+        "可反选"
+    ],
+    "dcloudext": {
+        "type": "component-vue",
+        "contact": {
+            "qq": ""
+        },
+        "declaration": {
+            "ads": "无",
+            "data": "插件不采集任何数据",
+            "permissions": "无"
+        },
+        "npmurl": ""
+    },
+    "repository": ""
+}

+ 98 - 0
uni_modules/piaoyi-cityPicker/readme.md

@@ -0,0 +1,98 @@
+## 1.0.7(2023-09-15)
+改为uni_modules规范
+### cityPicker 浮动菜单
+
+**使用方法:**
+
+```
+<template>
+	<view>
+		<button @tap="open">打开</button>
+		<cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm" @cancel="cancel" :visible="visible"/>
+		<view>{{str}}</view>
+	</view>
+</template>
+
+<script>
+	import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
+	export default {
+		data() {
+			return {
+				visible: false,
+				maskCloseAble: true,
+				str: '',
+				defaultValue: '420103',
+				// defaultValue: ['河北省','唐山市','丰南区'],
+				column: 3
+			}
+		},
+		components: {
+			cityPicker
+		},
+		methods: {
+			open () {
+				this.visible = true
+			},
+			confirm (val) {
+				console.log(val)
+				this.str = JSON.stringify(val)
+				this.visible = false
+			},
+			cancel () {
+				this.visible = false
+			}
+		},
+		onShareAppMessage(res) {
+			if (res.from === 'button') { // 来自页面内分享按钮
+				console.log(res.target)
+			}
+			return {
+				title: 'data-cityPicker省市区地址选择器!',
+				path: '/pages/cityPicker/cityPicker'
+			}
+		},
+		onShareTimeline(res) {
+			if (res.from === 'button') { // 来自页面内分享按钮
+				console.log(res.target)
+			}
+			return {
+				title: 'data-cityPicker省市区地址选择器!'
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>
+
+```
+
+### 注:近期收到使用用户反馈,存在以下一个问题(如有好的建议,期待私信,谢谢)
+
+1、之前只支持默认值传入地区编码,已更新可以支持传入中文省市区数组
+
+defaultValue可以传入defaultValue:['河北省','唐山市','丰南区']数组类型以及defaultValue: '420103'地区编码字符串类型
+
+可以使用const reg =/([\u4e00-\u9fa5]+省|自治区|[\u4e00-\u9fa5]+市|[\u4e00-\u9fa5]+区)/g;将自己的省市区数据进行处理为数组再传入
+
+
+#### 事件说明
+
+|   事件名    | 返回值 |      描述      |
+| :---------: | :----: | :------------: |
+| @confirm |   对象(code,完整地区名称)   | 点击确定的回调 |
+| @cancel | 无 | 点击取消的回调 |
+
+#### Prop
+
+| 参数名称 | 描述                           |
+| -------- | ------------------------------ |
+| visible | 控制选择器显示和隐藏 |
+| column | 可选值2和3,2是省市两列选择;3是省市区三列选择 |
+| maskCloseAble | 点击模态框是否关闭弹框 |
+| defaultValue | 初始地区编码(例:420102或者['河北省','唐山市','丰南区']) |
+
+### 可接定制化组件开发
+### 右侧有本人代表作小程序二维码,可以扫码体验
+### 如使用过程中有问题或有一些好的建议,欢迎加QQ群互相学习交流:120594820

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 31 - 0
utils/amap-wx.130.js