瀏覽代碼

天地图、bug修复

baijunde 9 月之前
父節點
當前提交
827db6a526

+ 7 - 0
common/router/modules/routes.js

@@ -497,6 +497,13 @@ const routes = [{
 			title: '本店用户',
 		},
 	},
+	{
+		path: '/pages/store/selectTdMap',
+		name: 'selectTdMap',
+		meta: {
+			title: '地图',
+		},
+	},
 	{
 		path: '/pages/coupon/usersList',
 		name: 'usersList',

+ 6 - 4
common/service/config.service.js

@@ -2,11 +2,13 @@ let BASE_URL = ''
 
 
 if (process.env.NODE_ENV == 'development') {
-	 BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境
+	// BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境 
+	BASE_URL = 'https://life.baoxianzhanggui.com/locallive-pro-java'
+	// BASE_URL = 'http://192.168.0.59:8080/'//徐强
 	// BASE_URL = 'http://192.168.0.36:8080/jeecg-boot' // 开发环境
-    // BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
-		//BASE_URL = 'http://192.168.0.42:8080/jeecg-boot' // 开发环境
-		 // BASE_URL = 'http://192.168.0.103:8080/jeecg-boot' // 开发环境
+	// BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
+	// BASE_URL = 'http://192.168.0.42:8080/jeecg-boot' // 开发环境
+	// BASE_URL = 'http://192.168.0.103:8082/jeecg-boot' // 开发环境
 
 } else {
 	BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境

+ 42 - 40
pages.json

@@ -10,20 +10,20 @@
 		{
 			"path": "pages/login/login",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/login/mimi",
 			"style": {}
 		}, {
 			"path": "pages/login/xieyi",
 			"style": {}
-		},  {
+		}, {
 			"path": "pages/login/register",
 			"style": {}
-		},   
+		},
 		{
 			"path": "pages/login/resetpassword",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/login/settled",
 			"style": {}
 		}, {
@@ -74,7 +74,7 @@
 			"path": "pages/order/record",
 			"style": {}
 		},
-		
+
 		{
 			"path": "pages/index/full",
 			"style": {}
@@ -122,16 +122,16 @@
 		{
 			"path": "pages/evaluate/evaluate",
 			"style": {
-				"app-plus" : {
-								"bounce" : "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
-							}
+				"app-plus": {
+					"bounce": "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
+				}
 			}
 		},
 		{
 			"path": "pages/scan/scan",
 			"style": {
-				"app-plus":{
-					"titleNView":false
+				"app-plus": {
+					"titleNView": false
 				}
 			}
 		},
@@ -301,96 +301,98 @@
 		}, {
 			"path": "pages/common/helloWorld",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/settings",
 			"style": {}
-			
-		},{
+
+		}, {
 			"path": "pages/login/map",
 			"style": {}
-			
-		},{
+
+		}, {
 			"path": "pages/login/aMap",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/brandMessage",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/businessInfor",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/otherSet",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/businessQua",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/advertising",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/headPhoto",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/addHours",
 			"style": {}
 		},
 		{
 			"path": "pages/store/editStore",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/store/examine",
 			"style": {}
-		}
-		,{
+		}, {
+			"path": "pages/store/selectTdMap",
+			"style": {}
+		}, {
 			"path": "pages/coupon/coupon",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/creatcoupon",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/activity",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/storeUsers",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/creatReduction",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/creatDiscount",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/coupon/couponDetail",
 			"style": {}
 		},
 		{
 			"path": "pages/coupon/usersList",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/management",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/recharge",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/buyBean",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/buyPoints",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/balanceBill",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/balancePonts",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/financial/balanceBean",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/product/creatStandard",
 			"style": {}
-		},{
+		}, {
 			"path": "pages/download/index",
 			"style": {}
 		},

+ 3 - 3
pages/index/shop.vue

@@ -141,9 +141,9 @@
 			},
 			//返回
 			back() {
-				uni.navigateBack({
-					delta: 1
-				});
+				uni.switchTab({
+					url:'/pages/index/index'
+				})
 			},
 			//切换状态
 			toggle(item, index) {

+ 3 - 2
pages/product/creatProduct.vue

@@ -256,7 +256,7 @@
 				</view>
 			</view>
 		</view>
-		<rangTime ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" />
+		<rangTime ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" :title="timeTitle"/>
 		<refund v-show="isRefund" :Confirm="form.refundConfirm" :Label="form.refundLabel" @confirm="saveFound"
 			@close="cutRule" />
 		<view class="popup" v-if="isSelectType">
@@ -355,7 +355,8 @@
 				selectVaule: 0, //钣金喷漆选择
 				all: false, //是否全选
 				reverse: false, //是否反选
-				selectProductSunItem:[]
+				selectProductSunItem:[],
+				timeTitle:'选择售卖时间'
 			}
 		},
 		methods: {

+ 3 - 2
pages/store/brandMessage.vue

@@ -54,6 +54,7 @@ export default {
             let obj = JSON.parse(decodeURIComponent(data.params));
             this.form = obj
             this.logoImg=obj.logo
+						console.log(obj,this.logoImg)
         }
     },
     methods: {
@@ -94,10 +95,10 @@ export default {
                 merchantId:uni.getStorageSync(USER_INFO).merchantId,
                 logo:this.logoImg,
             }
-            console.log();
             
             if(this.form.logoStatus==null){
-                this.$http.post('/merchant/localMerchantBrand/add',data).then(res => {
+                // this.$http.post('/merchant/localMerchantBrand/add',data).then(res => {
+									this.$http.post('/merchant/localMerchantBrand/addNew',data).then(res => {
                     if (res.data.success) {
                         this.$tip.success(res.data.result || '成功')
                         uni.navigateBack({

+ 290 - 187
pages/store/businessInfor.vue

@@ -1,8 +1,19 @@
 <template>
 	<view>
-		<cu-custom bgColor="bg-fff" :isBack="true">
+		<!-- <cu-custom bgColor="bg-fff" :isBack="true">
 			<block slot="content"> 经营信息</block>
-		</cu-custom>
+		</cu-custom> -->
+		<view class="top"></view>
+		<view class="head">
+			<view class="handle">
+				<view class="head_left">
+					<span class="cuIcon-back" @click="back"></span>
+				</view>
+				<span class="center">经营信息</span>
+				<view class="head_right">
+				</view>
+			</view>
+		</view>
 		<status v-if="form && form.videoStatus !== null" :status="form.videoStatus" :updateTime="form.videoUpdateTime"
 			:remark="form.videoRemark"></status>
 		<view class="tab-top" :style="form && form.videoStatus == null ? 'margin-top: 14upx;' : 'margin-top: 144upx;'">
@@ -55,11 +66,12 @@
 				</view>
 				<view class="customize">
 					<view class="title">地理位置</view>
-					<view class=" booder-top" style="padding-bottom: 16upx" :style="{ 'display': mapIsHidden }">
-						<map :key="mapKey" style="width: 100%; height: 218upx;z-index:99" :latitude="latitude" scale="14" zIndex="100"
-							:longitude="longitude" :markers="marker" @tap="handleMarkerTap"></map>
+					<view class=" booder-top" style="padding-bottom: 16upx" :style="{ 'display': mapIsHidden }"
+						@click="selectAddress">
+						<!-- <map :key="mapKey" style="width: 100%; height: 218upx;z-index:99" :latitude="latitude" scale="14"
+							zIndex="100" :longitude="longitude" :markers="marker" @tap="handleMarkerTap"></map> -->
+						<tdmap style="" :initialPosition="savedLocation" :allowSelection="false" :showCoordinates="false" :key="mapKey"></tdmap>
 					</view>
-
 					<view class="business-prompt">
 						若位置有误直接影响客户到店,请在地图中仔细核对,可拖拽地图确保位置正确
 					</view>
@@ -68,7 +80,7 @@
 		</view>
 		<view class="padding flex sub-bottom">
 			<button class="cu-btn round line-gray  shadow" @click="$Router.push({ name: 'settings' })">取消</button>
-			<button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click="sumbit">提交审核</button>
+			<button style="margin-left: 12upx;width:77%" class="cu-btn bg-blue round " @click.native="sumbit">提交审核</button>
 		</view>
 
 		<u-picker v-model="show" mode="time" @confirm="selectTime" style="z-index: 999 !important;"></u-picker>
@@ -76,155 +88,183 @@
 
 </template>
 <script>
-	import configService from '../../common/service/config.service'
+	import configService from "../../common/service/config.service";
 	import {
 		USER_INFO
-	} from "@/common/util/constants"
-	import status from "./components/status.vue"
+	} from "@/common/util/constants";
+	import status from "./components/status.vue";
+	import tdmap from "./tdtuMap.vue"
 
 	export default {
 		components: {
-			status
+			status,
+			tdmap
 		},
 		data() {
 			return {
-				video: '',
+				video: "",
 				photoList: [],
 				form: {},
-				src: '',
+				src: "",
 				businessData: [],
 				show: false,
-				date: '',
+				date: "",
 				latitude: 37.860372,
 				longitude: 112.588154,
 				marker: [{
-					latitude: '',
-					longitude: '',
-					iconPath: '/static/boiaoji.png',
+					latitude: "",
+					longitude: "",
+					iconPath: "/static/boiaoji.png",
 					width: 30,
 					height: 30,
 					label: {
-						content: '',
-						color: '#000000', // 文字颜色
+						content: "",
+						color: "#000000", // 文字颜色
 						fontSize: 14, // 文字大小
-						bgColor: '#FFFFFF',
-						borderColor: '#CCCCCC',
-					}
-				}], // 初始为空数组
+						bgColor: "#FFFFFF",
+						borderColor: "#CCCCCC",
+					},
+				}, ], // 初始为空数组
 				mapIsHidden: true,
-				mapKey: 1
-			}
+				mapKey: 1,
+				savedLocation: {}
+			};
 		},
-		async onLoad(data) {
+		 onLoad(data) {
 			if (data.params) {
 				let obj = JSON.parse(decodeURIComponent(data.params));
 				this.video = obj.video ? obj.video : ''
 				obj.photo = obj.photo ? obj.photo.split(',').filter(id => id !== '') : []
 				this.form = obj
 				this.date = this.form.openingTime
+				// this.savedLocation.lnglat = {
+				// 	lng: obj.longitude || 0,
+				// 	lat: obj.latitude || 0,
+				// };
+				// this.savedLocation.address = obj.address || '位置';
+				// this.latitude = obj.lat;
+				// this.longitude = obj.lng;
 			}
 		},
 		onShow() {
-			this.$http.get('/merchant/localMerchantTime/list?merchantId=' + uni.getStorageSync(USER_INFO)
-				.merchantId, ).then(res => {
-				if (res.data.success) {
-					this.businessData = res.data.result
-				} else {
-					this.$tip.error(res.data.message);
-				}
-			})
-			let da = uni.getStorageSync('address')
-			let addname = uni.getStorageSync('currentAddress')
-			const lat = parseFloat(da.latitude) || 37.860372
-			const lng = parseFloat(da.longitude) || 112.588154
-			const labelContent = addname?.name || '未设置地址'
+			this.$http
+				.get(
+					"/merchant/localMerchantTime/list?merchantId=" +
+					uni.getStorageSync(USER_INFO).merchantId
+				)
+				.then((res) => {
+					if (res.data.success) {
+						this.businessData = res.data.result;
+					} else {
+						this.$tip.error(res.data.message);
+					}
+				});
+			let da = uni.getStorageSync("address");
+			console.log(da)
+			// let addname = uni.getStorageSync("currentAddress");
+			// const lat = parseFloat(da.lng) || 37.860372;
+			// const lng = parseFloat(da.lat) || 112.588154;
+			// const labelContent = da?.address || "未设置地址";
+			
+			
+			this.savedLocation.lng = da.lng
+			this.savedLocation.lat = da.lat
+			this.savedLocation.address = da.address || '位置';
+			this.latitude = da.lat;
+			this.longitude = da.lng;
+			this.mapKey += 1;
 			// this.marker[0].longitude = da.longitude
 			// this.marker[0].latitude = da.latitude
 			// this.marker[0].label.content = addname.name
-			this.marker = [{
-				latitude: lat, // 默认值避免 undefined
-				longitude:lng, // 默认值避免 undefined
-				iconPath: '/static/boiaoji.png',
-				width: 30,
-				height: 30,
-				label: {
-					content:labelContent, // 避免 addname 为 undefined
-					color: '#000000',
-					fontSize: 14,
-					bgColor: '#FFFFFF',
-					borderColor: '#CCCCCC',
-				}
-			}]
-			 this.latitude = lat
-			    this.longitude = lng
-			this.mapKey += 1
-			console.log(this.marker)
+			// this.marker = [{
+			// 	latitude: lat, // 默认值避免 undefined
+			// 	longitude: lng, // 默认值避免 undefined
+			// 	iconPath: "/static/boiaoji.png",
+			// 	width: 30,
+			// 	height: 30,
+			// 	label: {
+			// 		content: labelContent, // 避免 addname 为 undefined
+			// 		color: "#000000",
+			// 		fontSize: 14,
+			// 		bgColor: "#FFFFFF",
+			// 		borderColor: "#CCCCCC",
+			// 	},
+			// }, ];
+		
 			// this.getCurrentLocation();
 		},
 		methods: {
-			getCurrentLocation() {
-				uni.getStorage({
-					key: 'currentAddress',
-					success: (res) => {
-						if (res.data && res.data.location) {
-							let temp = res.data.location.split(',');
-							this.latitude = temp[1];
-							this.longitude = temp[0];
-
-							// this.marker = [{
-							// 	id: 0,
-							// 	latitude: temp[1],
-							// 	longitude: temp[0],
-							// 	title: res.data.name || '当前位置',
-							// 	iconPath: '../../static/boiaoji.png',
-							// 	width: 30,
-							// 	height: 30,
-							// 	callout: { // 添加标注说明
-							// 		content: res.data.name || '当前位置',
-							// 		color: '#000',
-							// 		fontSize: 12,
-							// 		borderRadius: 10,
-							// 		bgColor: '#fff',
-							// 		padding: 5,
-							// 		display: 'ALWAYS'
-							// 	}
-							// }];
-							this.$forceUpdate();
-						}
-
-					},
-					fail: () => {
-						// 如果没有存储的位置,可以设置默认位置
-						// this.setDefaultLocation();
-					}
-				});
+			back() {
+				uni.navigateTo({
+					url: '/pages/store/settings'
+				})
 			},
-
-
-
+			selectAddress() {
+				uni.navigateTo({
+					url: '/pages/store/selectTdMap?url=' + '/pages/store/businessInfor'
+				})
+			},
+			// getCurrentLocation() {
+			// 	uni.getStorage({
+			// 		key: "currentAddress",
+			// 		success: (res) => {
+			// 			if (res.data && res.data.location) {
+			// 				let temp = res.data.location.split(",");
+			// 				this.latitude = temp[1];
+			// 				this.longitude = temp[0];
+
+
+			// 				// this.marker = [{
+			// 				// 	id: 0,
+			// 				// 	latitude: temp[1],
+			// 				// 	longitude: temp[0],
+			// 				// 	title: res.data.name || '当前位置',
+			// 				// 	iconPath: '../../static/boiaoji.png',
+			// 				// 	width: 30,
+			// 				// 	height: 30,
+			// 				// 	callout: { // 添加标注说明
+			// 				// 		content: res.data.name || '当前位置',
+			// 				// 		color: '#000',
+			// 				// 		fontSize: 12,
+			// 				// 		borderRadius: 10,
+			// 				// 		bgColor: '#fff',
+			// 				// 		padding: 5,
+			// 				// 		display: 'ALWAYS'
+			// 				// 	}
+			// 				// }];
+			// 				this.$forceUpdate();
+			// 			}
+			// 		},
+			// 		fail: () => {
+			// 			// 如果没有存储的位置,可以设置默认位置
+			// 			// this.setDefaultLocation();
+			// 		},
+			// 	});
+			// },
 
 			handleMarkerTap() {
-				const queryString = uni.getStorageSync('address') ? encodeURIComponent(JSON.stringify(uni.getStorageSync(
-					'address'))) : ''
+				const queryString = uni.getStorageSync("address") ?
+					encodeURIComponent(JSON.stringify(uni.getStorageSync("address"))) :
+					"";
 				uni.navigateTo({
-					url: `/pages/login/map?position=${queryString}`
+					url: `/pages/login/map?position=${queryString}`,
 					// url:'/pages/login/map'
-				})
-
+				});
 			},
 			selectTime(e) {
-				console.log(e)
-				this.date = e.year + '-' + e.month + '-' + e.day
+				console.log(e);
+				this.date = e.year + "-" + e.month + "-" + e.day;
 			},
 			hoursChange(index) {
-				const queryString = encodeURIComponent(JSON.stringify({
-					index,
-					arr: this.businessData
-				}))
+				const queryString = encodeURIComponent(
+					JSON.stringify({
+						index,
+						arr: this.businessData,
+					})
+				);
 				uni.navigateTo({
-					url: `/pages/store/addHours?params=${queryString}`
-				})
-
+					url: `/pages/store/addHours?params=${queryString}`,
+				});
 			},
 			delectVideo() {
 				uni.showModal({
@@ -232,84 +272,93 @@
 					content: "是否要删除此视频",
 					success: (res) => {
 						if (res.confirm) {
-							this.video = ''
+							this.video = "";
 						}
-					}
-				})
+					},
+				});
 			},
 			DelImg(e) {
 				uni.showModal({
-					title: '提示',
-					content: '确定要删除?',
-					cancelText: '取消',
-					confirmText: '确定',
-					success: res => {
+					title: "提示",
+					content: "确定要删除?",
+					cancelText: "取消",
+					confirmText: "确定",
+					success: (res) => {
 						if (res.confirm) {
 							// this.photoList.splice(e.currentTarget.dataset.index, 1)
-							this.form.photo.splice(e.currentTarget.dataset.index, 1)
-
+							this.form.photo.splice(e.currentTarget.dataset.index, 1);
 						}
-					}
-				})
+					},
+				});
 			},
 			ChooseImage() {
 				uni.chooseImage({
 					// count: 4, //默认9
-					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album'], //从相册选择
+					sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ["album"], //从相册选择
 					success: (res) => {
 						if (res) {
 							// this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
 							uni.uploadFile({
-								url: configService.apiUrl + '/sys/common/upload',
+								url: configService.apiUrl + "/sys/common/upload",
 								filePath: res.tempFilePaths[0],
 								name: "file",
 								formData: {
-									'biz': 'temp',
+									biz: "temp",
 								},
 								success: (files) => {
 									let data = JSON.parse(files.data);
 									if (data.success) {
 										if (this.form.photo.length != 0) {
 											// this.photoList = this.photoList.concat(res.tempFilePaths)
-											this.form.photo.push(configService.apiUrl + '/' + data.message)
-
+											this.form.photo.push(
+												configService.apiUrl + "/" + data.message
+											);
 										} else {
 											// this.photoList =res.tempFilePaths
-											this.form.photo = [configService.apiUrl + '/' + data.message]
+											this.form.photo = [
+												configService.apiUrl + "/" + data.message,
+											];
 										}
 									}
-								}
-							})
+								},
+							});
 						}
-
-					}
+					},
 				});
 			},
 			ViewImage(e) {
 				uni.previewImage({
 					urls: this.form.photo,
-					current: e.currentTarget.dataset.url
+					current: e.currentTarget.dataset.url,
 				});
 			},
 			chooseVideo() {
 				// 上传视频
-				console.log('上传视频')
+				console.log("上传视频");
 				uni.chooseVideo({
-					sourceType: ['camera', 'album'],
+					sourceType: ["camera", "album"],
 					success: (res) => {
 						this.video = res.tempFilePath;
-					}
-				})
+					},
+				});
 			},
 			sumbit() {
+				if (!this.savedLocation.lng || !this.savedLocation.lat) {
+				    uni.showToast({
+				      title: "请先获取位置信息",
+				      icon: "none"
+				    });
+				    return;
+				  }
 				let data = {
 					id: uni.getStorageSync(USER_INFO).merchantId,
 					storeExtent: this.form.storeExtent,
-					longitude: this.marker[0].longitude,
-					latitude: this.marker[0].latitude,
-					openingTime: this.date
-				}
+					longitude: this.savedLocation.lng,
+					latitude: this.savedLocation.lat,
+					openingTime: this.date,
+				};
+				console.log(this.savedLocation.lng)
 				// if (this.form.videoStatus == null) {
 				// 	this.$http.post('/merchant/LocalMerchantOperate/add', data).then(res => {
 				// 		if (res.data.success) {
@@ -323,66 +372,121 @@
 				// 	})
 				// }else {
 
-				this.$http.post('/merchant/localMerchantInfo/shopEdit', {
-					...data,
-				}).then(res => {
-					if (res.data.success) {
-						this.$tip.success(res.data.result || '成功')
-						uni.navigateBack({
-							delta: 1 // 返回的页面数,默认为1
-						})
-					} else {
-						this.$tip.error(res.data.message);
-					}
-				})
+				this.$http
+					.post("/merchant/localMerchantInfo/shopEdit", {
+						...data,
+					})
+					.then((res) => {
+						if (res.data.success) {
+							this.$tip.success(res.data.result || "成功");
+							uni.navigateTo({
+								url: '/pages/store/settings'
+							})
+						} else {
+							this.$tip.error(res.data.message);
+						}
+					});
 				// }
-
 			},
 			delClick(val) {
-				this.$http.delete('/merchant/localMerchantTime/delete?id=' + val.id).then(res => {
-					if (res.data.success) {
-						this.$tip.success(res.data.result || '成功')
-						this.$http.get('/merchant/localMerchantTime/list?merchantId=' + uni.getStorageSync(USER_INFO).merchantId)
-							.then(res => {
-								if (res.data.success) {
-									this.businessData = res.data.result
-								} else {
-									this.$tip.error(res.data.message);
-								}
-							})
-
-					} else {
-						this.$tip.error(res.data.message);
-					}
-				})
-			}
-		}
-	}
+				this.$http
+					.delete("/merchant/localMerchantTime/delete?id=" + val.id)
+					.then((res) => {
+						if (res.data.success) {
+							this.$tip.success(res.data.result || "成功");
+							this.$http
+								.get(
+									"/merchant/localMerchantTime/list?merchantId=" +
+									uni.getStorageSync(USER_INFO).merchantId
+								)
+								.then((res) => {
+									if (res.data.success) {
+										this.businessData = res.data.result;
+									} else {
+										this.$tip.error(res.data.message);
+									}
+								});
+						} else {
+							this.$tip.error(res.data.message);
+						}
+					});
+			},
+		},
+	};
 </script>
 <style scoped lang="scss">
 	page {
-		background: #F8F8FA;
+		background: #f8f8fa;
+	}
+
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
+	}
+
+	.head {
+		width: 100%;
+		background: #ffffff;
+
+		.handle {
+			height: 112rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0px 24rpx;
+			position: relative;
+
+			.head_left {
+				font-size: 40rpx;
+			}
+
+			.center {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+				font-size: 30rpx;
+				font-weight: 600;
+			}
+
+			.head_right {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				span {
+					width: 40rpx;
+					height: 40rpx;
+					display: flex;
+					font-size: 28rpx;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+
 	}
 
 	.tab-top {
 		padding: 0 26upx;
-		padding-bottom: 130upx
+		padding-bottom: 130upx;
 	}
 
 	.progress-status {
 		position: fixed;
 		width: 100%;
 		z-index: 9999;
-		background: #FFFFFF;
+		background: #ffffff;
 
 		.status {
 			font-size: 38upx;
-			color: #F6863E;
+			color: #f6863e;
 			font-weight: 500;
 			margin-bottom: 10upx;
 
 			text {
-				margin-left: 5upx
+				margin-left: 5upx;
 			}
 
 			image {
@@ -423,7 +527,6 @@
 			font-size: 20upx;
 			color: #999999;
 		}
-
 	}
 
 	.booder-top {
@@ -442,7 +545,7 @@
 
 			::v-deep.uni-video-bar {
 				height: 62upx;
-				padding: 0
+				padding: 0;
 			}
 		}
 
@@ -461,8 +564,8 @@
 		position: fixed;
 		width: 100%;
 		bottom: 0;
-		background: #FFFFFF;
-		border-top: 1px solid #EEEEEE;
+		background: #ffffff;
+		border-top: 1px solid #eeeeee;
 	}
 
 	.uni-uploader__img {
@@ -483,7 +586,7 @@
 		right: 0;
 		top: 5upx;
 
-		color: #FFFFFF;
+		color: #ffffff;
 		z-index: 999;
 		border-top-right-radius: 20upx;
 		border-bottom-left-radius: 20upx;
@@ -491,7 +594,7 @@
 
 	.business-hours {
 		padding: 27upx 22upx;
-		background: #F7F8FC;
+		background: #f7f8fc;
 		font-size: 28upx;
 		border-radius: 8px 8px 8px 8px;
 		margin-bottom: 18upx;
@@ -500,9 +603,9 @@
 	.del-style {
 		// padding: 0 30upx;
 		width: 116upx;
-		background: #FFFFFF;
+		background: #ffffff;
 		border-radius: 4px 4px 4px 4px;
-		border: 1px solid #EEEEEE;
+		border: 1px solid #eeeeee;
 		color: #333333;
 		font-size: 26upx;
 		line-height: 50upx;

+ 452 - 291
pages/store/editStore.vue

@@ -1,25 +1,36 @@
 <template>
-    <view class="creat">
-        <cu-custom bgColor="bg-fff" :isBack="true" style="position: relative;
-  z-index: 999999999999999999">
-            <block slot="content">编辑门店</block>
-        </cu-custom>
-        <view class="borderRadiu">
-            <view class="cu-form-group">
-                <view class="title">门店名称</view>
-                <input placeholder="请输入门店名称" v-model="form.storeName" name="input"></input>
-            </view>
-            <view class="cu-form-group">
-                <view class="title">所在地区</view>
-                <view style="display: flex;width: 77%;justify-content: space-between;" @click="$refs.picker.show()">
-                    <!-- <u-input readonly placeholder="去设置" v-model="form.locality" @click="$refs.picker.show()"    /> -->
-                    <view style="font-size: 30rpx;">
-                        <text v-if="form.locality"> {{ form.locality }}</text>
-                        <text v-else style="color: grey">请选择所在地区</text>
-                    </view>
-                    <u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
-                </view>
-                <!-- <view>
+	<view class="creat">
+		<!-- <cu-custom bgColor="bg-fff" :isBack="true" style="position: relative;
+  z-index: 999999999999999999"> -->
+		<view class="top"></view>
+		<view class="head">
+			<view class="handle">
+				<view class="head_left">
+					<span class="cuIcon-back" @click="back"></span>
+				</view>
+				<span class="center">编辑门店</span>
+				<view class="head_right">
+				</view>
+			</view>
+		</view>
+		<block slot="content">编辑门店</block>
+		</cu-custom>
+		<view class="borderRadiu">
+			<view class="cu-form-group">
+				<view class="title">门店名称</view>
+				<input placeholder="请输入门店名称" v-model="form.storeName" name="input"></input>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">所在地区</view>
+				<view style="display: flex;width: 77%;justify-content: space-between;" @click="$refs.picker.show()">
+					<!-- <u-input readonly placeholder="去设置" v-model="form.locality" @click="$refs.picker.show()"    /> -->
+					<view style="font-size: 30rpx;">
+						<text v-if="form.locality"> {{ form.locality }}</text>
+						<text v-else style="color: grey">请选择所在地区</text>
+					</view>
+					<u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
+				</view>
+				<!-- <view>
                     <input disabled="true" @mousedown="$refs.picker.show()" placeholder="请选择所在地区" ref="inputRef"
                         name="input" v-model="form.locality"></input> 
                 <text class='cuIcon-right' style="color: #C7C6CA ;" @click="$refs.picker.show()"></text> 
@@ -27,278 +38,428 @@
                     @confirm="onConfirm($event, 'region')"></w-picker>
                 </view> -->
 
-            </view>
-            <view class="cu-form-group">
-                <view class="title">门店地址</view>
-                <input placeholder="请输入门店详细地址" v-model="form.address" name="input"></input>
-            </view>
-            <view class="customize">
-                <view class="title">地理位置</view>
-                <view class=" booder-top" style="padding-bottom: 16upx;" :style="{ 'display': mapIsHidden }">
-                    <map style="width: 100%; height: 218upx; position: relative;
-  z-index: 1;" :latitude="form.latitude" scale="14"
-                        :longitude="form.longitude" :markers="markers" @tap="handleMarkerTap"></map>
-                </view>
-
-                <!-- <aMap class=" booder-top" style="padding-bottom: 7px;"></aMap> -->
-                <view class="business-prompt">
-                    若位置有误直接影响客户到店,请在地图中仔细核对,可拖拽地图确保位置正确
-                </view>
-            </view>
-            <view class="cu-form-group">
-                <view class="title">店铺面积</view>
-                <input placeholder="请输入店铺面积" v-model="form.storeExtent" name="input"></input>
-            </view>
-            <view class="customize">
-                <view class="title">门头照片</view>
-                <view class="grid col-3 grid-square flex-sub booder-top">
-                    <view class="bg-img" v-for="(item, index) in headPhotoImg" :key="index" @tap="ViewImage"
-                        :data-url="headPhotoImg[index]">
-                        <image :src="headPhotoImg[index]" mode="aspectFill"></image>
-                        <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
-                            <text class='cuIcon-close'></text>
-                        </view>
-                    </view>
-                    <view class="solids" @tap="ChooseImage" v-if="headPhotoImg.length <= 4">
-                        <text class='cuIcon-cameraadd'></text>
-                    </view>
-                </view>
-                <view class="business-prompt">
-                    门店照片需包含完整的门店入口和招牌名称,建议现场拍摄门头照;最多可上传5张,支持格式bmp、png、jpeg、jpg,单个图片不超过5MB,建议尺寸在2000*1500px以上
-                </view>
-            </view>
-        </view>
-        <view class="padding flex flex-direction sub-bottom">
-            <button class="cu-btn bg-blue round " @click="submit">提交审核</button>
-        </view>
-        <w-picker :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
-            @confirm="onConfirm($event, 'region')"></w-picker>
-    </view>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">门店地址</view>
+				<input placeholder="请输入门店详细地址" v-model="form.address" name="input"></input>
+			</view>
+			<view class="customize">
+				<view class="title">地理位置</view>
+				<view class=" booder-top" style="padding-bottom: 16upx;" :style="{ 'display': mapIsHidden }"
+					@click="selectAddress">
+					<!-- <map style="width: 100%; height: 218upx; position: relative;
+  z-index: 1;" :latitude="savedLocation.lat" scale="14" :longitude="savedLocation.lng" :markers="markers"
+						@tap="handleMarkerTap"></map> -->
+					<tdmap style="" :initialPosition="savedLocation" :allowSelection="false" :showCoordinates="false" :key="mapKey"></tdmap>
+				</view>
+
+				<!-- <aMap class=" booder-top" style="padding-bottom: 7px;"></aMap> -->
+				<view class="business-prompt">
+					若位置有误直接影响客户到店,请在地图中仔细核对,可拖拽地图确保位置正确
+				</view>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">店铺面积</view>
+				<input placeholder="请输入店铺面积" v-model="form.storeExtent" name="input"></input>
+			</view>
+			<view class="customize">
+				<view class="title">门头照片</view>
+				<view class="grid col-3 grid-square flex-sub booder-top">
+					<view class="bg-img" v-for="(item, index) in headPhotoImg" :key="index" @tap="ViewImage"
+						:data-url="headPhotoImg[index]">
+						<image :src="headPhotoImg[index]" mode="aspectFill"></image>
+						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
+							<text class='cuIcon-close'></text>
+						</view>
+					</view>
+					<view class="solids" @tap="ChooseImage" v-if="headPhotoImg.length <= 4">
+						<text class='cuIcon-cameraadd'></text>
+					</view>
+				</view>
+				<view class="business-prompt">
+					门店照片需包含完整的门店入口和招牌名称,建议现场拍摄门头照;最多可上传5张,支持格式bmp、png、jpeg、jpg,单个图片不超过5MB,建议尺寸在2000*1500px以上
+				</view>
+			</view>
+		</view>
+		<view class="padding flex flex-direction sub-bottom">
+			<button class="cu-btn bg-blue round " @click="submit">提交审核</button>
+		</view>
+		<w-picker :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
+			@confirm="onConfirm($event, 'region')"></w-picker>
+	</view>
 </template>
 <script>
-import regionPicker from "../../components/w-picker/region-picker.vue"
-import { USER_INFO } from "@/common/util/constants"
-import configService from '../../common/service/config.service'
-
-export default {
-    components: {
-        regionPicker,
-        // aMap
-    },
-    data() {
-        return {
-            imgList: [],
-            form: {},
-            visible: false,
-            markers: [],
-            headPhotoImg: [],
-            imageList: [],
-            mapIsHidden: false,
-
-        }
-    },
-    watch: {
-        visible(val) {
-            if (!val) {
-                this.mapIsHidden = 'block'
-            }
-        }
-    },
-    async onShow() {
-        this.merchantId = uni.getStorageSync(USER_INFO).merchantId;
-        let res = await this.$http.get("/merchant/localMerchantInfo/queryAppInfoById?id=" + this.merchantId)
-        if (res.data.success) {
-            this.markers = res.data.result.longitude && res.data.result.latitude ?
-                [
-                    {
-                        longitude: res.data.result.longitude,
-                        latitude: res.data.result.latitude,
-                        iconPath: '../../static/boiaoji.png'
-                    }
-                ]
-                : uni.getStorageSync('address') ?
-                    [Object.assign(uni.getStorageSync('address'), { iconPath: '../../static/boiaoji.png' })] : []
-            res.data.result.headPhoto = res.data.result.headPhoto ? res.data.result.headPhoto.split(',').filter(id => id !== '') : []
-            this.headPhotoImg = res.data.result.headPhoto ? res.data.result.headPhoto : []
-            res.data.result.locality=res.data.result.locality?res.data.result.locality:''
-            this.form = res.data.result
-        } else {
-            this.$tip.toast(res.data.message);
-        }
-
-    },
-    methods: {
-        submit() {
-            // this.$http.post('/merchant/localMerchantInfo/edit', { ...this.form, headPhoto: this.form.headPhoto.join(',') }).then(res => {
-							this.$http.post('/merchant/localMerchantInfo/editMerchantInfo ', { ...this.form, headPhoto: this.form.headPhoto.join(',') }).then(res => {
-                if (res.data.success) {
-                    this.$tip.success(res.data.result || '成功')
-                    uni.navigateBack({
-                        delta: 1 // 返回的页面数,默认为1
-                    })
-                }
-                else {
-                    this.$tip.error(res.data.message);
-                }
-            })
-        },
-        uploadAll() {
-            if (this.imageList.length === 0) {
-                uni.showToast({ title: '请先选择图片', icon: 'none' });
-                return;
-            }
-
-            uni.showLoading({ title: '上传中...', mask: true });
-
-            const uploadPromises = this.imageList.map((path, index) => {
-                return new Promise((resolve, reject) => {
-                    uni.uploadFile({
-                        url: configService.apiUrl + '/sys/common/upload',// 替换为实际接口
-                        filePath: path,
-                        formData: {
-                            'biz': 'temp',
-                        },
-                        name: 'file',
-                        success: (files) => {
-                            resolve(configService.apiUrl + '/' + JSON.parse(files.data).message)
-                        },
-                        fail: reject
-                    });
-                });
-
-            });
-
-            Promise.all(uploadPromises)
-                .then(results => {
-                    uni.hideLoading();
-                    this.imageList = []; // 清空已上传列表
-                    this.headPhotoImg = this.headPhotoImg.concat(results)
-                    this.form.headPhoto = this.form.headPhoto.concat(results)
-                })
-                .catch(error => {
-                    uni.hideLoading();
-                });
-        },
-        ChooseImage() {
-            uni.chooseImage({
-                count: 5-Number(this.headPhotoImg.length) , 
-                sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-                sourceType: ['album'], //从相册选择
-                success: (res) => {
-                    if (res) {
-                        this.imageList = [...this.imageList, ...res.tempFilePaths];
-                        this.uploadAll()
-                    }
-                }
-            });
-        },
-        onConfirm(e) {
-					console.log(e)
-            
-            this.mapIsHidden = false
-            this.form.locality = e.result
-            this.form.country = e.value[e.value.length - 1]
-						this.form.thirdPartyAreaList=e.value
-        },
-        DelImg(e) {
-            uni.showModal({
-                title: '提示',
-                content: '确定要删除?',
-                cancelText: '取消',
-                confirmText: '确定',
-                success: res => {
-                    if (res.confirm) {
-                        this.headPhotoImg.splice(e.currentTarget.dataset.index, 1)
-                        this.form.headPhoto.splice(e.currentTarget.dataset.index, 1)
-                    }
-                }
-            })
-        },
-        ViewImage(e) {
-            uni.previewImage({
-                urls: this.headPhotoImg,
-                current: e.currentTarget.dataset.url
-            });
-        },
-        handleMarkerTap() {
-            const queryString = this.form.longitude && this.form.latitude ?
-                {
-                    longitude: this.form.longitude,
-                    latitude: this.form.latitude,
-                }
-                : uni.getStorageSync('address') ?
-                    encodeURIComponent(JSON.stringify(uni.getStorageSync('address'))) : {}
-
-            // const queryString = uni.getStorageSync('address') ? encodeURIComponent(JSON.stringify(uni.getStorageSync('address'))) : ''
-            uni.navigateTo({
-                url: `/pages/login/map?position=${queryString}`
-            })
-
-        },
-    }
-}
+	import regionPicker from "../../components/w-picker/region-picker.vue"
+	import {
+		USER_INFO
+	} from "@/common/util/constants"
+	import configService from '../../common/service/config.service'
+	import tdmap from "./tdtuMap.vue"
+
+	export default {
+		components: {
+			regionPicker,
+			tdmap
+			// aMap
+		},
+		data() {
+			return {
+				imgList: [],
+				form: {},
+				visible: false,
+				markers: [],
+				headPhotoImg: [],
+				imageList: [],
+				mapIsHidden: false,
+				savedLocation: {},
+				isDataLoaded: false,
+				mapKey:0
+			}
+		},
+		watch: {
+			visible(val) {
+				if (!val) {
+					this.mapIsHidden = 'block'
+				}
+			}
+		},
+		async onload() {
+			console.log('-----------')
+			
+
+		},
+		async onShow() {
+			this.$http
+				.get(
+					"/merchant/localMerchantTime/list?merchantId=" +
+					uni.getStorageSync(USER_INFO).merchantId
+				)
+				.then((res) => {
+					if (res.data.success) {
+						this.businessData = res.data.result;
+					} else {
+						this.$tip.error(res.data.message);
+					}
+				});
+			let da = uni.getStorageSync("address");
+			
+			this.savedLocation.lnglat = {
+				lng: da.lng || 0,
+				lat: da.lat || 0,
+			};
+			this.savedLocation.address = da.address || '位置';
+			this.latitude = da.lat;
+			this.longitude = da.lng;
+			this.mapKey += 1;
+			
+			this.merchantId = uni.getStorageSync(USER_INFO).merchantId;
+			let res = await this.$http.get("/merchant/localMerchantInfo/queryAppInfoById?id=" + this.merchantId)
+			if (res.data.success) {
+				// this.savedLocation = res.data.result.longitude && res.data.result.latitude ? [{
+				// 		lng: res.data.result.longitude,
+				// 		lat: res.data.result.latitude,
+				// 	}] :
+				// 	uni.getStorageSync('address') ? [Object.assign(uni.getStorageSync('address'), {
+				// 	})] : []
+				if(res.data.result.longitude && res.data.result.latitude){
+					this.savedLocation.lnglat = {
+						lng:res.data.result.longitude || 0,
+						lat: res.data.result.latitude || 0,
+					};
+					this.savedLocation.address = res.data.result.address || '位置';
+				}
+				res.data.result.headPhoto = res.data.result.headPhoto ? res.data.result.headPhoto.split(',').filter(id =>
+					id !== '') : []
+				this.headPhotoImg = res.data.result.headPhoto ? res.data.result.headPhoto : []
+				res.data.result.locality = res.data.result.locality ? res.data.result.locality : ''
+				this.form = res.data.result
+			} else {
+				this.$tip.toast(res.data.message);
+			}
+			// this.getCurrentLocation();
+		},
+		// async onLoad(option) {
+
+
+		// 	this.merchantId = uni.getStorageSync(USER_INFO).merchantId;
+		// 	let res = await this.$http.get("/merchant/localMerchantInfo/queryAppInfoById?id=" + this.merchantId)
+		// 	if (res.data.success) {
+		// 		// this.savedLocation = res.data.result.longitude && res.data.result.latitude ? [{
+		// 		// 		lng: res.data.result.longitude,
+		// 		// 		lat: res.data.result.latitude,
+		// 		// 		address:res.data.result.address
+		// 		// 	}] :
+		// 		// 	uni.getStorageSync('address') ? [Object.assign(uni.getStorageSync('address'), {
+		// 		// 		iconPath: '../../static/boiaoji.png'
+		// 		// 	})] : []
+		// 		if (option.lng) {
+		// 			this.$nextTick(
+		// 				this.savedLocation.lng = option.lng,
+		// 				this.savedLocation.lat = option.lat,
+		// 				this.savedLocation.address = option.address,
+		// 				this.form.longitude = option.lng,
+		// 				this.form.latitude = option.lat,
+		// 				this.form.address = option.address,
+		// 				console.log(this.form)
+		// 			)
+		// 		} else {
+		// 			if (res.data.result.longitude && res.data.result.latitude) {
+		// 				this.savedLocation.lng = res.data.result.longitude,
+		// 					this.savedLocation.lat = res.data.result.latitude,
+		// 					this.savedLocation.address = res.data.result.address
+		// 			}
+		// 			res.data.result.headPhoto = res.data.result.headPhoto ? res.data.result.headPhoto.split(',').filter(id =>
+		// 				id !== '') : []
+		// 			this.headPhotoImg = res.data.result.headPhoto ? res.data.result.headPhoto.slice() : []
+		// 			res.data.result.locality = res.data.result.locality ? res.data.result.locality : ''
+		// 			this.form = res.data.result
+		// 		}
+
+		// 	} else {
+		// 		this.$tip.toast(res.data.message);
+		// 	}
+
+		// },
+		methods: {
+
+			selectAddress() {
+				uni.navigateTo({
+					url: '/pages/store/selectTdMap?url=' + '/pages/store/editStore'
+				})
+			},
+			back() {
+				uni.navigateTo({
+					url: '/pages/index/shop'
+				})
+			},
+			submit() {
+				// this.$http.post('/merchant/localMerchantInfo/edit', { ...this.form, headPhoto: this.form.headPhoto.join(',') }).then(res => {
+				this.$http.post('/merchant/localMerchantInfo/editMerchantInfo ', {
+					...this.form,
+					headPhoto: this.form.headPhoto.join(',')
+				}).then(res => {
+					if (res.data.success) {
+						this.$tip.success(res.data.result || '成功')
+						uni.navigateTo({
+							url: '/pages/index/shop'
+						})
+					} else {
+						this.$tip.error(res.data.message);
+					}
+				})
+			},
+			uploadAll() {
+				if (this.imageList.length === 0) {
+					uni.showToast({
+						title: '请先选择图片',
+						icon: 'none'
+					});
+					return;
+				}
+
+				uni.showLoading({
+					title: '上传中...',
+					mask: true
+				});
+
+				const uploadPromises = this.imageList.map((path, index) => {
+					return new Promise((resolve, reject) => {
+						uni.uploadFile({
+							url: configService.apiUrl + '/sys/common/upload', // 替换为实际接口
+							filePath: path,
+							formData: {
+								'biz': 'temp',
+							},
+							name: 'file',
+							success: (files) => {
+								resolve(configService.apiUrl + '/' + JSON.parse(files.data).message)
+							},
+							fail: reject
+						});
+					});
+
+				});
+
+				Promise.all(uploadPromises)
+					.then(results => {
+						uni.hideLoading();
+						this.imageList = []; // 清空已上传列表
+						this.headPhotoImg = this.headPhotoImg.concat(results)
+						this.form.headPhoto = this.form.headPhoto.concat(results)
+					})
+					.catch(error => {
+						uni.hideLoading();
+					});
+			},
+			ChooseImage() {
+				uni.chooseImage({
+					count: 5 - Number(this.headPhotoImg.length),
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album'], //从相册选择
+					success: (res) => {
+						if (res) {
+							this.imageList = [...this.imageList, ...res.tempFilePaths];
+							this.uploadAll()
+						}
+					}
+				});
+			},
+			onConfirm(e) {
+				console.log(e)
+
+				this.mapIsHidden = false
+				this.form.locality = e.result
+				this.form.country = e.value[e.value.length - 1]
+				this.form.thirdPartyAreaList = e.value
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							this.headPhotoImg.splice(e.currentTarget.dataset.index, 1)
+							this.form.headPhoto.splice(e.currentTarget.dataset.index, 1)
+						}
+					}
+				})
+			},
+			ViewImage(e) {
+				uni.previewImage({
+					urls: this.headPhotoImg,
+					current: e.currentTarget.dataset.url
+				});
+			},
+			handleMarkerTap() {
+				const queryString = this.form.longitude && this.form.latitude ? {
+						longitude: this.form.longitude,
+						latitude: this.form.latitude,
+					} :
+					uni.getStorageSync('address') ?
+					encodeURIComponent(JSON.stringify(uni.getStorageSync('address'))) : {}
+
+				// const queryString = uni.getStorageSync('address') ? encodeURIComponent(JSON.stringify(uni.getStorageSync('address'))) : ''
+				uni.navigateTo({
+					url: `/pages/login/map?position=${queryString}`
+				})
+
+			},
+		}
+	}
 </script>
 <style scoped lang="scss">
-.creat {
-    background: #F7F8FC;
-    // flex-direction: column;
-    // position: fixed;
-}
-
-.borderRadiu {
-    margin: 22upx 26upx;
-    padding-bottom: 120upx;
-    background-color: #ffffff;
-}
-
-.sub-bottom {
-    position: fixed;
-    width: 100%;
-    bottom: 0;
-    background: #FFFFFF;
-    border-top: 1px solid #EEEEEE;
-}
-
-.customize {
-    background-color: #fff;
-    // border-top: 0.5px solid #eee;
-    margin: 16upx 18upx;
-
-    .title {
-        font-size: 30upx;
-        // padding: 10px;
-    }
-
-    .business-img {
-        height: 218upx;
-        width: 360upx;
-        padding: 16upx;
-        // padding-bottom: 16upx;
-        background: url('/static/login/yingye2.png');
-        margin: 16upx auto;
-        background-size: cover;
-
-        image {
-            width: 100%;
-            height: 100%;
-        }
-    }
-
-    .business-prompt {
-        padding-top: 16upx;
-        font-size: 20upx;
-        color: #999999;
-    }
-}
-
-.booder-top {
-    border-bottom: 1px solid rgb(238, 238, 238);
-    padding-top: 7px;
-}
-.picker-style {
-    .w-picker-cnt .visible {
-        position: absolute;
-        z-index: 100000;
-    }
-}
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
+	}
+
+	.head {
+		width: 100%;
+		background: #ffffff;
+
+		.handle {
+			height: 112rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0px 24rpx;
+			position: relative;
+
+			.head_left {
+				font-size: 40rpx;
+			}
+
+			.center {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+				font-size: 30rpx;
+				font-weight: 600;
+			}
+
+			.head_right {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				span {
+					width: 40rpx;
+					height: 40rpx;
+					display: flex;
+					font-size: 28rpx;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+
+	}
+
+	.creat {
+		background: #F7F8FC;
+		// flex-direction: column;
+		// position: fixed;
+	}
+
+	.borderRadiu {
+		margin: 22upx 26upx;
+		padding-bottom: 120upx;
+		background-color: #ffffff;
+	}
+
+	.sub-bottom {
+		position: fixed;
+		width: 100%;
+		bottom: 0;
+		background: #FFFFFF;
+		border-top: 1px solid #EEEEEE;
+	}
+
+	.customize {
+		background-color: #fff;
+		// border-top: 0.5px solid #eee;
+		margin: 16upx 18upx;
+
+		.title {
+			font-size: 30upx;
+			// padding: 10px;
+		}
+
+		.business-img {
+			height: 218upx;
+			width: 360upx;
+			padding: 16upx;
+			// padding-bottom: 16upx;
+			background: url('/static/login/yingye2.png');
+			margin: 16upx auto;
+			background-size: cover;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.business-prompt {
+			padding-top: 16upx;
+			font-size: 20upx;
+			color: #999999;
+		}
+	}
+
+	.booder-top {
+		border-bottom: 1px solid rgb(238, 238, 238);
+		padding-top: 7px;
+	}
+
+	.picker-style {
+		.w-picker-cnt .visible {
+			position: absolute;
+			z-index: 100000;
+		}
+	}
 </style>

+ 13 - 8
pages/store/headPhoto.vue

@@ -22,14 +22,15 @@
 								<text class='cuIcon-close'></text>
 							</view>
 						</view>
-						
-					</view>
-					<view class="grid col-4 grid-square flex-sub booder-top" v-else>
-						<view class="solids" @tap="ChooseImage" >
-							<text class='cuIcon-cameraadd'></text>
+						<view class="grid col-4 grid-square flex-sub booder-top" >
+							<view class="solids" @tap="ChooseImage" >
+								<text class='cuIcon-cameraadd'></text>
+							</view>
 						</view>
+						
 					</view>
 					
+					
 					<view class="business-prompt">
 						门店照片需包含完整的门店入口和招牌名称,建议现场拍摄门头照;最多可上传10张,支持格式bmp、png、jpeg、jpg,单个图片不超过5MB,建议宽高比7:5
 					</view>
@@ -140,9 +141,9 @@
 									if (data.success) {
 										let temp = this.form.headPhoto.split(',')
 										if (this.form.headPhoto.split(',').length > 0) {
-											console.log('11111')
 											// this.photoList = this.photoList.concat(res.tempFilePaths)
-											// this.form.headPhoto+(configService.apiUrl + '/' + data.message)
+											this.form.photo.push(configService.apiUrl + '/' + data.message)
+											this.form.headPhoto+(configService.apiUrl + '/' + data.message)
 											temp.push(configService.apiUrl + '/' + data.message)
 											 this.form.headPhoto = temp.join(',')
 											console.log(this.form.headPhoto)
@@ -190,7 +191,11 @@
 								delta: 1 // 返回的页面数,默认为1
 							})
 						} else {
-							this.$tip.error(res.data.message);
+							// this.$tip.error(res.data.message);
+							uni.showToast({
+								icon:'none',
+								title:res.data.message
+							})
 						}
 					})
 				}

+ 761 - 0
pages/store/selectTdMap.vue

@@ -0,0 +1,761 @@
+<template>
+	<view class="container">
+		<view class="top"></view>
+		<view class="head">
+			<view class="handle">
+				<view class="head_left">
+					<span class="cuIcon-back" @click="back"></span>
+				</view>
+				<span class="center">商品管理</span>
+				<view class="head_right">
+					<!-- <span class="cuIcon-search" @click="goSearch"></span> -->
+					<view class="manage" @click="confirm">
+						确定
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 地图容器 - 必须设置明确高度 -->
+		<view id="mapContainer" class="map-container"></view>
+
+		<!-- 搜索功能区域 -->
+		<view class="search-panel" v-if="showSearch">
+			<view class="search-input-group">
+				<input class="search-input" v-model="searchKeyword" placeholder="输入关键词搜索地点" @confirm="handleSearch" />
+				<button class="search-btn" @click="handleSearch">搜索</button>
+			</view>
+
+			<!-- 搜索结果列表 -->
+			<view class="search-results" v-if="searchResults.length > 0">
+				<view class="result-header">
+					<text>搜索结果 ({{ searchResults.length }} 个)</text>
+					<text class="clear-results" @click="clearSearchResults">清除</text>
+				</view>
+				<scroll-view class="results-list" scroll-y>
+					<view v-for="(result, index) in searchResults" :key="index" class="result-item"
+						@click="selectSearchResult(result)">
+						<view class="result-name">{{ result.name }}</view>
+						<view class="result-address">{{ result.address }}</view>
+						<view class="result-coord">经度:{{ result.lng.toFixed(6) }} 纬度:{{ result.lat.toFixed(6) }}</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			initialPosition: {
+				type: Object,
+				default: () => ({
+					lnglat: null,
+					address: ''
+				})
+			},
+			allowSelection: {
+				type: Boolean,
+				default: true
+			},
+			showCoordinates: {
+				type: Boolean,
+				default: true
+			},
+			showSearch: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				map: null,
+				geocoder: null,
+				localSearch: null,
+				tk: '92c4ddd919f4e41a30e765680e3a29b7',
+				longitude: '未选择',
+				latitude: '未选择',
+				address: '未获取',
+				markers: [],
+				labels: [],
+				infoWindows: [],
+				mapInitialized: false,
+				searchKeyword: '',
+				searchResults: [],
+				currentInfoWindow: null,
+				lng: '',
+				lat: '',
+				addressname: '',
+				selectedPosition: null,
+				backurl: ''
+			};
+		},
+		watch: {
+			initialPosition: {
+				immediate: true,
+				handler(newVal) {
+					if (this.mapInitialized && newVal && this.isValidPosition(newVal)) {
+						this.processPosition(newVal);
+					}
+				}
+			},
+			allowSelection(newVal) {
+				if (this.map) {
+					if (newVal) {
+						this.enableMapSelection();
+					} else {
+						this.disableMapSelection();
+					}
+				}
+			}
+		},
+		mounted() {
+			// 确保在H5环境下运行
+			// #ifdef H5
+			this.$nextTick(() => {
+				setTimeout(() => {
+					this.initMap();
+				}, 300);
+			});
+			// #endif
+
+			// 非H5环境提示
+			// #ifndef H5
+			console.warn("天地图组件仅支持H5环境");
+			uni.showToast({
+				title: '地图功能仅在H5环境可用',
+				icon: 'none'
+			});
+			// #endif
+		},
+		beforeUnmount() {
+			this.cleanupMap();
+		},
+		onLoad(option) {
+			console.log(option)
+			this.backurl = option.url
+		},
+		methods: {
+			confirm() {
+				console.log('确认选择位置:', this.lng, this.lat, this.addressname);
+
+				if (!this.lng || !this.lat) {
+					uni.showToast({
+						title: '请先选择位置',
+						icon: 'none'
+					});
+					return;
+				}
+
+				const params = {
+					lng: this.lng,
+					lat: this.lat,
+					address: this.addressname
+				};
+
+				uni.setStorageSync('address', params);
+				uni.navigateBack({
+					delta: 1 // 返回的页面数,默认为1
+				})
+				// 使用encodeURIComponent编码参数
+				// const queryString = Object.keys(params)
+				// 	.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
+				// 	.join('&');
+
+				// // 拼接完整URL
+				// const url = `${this.backurl}?${queryString}`;
+				// uni.navigateTo({
+				// 	url: url
+				// })
+
+			},
+			back() {
+				uni.navigateBack()
+			},
+
+			isValidPosition(position) {
+				const lng = position.lng ||
+					(position.lnglat && (position.lnglat.lng || position.lnglat.longitude));
+				const lat = position.lat ||
+					(position.lnglat && (position.lnglat.lat || position.lnglat.latitude));
+
+				return lng && lat && !isNaN(parseFloat(lng)) && !isNaN(parseFloat(lat));
+			},
+
+			processPosition(position) {
+				const lng = position.lng ||
+					(position.lnglat && (position.lnglat.lng || position.lnglat.longitude));
+				const lat = position.lat ||
+					(position.lnglat && (position.lnglat.lat || position.lnglat.latitude));
+
+				if (lng && lat) {
+					this.setMapCenter(parseFloat(lng), parseFloat(lat));
+					this.reverseGeocode(parseFloat(lng), parseFloat(lat));
+				}
+			},
+
+			initMap() {
+				if (typeof T === 'undefined') {
+					this.loadTiandituAPI().then(() => {
+						this.createMap();
+					}).catch(err => {
+						console.error("天地图加载失败:", err);
+						uni.showToast({
+							title: '地图加载失败',
+							icon: 'none'
+						});
+					});
+				} else {
+					this.createMap();
+				}
+			},
+
+			loadTiandituAPI() {
+				return new Promise((resolve, reject) => {
+					if (window.T) return resolve();
+
+					const script = document.createElement('script');
+					script.src = `https://api.tianditu.gov.cn/api?v=4.0&tk=${this.tk}`;
+					script.onload = resolve;
+					script.onerror = () => reject(new Error('天地图脚本加载失败'));
+					document.head.appendChild(script);
+				});
+			},
+
+			createMap() {
+				try {
+					this.map = new T.Map('mapContainer');
+
+					let centerLng = 112.55;
+					let centerLat = 37.87;
+
+					if (this.initialPosition && this.isValidPosition(this.initialPosition)) {
+						const lng = this.initialPosition.lng ||
+							(this.initialPosition.lnglat && (this.initialPosition.lnglat.lng || this.initialPosition.lnglat
+								.longitude));
+						const lat = this.initialPosition.lat ||
+							(this.initialPosition.lnglat && (this.initialPosition.lnglat.lat || this.initialPosition.lnglat.latitude));
+
+						centerLng = parseFloat(lng);
+						centerLat = parseFloat(lat);
+
+						this.longitude = centerLng.toFixed(6);
+						this.latitude = centerLat.toFixed(6);
+						this.address = '正在查询地址...';
+					}
+
+					this.map.centerAndZoom(new T.LngLat(centerLng, centerLat), 12);
+					this.geocoder = new T.Geocoder();
+
+					// 初始化本地搜索
+					const searchConfig = {
+						pageCapacity: 10,
+						onSearchComplete: this.handleSearchComplete.bind(this)
+					};
+					this.localSearch = new T.LocalSearch(this.map, searchConfig);
+
+					const vecLayer = new T.TileLayer(
+						`https://t{s}.tianditu.gov.cn/vec_c/wmts?tk=${this.tk}`, {
+							subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
+						}
+					);
+					const cvaLayer = new T.TileLayer(
+						`https://t{s}.tianditu.gov.cn/cva_c/wmts?tk=${this.tk}`, {
+							subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
+						}
+					);
+
+					this.map.addLayer(vecLayer);
+					this.map.addLayer(cvaLayer);
+					this.map.addControl(new T.Control.Zoom());
+
+					if (this.allowSelection) this.enableMapSelection();
+
+					if (this.initialPosition && this.isValidPosition(this.initialPosition)) {
+						const lng = this.initialPosition.lng ||
+							(this.initialPosition.lnglat && (this.initialPosition.lnglat.lng || this.initialPosition.lnglat
+								.longitude));
+						const lat = this.initialPosition.lat ||
+							(this.initialPosition.lnglat && (this.initialPosition.lnglat.lat || this.initialPosition.lnglat.latitude));
+
+						this.addMarker(parseFloat(lng), parseFloat(lat));
+						this.reverseGeocode(parseFloat(lng), parseFloat(lat));
+					}
+
+					this.mapInitialized = true;
+				} catch (e) {
+					console.error('地图初始化错误:', e);
+				}
+			},
+
+			// 搜索相关方法
+			handleSearch() {
+				if (!this.searchKeyword.trim()) {
+					uni.showToast({
+						title: '请输入搜索关键词',
+						icon: 'none'
+					});
+					return;
+				}
+
+				this.localSearch.search(this.searchKeyword);
+			},
+
+			handleSearchComplete(result) {
+				this.clearSearchMarkers();
+				this.searchResults = [];
+
+				if (result.getResultType() === 1) {
+					const pois = result.getPois();
+					if (pois && pois.length > 0) {
+						this.searchResults = pois.map(poi => ({
+							name: poi.name,
+							address: poi.address,
+							lng: parseFloat(poi.lonlat.split(',')[0]),
+							lat: parseFloat(poi.lonlat.split(',')[1])
+						}));
+
+						// 在地图上显示搜索结果标记
+						pois.forEach(poi => {
+							const lng = parseFloat(poi.lonlat.split(',')[0]);
+							const lat = parseFloat(poi.lonlat.split(',')[1]);
+							this.addSearchMarker(lng, lat, poi.name, poi.address);
+						});
+
+						// 调整地图视图以显示所有结果
+						const points = pois.map(poi => {
+							const lnglat = poi.lonlat.split(',');
+							return new T.LngLat(parseFloat(lnglat[0]), parseFloat(lnglat[1]));
+						});
+						this.map.setViewport(points);
+					} else {
+						uni.showToast({
+							title: '未找到相关结果',
+							icon: 'none'
+						});
+					}
+				}
+			},
+
+			selectSearchResult(result) {
+				this.setMapCenter(result.lng, result.lat);
+				this.address = result.address;
+				this.lng = result.lng;
+				this.lat = result.lat;
+				this.addressname = result.name;
+				console.log('选择搜索结果:', this.lng, this.lat, this.addressname);
+
+				this.updateLabelContent();
+				this.notifyParent();
+
+				// 关闭其他信息窗口,打开当前结果的信息窗口
+				this.closeAllInfoWindows();
+				this.openInfoWindow(result.lng, result.lat, result.name, result.address);
+			},
+
+			clearSearchResults() {
+				this.searchResults = [];
+				this.searchKeyword = '';
+				this.clearSearchMarkers();
+			},
+
+			// 地图交互方法
+			enableMapSelection() {
+				this.map.on('click', this.handleMapClick);
+			},
+
+			disableMapSelection() {
+				this.map.off('click', this.handleMapClick);
+			},
+
+			setMapCenter(lng, lat) {
+				this.longitude = parseFloat(lng).toFixed(6);
+				this.latitude = parseFloat(lat).toFixed(6);
+
+				this.clearMarkers();
+				this.addMarker(lng, lat);
+				this.map.panTo(new T.LngLat(lng, lat));
+				this.notifyParent();
+			},
+
+			reverseGeocode(lng, lat) {
+				if (!this.geocoder) return;
+
+				this.address = '正在查询...';
+				const point = new T.LngLat(lng, lat);
+
+				this.geocoder.getLocation(point, (result) => {
+					if (result.getStatus() === 0) {
+						this.address = result.getAddress();
+						this.addressname = this.address;
+					} else {
+						this.address = '查询失败';
+					}
+
+					this.updateLabelContent();
+					this.notifyParent();
+				});
+			},
+
+			handleMapClick(e) {
+				if (!this.allowSelection) return;
+				this.setMapCenter(e.lnglat.lng, e.lnglat.lat);
+				this.reverseGeocode(e.lnglat.lng, e.lnglat.lat);
+
+				// 点击地图时也显示信息窗口
+				this.openInfoWindow(e.lnglat.lng, e.lnglat.lat, '选中位置', this.address);
+			},
+
+			notifyParent() {
+				this.$emit('update-location', {
+					longitude: this.longitude,
+					latitude: this.latitude,
+					address: this.address
+				});
+			},
+
+			// 标记和信息窗口管理
+			addMarker(lng, lat) {
+				try {
+					const point = new T.LngLat(lng, lat);
+
+					const markerIcon = new T.Icon({
+						iconUrl: 'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%231296db" stroke="%23ffffff" stroke-width="2"/></svg>',
+						iconSize: new T.Point(24, 24),
+						iconAnchor: new T.Point(12, 24)
+					});
+
+					const marker = new T.Marker(point, {
+						icon: markerIcon
+					});
+
+					// 为标记添加点击事件,显示信息窗口
+					marker.addEventListener('click', () => {
+						this.openInfoWindow(lng, lat, '选中位置', this.address);
+					});
+
+					this.map.addOverLay(marker);
+					this.markers.push(marker);
+
+					this.addLabel(lng, lat, this.address);
+
+				} catch (error) {
+					console.error('添加标记失败:', error);
+				}
+			},
+
+			addSearchMarker(lng, lat, name, address) {
+				try {
+					const point = new T.LngLat(lng, lat);
+
+					const markerIcon = new T.Icon({
+						iconUrl: 'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" fill="%23ff6b6b" stroke="%23ffffff" stroke-width="2"/></svg>',
+						iconSize: new T.Point(20, 20),
+						iconAnchor: new T.Point(10, 20)
+					});
+
+					const marker = new T.Marker(point, {
+						icon: markerIcon
+					});
+
+					// 为搜索结果的标记添加点击事件
+					marker.addEventListener('click', () => {
+						this.openInfoWindow(lng, lat, name, address);
+					});
+
+					this.map.addOverLay(marker);
+					this.markers.push(marker);
+
+				} catch (error) {
+					console.error('添加搜索标记失败:', error);
+				}
+			},
+
+			openInfoWindow(lng, lat, title, content) {
+				this.closeAllInfoWindows();
+
+				const point = new T.LngLat(lng, lat);
+				const infoContent = `
+        <div style="min-width: 250px; padding: 10px;">
+          <div style="font-weight: bold; margin-bottom: 8px; color: #1890ff;">${title}</div>
+          <div style="margin-bottom: 5px; color: #666;">${content}</div>
+          <div style="font-size: 12px; color: #999;">
+            经度: ${lng.toFixed(6)}<br/>
+            纬度: ${lat.toFixed(6)}
+          </div>
+        </div>
+      `;
+
+				const infoWindow = new T.InfoWindow(infoContent, {
+					autoPan: true,
+					width: 280,
+					height: 'auto'
+				});
+
+				this.map.openInfoWindow(infoWindow, point);
+				this.currentInfoWindow = infoWindow;
+			},
+
+			closeAllInfoWindows() {
+				if (this.currentInfoWindow) {
+					this.map.closeInfoWindow();
+					this.currentInfoWindow = null;
+				}
+			},
+
+			addLabel(lng, lat, content) {
+				try {
+					const point = new T.LngLat(lng, lat);
+
+					const label = new T.Label({
+						text: content || '未知地址',
+						position: point,
+						offset: new T.Point(0, -35)
+					});
+
+					label.setStyle({
+						color: '#333',
+						backgroundColor: 'rgba(255, 255, 255, 0.95)',
+						border: '1px solid #ddd',
+						borderRadius: '4px',
+						padding: '6px 12px',
+						fontSize: '12px',
+						fontWeight: 'normal',
+						boxShadow: '0 2px 6px rgba(0,0,0,0.15)',
+						maxWidth: '200px',
+						textAlign: 'center',
+						whiteSpace: 'nowrap',
+						overflow: 'hidden',
+						textOverflow: 'ellipsis'
+					});
+
+					this.map.addOverLay(label);
+					this.labels.push(label);
+				} catch (error) {
+					console.error('添加标签失败:', error);
+				}
+			},
+
+			updateLabelContent() {
+				if (this.labels.length > 0) {
+					const lastLabel = this.labels[this.labels.length - 1];
+					lastLabel.setText(this.address);
+				}
+			},
+
+			clearMarkers() {
+				this.markers.forEach(marker => {
+					try {
+						this.map.removeOverLay(marker);
+					} catch (error) {
+						console.error('移除标记失败:', error);
+					}
+				});
+				this.markers = [];
+
+				this.labels.forEach(label => {
+					try {
+						this.map.removeOverLay(label);
+					} catch (error) {
+						console.error('移除标签失败:', error);
+					}
+				});
+				this.labels = [];
+
+				this.closeAllInfoWindows();
+			},
+
+			clearSearchMarkers() {
+				// 清除搜索相关的标记,保留主标记
+				const mainMarkers = this.markers.filter(marker => {
+					// 这里可以根据标记的特定属性来区分主标记和搜索标记
+					// 简化处理:保留最后一个标记(通常是用户选择的主标记)
+					return this.markers.indexOf(marker) === this.markers.length - 1;
+				});
+
+				this.markers = mainMarkers;
+			},
+
+			cleanupMap() {
+				if (this.map) {
+					this.clearMarkers();
+					this.map.destroy();
+					this.map = null;
+				}
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
+	}
+
+	.head {
+		width: 100%;
+		background: #ffffff;
+
+		.handle {
+			height: 112rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0px 24rpx;
+			position: relative;
+
+			.head_left {
+				font-size: 40rpx;
+			}
+
+			.center {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+				font-size: 30rpx;
+				font-weight: 600;
+			}
+
+			.head_right {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				span {
+					width: 40rpx;
+					height: 40rpx;
+					display: flex;
+					font-size: 28rpx;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+
+	}
+
+	.container {
+		width: 100%;
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		position: relative;
+		z-index: 0;
+	}
+
+	.map-container {
+		width: 100%;
+		height: 600rpx;
+		border: 1px solid #eee;
+		background-color: #f8f8f8;
+	}
+
+	/* 搜索面板样式 */
+	.search-panel {
+		margin-top: 20rpx;
+		padding: 20rpx;
+		background-color: #f8f9fa;
+		border-radius: 8rpx;
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.search-input-group {
+		display: flex;
+		gap: 10rpx;
+		margin-bottom: 20rpx;
+	}
+
+	.search-input {
+		flex: 1;
+		height: 70rpx;
+		padding: 0 20rpx;
+		border: 1px solid #ddd;
+		border-radius: 8rpx;
+		background-color: white;
+	}
+
+	.search-btn {
+		height: 70rpx;
+		background-color: #1890ff;
+		color: white;
+		border-radius: 8rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.search-results {
+		border: 1px solid #e8e8e8;
+		border-radius: 8rpx;
+		flex: 1;
+		background-color: white;
+	}
+
+	.result-header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 20rpx;
+		border-bottom: 1px solid #f0f0f0;
+		font-weight: bold;
+	}
+
+	.clear-results {
+		color: #1890ff;
+		font-size: 12px;
+	}
+
+	.results-list {
+		max-height: 700rpx;
+	}
+
+	.result-item {
+		padding: 20rpx;
+		border-bottom: 1px solid #f5f5f5;
+		cursor: pointer;
+	}
+
+	.result-item:last-child {
+		border-bottom: none;
+	}
+
+	.result-item:hover {
+		background-color: #f8f9fa;
+	}
+
+	.result-name {
+		font-weight: bold;
+		margin-bottom: 5rpx;
+		color: #333;
+	}
+
+	.result-address {
+		font-size: 12px;
+		color: #666;
+		margin-bottom: 5rpx;
+	}
+
+	.result-coord {
+		font-size: 11px;
+		color: #999;
+	}
+
+	::v-deep .tdt-bottom {
+		z-index: 0;
+	}
+
+	::v-deep .tdt-top {
+		z-index: 0;
+	}
+
+	::v-deep .tdt-bottom,
+	.tdt-control {
+		z-index: 0;
+	}
+</style>

+ 66 - 3
pages/store/settings.vue

@@ -1,8 +1,19 @@
 <template>
 	<view>
-		<cu-custom bgColor="bg-fff" :isBack="true">
+		<!-- <cu-custom bgColor="bg-fff" :isBack="true">
 			<block slot="content">店铺设置</block>
-		</cu-custom>
+		</cu-custom> -->
+		<view class="top"></view>
+		<view class="head">
+			<view class="handle">
+				<view class="head_left">
+					<span class="cuIcon-back" @click="back"></span>
+				</view>
+				<span class="center">店铺设置</span>
+				<view class="head_right">
+				</view>
+			</view>
+		</view>
 		<view class="bg-fff" v-for="ele in ulList" :key="ele.name">
 			<view class=" cu-form-group" :style="ele.name == '基本信息' ? 'margin-top:0' : ''">
 				<view class="content ">
@@ -133,7 +144,7 @@
 				this.selectTags = res.data.result.content ? res.data.result.content.split(',').filter(id => id !== '') : []
 
 				this.indexOption = res.data.result
-				uni.setStorageSync('address', {longitude:res.data.result.longitude,latitude:res.data.result.latitude});
+				uni.setStorageSync('address', {lng:res.data.result.longitude,lat:res.data.result.latitude,address:res.data.result.address});
 				uni.setStorageSync('currentAddress', {name:res.data.result.address});
 				
 			} else {
@@ -142,6 +153,11 @@
 			this.getOther()
 		},
 		methods: {
+			back(){
+				uni.switchTab({
+					url:'/pages/index/index'
+				})
+			},
 			getOther(){
 				this.$http.get('/localOther/localMerchantOther/queryById?id='+this.merchantId).then(res => {
 					console.log(res)
@@ -232,6 +248,53 @@
 	page {
 		background: #F8F8FA;
 	}
+	.top {
+		width: 100%;
+		height: var(--status-bar-height);
+		background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
+	}
+	.head {
+		width: 100%;
+		background: #ffffff;
+	
+		.handle {
+			height: 112rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0px 24rpx;
+			position: relative;
+	
+			.head_left {
+				font-size: 40rpx;
+			}
+	
+			.center {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+				font-size: 30rpx;
+				font-weight: 600;
+			}
+	
+			.head_right {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+	
+				span {
+					width: 40rpx;
+					height: 40rpx;
+					display: flex;
+					font-size: 28rpx;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+	
+	}
 
 	.cu-form-group {
 		margin: 18upx 42upx;

+ 428 - 0
pages/store/tdtuMap.vue

@@ -0,0 +1,428 @@
+<template>
+  <view class="container">
+    <!-- 地图容器 - 必须设置明确高度 -->
+    <view id="mapContainer" class="map-container"></view>
+
+    <!-- 坐标显示区域 -->
+    <view class="coordinates" v-if="showCoordinates">
+      <view class="coordinate-item">
+        <text class="coordinate-label">经度:</text>
+        <text class="coordinate-value">{{ longitude }}</text>
+      </view>
+      <view class="coordinate-item">
+        <text class="coordinate-label">纬度:</text>
+        <text class="coordinate-value">{{ latitude }}</text>
+      </view>
+      <view class="coordinate-item"> 
+        <text class="coordinate-label">地址:</text>
+        <text class="coordinate-value">{{ address }}</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    initialPosition: {
+      type: Object,
+      default: () => ({
+        lnglat: null,
+        address: ''
+      })
+    },
+    allowSelection: {
+      type: Boolean,
+      default: true
+    },
+    showCoordinates: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      map: null,
+      geocoder: null,
+      tk: '92c4ddd919f4e41a30e765680e3a29b7', // 替换为实际密钥
+      longitude: '未选择',
+      latitude: '未选择',
+      address: '未获取',
+      markers: [],
+      labels: [], // 存储文本标签
+      mapInitialized: false
+    };
+  },
+  watch: {
+    initialPosition: {
+      immediate: true,
+      handler(newVal) {
+        if (this.mapInitialized && newVal && this.isValidPosition(newVal)) {
+          this.processPosition(newVal);
+        }
+      }
+    },
+    allowSelection(newVal) {
+      if (this.map) {
+        if (newVal) {
+          this.enableMapSelection();
+        } else {
+          this.disableMapSelection();
+        }
+      }
+    }
+  },
+  mounted() {
+    // 确保在H5环境下运行
+    // #ifdef H5
+    this.$nextTick(() => {
+      setTimeout(() => {
+        this.initMap();
+      }, 500);
+    });
+    // #endif
+
+    // 非H5环境提示
+    // #ifndef H5
+    console.warn("天地图组件仅支持H5环境");
+    uni.showToast({
+      title: '地图功能仅在H5环境可用',
+      icon: 'none'
+    });
+    // #endif
+  },
+  methods: {
+    // 验证坐标是否有效
+    isValidPosition(position) {
+      const lng = position.lng ||
+        (position.lnglat && (position.lnglat.lng || position.lnglat.longitude));
+      const lat = position.lat ||
+        (position.lnglat && (position.lnglat.lat || position.lnglat.latitude));
+
+      return lng && lat && !isNaN(parseFloat(lng)) && !isNaN(parseFloat(lat));
+    },
+
+    // 处理坐标数据
+    processPosition(position) {
+      const lng = position.lng ||
+        (position.lnglat && (position.lnglat.lng || position.lnglat.longitude));
+      const lat = position.lat ||
+        (position.lnglat && (position.lnglat.lat || position.lnglat.latitude));
+
+      if (lng && lat) {
+        this.setMapCenter(parseFloat(lng), parseFloat(lat));
+        this.reverseGeocode(parseFloat(lng), parseFloat(lat));
+      }
+    },
+
+    initMap() {
+      if (typeof T === 'undefined') {
+        this.loadTiandituAPI().then(() => {
+          this.createMap();
+        }).catch(err => {
+          console.error("天地图加载失败:", err);
+          uni.showToast({
+            title: '地图加载失败',
+            icon: 'none'
+          });
+        });
+      } else {
+        this.createMap();
+      }
+    },
+
+    loadTiandituAPI() {
+      return new Promise((resolve, reject) => {
+        if (window.T) return resolve();
+
+        const script = document.createElement('script');
+        script.src = `https://api.tianditu.gov.cn/api?v=4.0&tk=${this.tk}`;
+        script.onload = resolve;
+        script.onerror = () => reject(new Error('天地图脚本加载失败'));
+        document.head.appendChild(script);
+      });
+    },
+
+    createMap() {
+      try {
+        // 创建地图实例
+        this.map = new T.Map('mapContainer');
+
+        // 设置默认中心点(太原)
+        let centerLng = 112.55;
+        let centerLat = 37.87;
+				let name = ''
+
+        // 使用初始坐标(如果存在)
+        if (this.initialPosition && this.isValidPosition(this.initialPosition)) {
+          const lng = this.initialPosition.lng ||
+            (this.initialPosition.lnglat && (this.initialPosition.lnglat.lng || this.initialPosition.lnglat
+              .longitude));
+          const lat = this.initialPosition.lat ||
+            (this.initialPosition.lnglat && (this.initialPosition.lnglat.lat || this.initialPosition.lnglat.latitude));
+
+          centerLng = parseFloat(lng);
+          centerLat = parseFloat(lat);
+					name = this.initialPosition.address
+          // 更新坐标显示
+          this.longitude = centerLng.toFixed(6);
+          this.latitude = centerLat.toFixed(6);
+          this.address = name;
+        }
+
+        // 设置地图中心和缩放级别
+        this.map.centerAndZoom(new T.LngLat(centerLng, centerLat), 12);
+
+        // 创建逆地理编码对象
+        this.geocoder = new T.Geocoder();
+
+        // 添加正确的地图图层(使用经纬度投影)
+        const vecLayer = new T.TileLayer(
+          `https://t{s}.tianditu.gov.cn/vec_c/wmts?tk=${this.tk}`, {
+            subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
+          }
+        );
+        const cvaLayer = new T.TileLayer(
+          `https://t{s}.tianditu.gov.cn/cva_c/wmts?tk=${this.tk}`, {
+            subdomains: ['0', '1', '2', '3', '4', '5', '6', '7']
+          }
+        );
+
+        this.map.addLayer(vecLayer);
+        this.map.addLayer(cvaLayer);
+
+        // 添加缩放控件
+        this.map.addControl(new T.Control.Zoom());
+
+        // 启用选点功能
+        if (this.allowSelection) this.enableMapSelection();
+
+        // 添加初始标记
+        if (this.initialPosition && this.isValidPosition(this.initialPosition)) {
+          const lng = this.initialPosition.lng ||
+            (this.initialPosition.lnglat && (this.initialPosition.lnglat.lng || this.initialPosition.lnglat
+              .longitude));
+          const lat = this.initialPosition.lat ||
+            (this.initialPosition.lnglat && (this.initialPosition.lnglat.lat || this.initialPosition.lnglat.latitude));
+
+          this.addMarker(parseFloat(lng), parseFloat(lat));
+          this.reverseGeocode(parseFloat(lng), parseFloat(lat));
+        }
+
+        this.mapInitialized = true;
+      } catch (e) {
+        console.error('地图初始化错误:', e);
+      }
+    },
+
+    // 启用地图选点
+    enableMapSelection() {
+      this.map.on('click', this.handleMapClick);
+    },
+
+    // 禁用地图选点
+    disableMapSelection() {
+      this.map.off('click', this.handleMapClick);
+    },
+
+    // 设置地图中心点并更新坐标显示
+    setMapCenter(lng, lat) {
+      this.longitude = parseFloat(lng).toFixed(6);
+      this.latitude = parseFloat(lat).toFixed(6);
+
+      // 清除现有标记
+      this.clearMarkers();
+
+      // 添加新标记
+      this.addMarker(lng, lat);
+
+      // 移动地图视图
+      this.map.panTo(new T.LngLat(lng, lat));
+      
+      // 通知父组件
+      this.notifyParent();
+    },
+
+    // 逆地理编码
+    reverseGeocode(lng, lat) {
+      if (!this.geocoder) return;
+
+      this.address = '正在查询...';
+      const point = new T.LngLat(lng, lat);
+
+      this.geocoder.getLocation(point, (result) => {
+        if (result.getStatus() === 0) {
+          this.address = result.getAddress();
+        } else {
+          this.address = '查询失败';
+        }
+        
+        // 更新标签内容
+        this.updateLabelContent();
+        this.notifyParent();
+      });
+    },
+
+    // 地图点击事件
+    handleMapClick(e) {
+      if (!this.allowSelection) return;
+      this.setMapCenter(e.lnglat.lng, e.lnglat.lat);
+      this.reverseGeocode(e.lnglat.lng, e.lnglat.lat);
+    },
+
+    // 通知父组件位置信息
+    notifyParent() {
+      this.$emit('update-location', {
+        longitude: this.longitude,
+        latitude: this.latitude,
+        address: this.address
+      });
+    },
+
+    // 添加标记
+    addMarker(lng, lat) {
+      try {
+        const point = new T.LngLat(lng, lat);
+        
+        // 添加标记
+        const marker = new T.Marker(point);
+        this.map.addOverLay(marker);
+        this.markers.push(marker);
+        
+        // 添加文本标签
+        this.addLabel(lng, lat, this.address);
+        
+        console.log('标记添加成功:', lng, lat); 
+      } catch (error) {
+        console.error('添加标记失败:', error);
+      } 
+    },
+
+    // 添加文本标签
+    addLabel(lng, lat, content) {
+      try {
+        const point = new T.LngLat(lng, lat);
+        
+        // 创建文本标签
+        const label = new T.Label({
+          text: content || '未知地址',
+          position: point,
+          offset: new T.Point(-50, -40) // 调整标签位置使其在标记点上方
+        });
+        
+        // 设置标签样式
+        // label.setStyle({
+        //   color: '#333',
+        //   backgroundColor: 'rgba(255, 255, 255, 0.9)',
+        //   border: '1px solid #ddd',
+        //   borderRadius: '4px',
+        //   padding: '5px 10px',
+        //   fontSize: '12px',
+        //   fontWeight: 'bold',
+        //   boxShadow: '0 2px 4px rgba(0,0,0,0.2)',
+        //   maxWidth: '150px',
+        //   textAlign: 'center'
+        // });
+        
+        this.map.addOverLay(label);
+        // this.labels.push(label);
+      } catch (error) {
+        console.error('添加标签失败:', error);
+      }
+    },
+    
+    // 更新标签内容
+    updateLabelContent() {
+      if (this.labels.length > 0) {
+        const lastLabel = this.labels[this.labels.length - 1];
+        lastLabel.setText(this.address);
+      }
+    },
+
+    // 清除标记和标签
+    clearMarkers() {
+      // 清除标记
+      this.markers.forEach(marker => {
+        try {
+          this.map.removeOverLay(marker);
+        } catch (error) {
+          console.error('移除标记失败:', error);
+        }
+      });
+      this.markers = [];
+      
+      // 清除标签
+      this.labels.forEach(label => {
+        try {
+          this.map.removeOverLay(label);
+        } catch (error) {
+          console.error('移除标签失败:', error);
+        }
+      });
+      this.labels = [];
+    }
+  }
+};
+</script>
+
+<style scoped>
+/* 容器样式 */
+.container {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  position: relative; /* 为绝对定位的信息窗口提供参考 */
+  z-index: 0;
+}
+
+/* 地图容器 - 关键:必须设置高度 */
+.map-container {
+  width: 100%;
+  height: 300rpx;
+  /* 使用rpx单位适应不同屏幕 */
+  border: 1px solid #eee;
+  background-color: #f8f8f8;
+}
+
+/* 坐标显示区域 */
+.coordinates {
+  margin-top: 20rpx;
+  padding: 20rpx;
+  background-color: #f8f9fa;
+  border-radius: 8rpx;
+}
+
+.coordinate-item {
+  display: flex;
+  margin: 15rpx 0;
+  padding: 15rpx 0;
+  border-bottom: 1rpx dashed #dee2e6;
+}
+
+.coordinate-item:last-child {
+  border-bottom: none;
+}
+
+.coordinate-label {
+  font-weight: bold;
+  color: #495057;
+  min-width: 120rpx;
+}
+
+.coordinate-value {
+  color: #333333;
+  font-weight: 500;
+  flex: 1;
+}
+
+/* 天地图控件层级调整 */
+::v-deep .tdt-bottom {
+  z-index: 0;
+}
+::v-deep .tdt-top {
+  z-index: 0;
+}
+::v-deep .tdt-bottom, .tdt-control {
+  z-index: 0;
+}
+</style>