shish hace 2 meses
padre
commit
7529371085

+ 4 - 4
ghsApp/src/admin/home/workbench.vue

@@ -71,9 +71,9 @@
         </view>
 
         <view class="guest-footer">
-          <text class="guest-footer-link" @click="pageTo({url:'/pagesClient/official/apply'})">我要注册</text>
-          <text class="guest-footer-divider">|</text>
-          <text class="guest-footer-link guest-footer-link--accent" @click.stop="toPhone()">联系官方</text>
+			<text class="guest-footer-link" @click.stop="toPhone()">联系官方</text>
+			<text class="guest-footer-divider">|</text>
+			<text class="guest-footer-link" @click="pageTo({url:'/pagesClient/official/apply'})">我要注册</text>
         </view>
       </view>
     </view>
@@ -1314,7 +1314,7 @@ export default {
 
 .guest-footer-link {
 	color: #6b737c;
-	font-size: 34upx;
+	font-size: 36upx;
 	line-height: 40upx;
 }
 

+ 106 - 20
ghsApp/src/components/app-area-sel.vue

@@ -3,13 +3,18 @@
 		<bottom-popup class="popup-wrap" :show="showPopup" @close="hidePopup">
 			<div class="map-wrap">
 				<div class="map-top-tit-wrap">
-					<div class="map-top-tit">地址</div>
+					<div class="map-top-tit">选择地址</div>
+					<view v-if="city" class="map-city-tip">当前城市:{{ city }}</view>
 					<app-close icon="iconguanbi" @close="hidePopup" />
 				</div>
 				<div class="map-search">
 					<app-search-module ref="aaaaa" fontSize="30" height="120" placeholder="请输入地址搜索" :focus="false" @input="searchFn" />
-					<view style="width:100%;font-size:32upx;text-align:center;padding:10upx 0 15upx 0;color:green;font-weight:bold;">建议只搜索店名、建筑名、小区名、街道门牌号。例如:隆宇大厦、东昌小区、紫霞路70号</view>
+					<view class="search-hint">
+						<text class="search-hint-text">建议搜索:店名、建筑名、小区名、街道门牌号</text>
+						<text class="search-hint-example">例如:隆宇大厦、东昌小区、紫霞路70号</text>
+					</view>
 				</div>
+				<view v-if="showNearbyTitle" class="near-section-title">附近地址</view>
 				<scroll-view class="near-list" scroll-y>
 					<view v-for="(item,index) in nearListData" :key="index" @click="switchAddress(item,index)" class="near-item">
 						<div class="current-site" :class="{'active' : currentSelectAddress === index}"></div>
@@ -18,6 +23,7 @@
 							<view class="add">{{item.address}}</view>
 						</view>
 					</view>
+					<view v-if="nearListData.length === 0 && !keyword" class="near-empty">暂无附近地址,请搜索选择</view>
 				</scroll-view>
 			</div>
 		</bottom-popup>
@@ -45,6 +51,10 @@
 			city: {
 				type: String,
 				default: ''
+			},
+			initialList: {
+				type: Array,
+				default: () => []
 			}
 		},
 		data() {
@@ -55,47 +65,84 @@
 				nearListData: []
 			}
 		},
-
+		computed: {
+			showNearbyTitle() {
+				return !this.keyword && this.initialList && this.initialList.length > 0
+			}
+		},
 		watch: {
 			show(val) {
 				this.showPopup = val
+				if (val) {
+					this.keyword = ''
+					this.$nextTick(() => {
+						if (this.$refs.aaaaa) {
+							this.$refs.aaaaa.search = ''
+						}
+						this.resetListFromInitial()
+					})
+				}
 				// #ifdef H5
-				this.$nextTick(function() {
-					setTimeout(() => {
-						this.$refs.aaaaa.$refs.searchInput._focusInput()
-					}, 1000)
-				})
+				if (val) {
+					this.$nextTick(function() {
+						setTimeout(() => {
+							if (this.$refs.aaaaa && this.$refs.aaaaa.$refs.searchInput) {
+								this.$refs.aaaaa.$refs.searchInput._focusInput()
+							}
+						}, 1000)
+					})
+				}
 				// #endif
 			},
-       city() {
-        this.nearListData = []
-        this.$refs.aaaaa.search = ''
-      }
+			city() {
+				this.keyword = ''
+				if (this.$refs.aaaaa) {
+					this.$refs.aaaaa.search = ''
+				}
+				this.resetListFromInitial()
+			},
+			initialList: {
+				handler() {
+					if (!this.keyword) {
+						this.resetListFromInitial()
+					}
+				},
+				deep: true
+			}
 		},
 		methods: {
+			resetListFromInitial() {
+				this.currentSelectAddress = null
+				this.nearListData = this.initialList && this.initialList.length ? [...this.initialList] : []
+			},
 			getAreaList() {
 				if (!this.keyword) {
+					this.resetListFromInitial()
+					return false
+				}
+				if (!this.city) {
+					uni.showToast({
+						title: '请先选择城市',
+						icon: 'none',
+						duration: 1800
+					})
 					return false
 				}
 				suggestion({ region: this.city, keyword: this.keyword }).then(res => {
-					// 处理数据结构
-					let dataList = [];
+					let dataList = []
 					if (res && res.data) {
 						dataList = res.data.tips ? res.data.tips : []
 					}
 					this.nearListData = dataList
-					
-					// 如果没有数据,显示提示
 					if (this.nearListData.length === 0) {
 						uni.showToast({
 							title: '未找到相关地址',
 							icon: 'none',
 							duration: 1800
-						});
+						})
 					}
 				})
 			},
-			// 搜索
 			searchFn(e) {
 				this.keyword = e
 				this.getAreaList()
@@ -123,14 +170,48 @@
 	}
 	.map-wrap {
 		.map-top-tit-wrap {
-			padding: 30upx 0;
+			padding: 30upx 0 20upx;
 			text-align: center;
 			font-size: 34upx;
+			position: relative;
+		}
+		.map-city-tip {
+			margin-top: 8upx;
+			color: $fontColor3;
+			font-size: 26upx;
+			line-height: 36upx;
 		}
 		.map-search {
 			padding: 0 30upx;
 			margin-bottom: 20upx;
 		}
+		.search-hint {
+			margin-top: 16upx;
+			padding: 16upx 20upx;
+			border-radius: 12upx;
+			background: #f0faf5;
+			border: 1upx solid #d4eddf;
+		}
+		.search-hint-text {
+			display: block;
+			color: #3d8b6e;
+			font-size: 30upx;
+			font-weight: 600;
+			line-height: 44upx;
+		}
+		.search-hint-example {
+			display: block;
+			margin-top: 6upx;
+			color: #8a9199;
+			font-size: 30upx;
+			line-height: 40upx;
+		}
+		.near-section-title {
+			padding: 0 30upx 12upx;
+			color: $fontColor3;
+			font-size: 26upx;
+			line-height: 36upx;
+		}
 		.map-box {
 			.current-site-icon {
 				width: 63upx;
@@ -145,7 +226,6 @@
 		// 列表
 		.near-list {
 			height: 820upx;
-			// padding-bottom: 110upx;
 			box-sizing: border-box;
 			.near-item {
 				line-height: 40upx;
@@ -187,6 +267,12 @@
 			.near-item .add1 {
 				color: $mainColor;
 			}
+			.near-empty {
+				padding: 40upx 30upx;
+				text-align: center;
+				color: $fontColor3;
+				font-size: 28upx;
+			}
 		}
 	}
 </style>

+ 36 - 110
ghsApp/src/pagesClient/official/apply.vue

@@ -105,28 +105,7 @@
       </view>
 
       <simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
-      <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
-
-      <bottom-popup class="nearby-popup-wrap" :show="showNearbyPopup" @close="closeNearbyPopup">
-        <view class="nearby-popup">
-          <view class="nearby-popup-head">
-            <text class="nearby-popup-title">选择附近地址</text>
-            <app-close icon="iconguanbi" @close="closeNearbyPopup" />
-          </view>
-          <scroll-view class="nearby-list" scroll-y>
-            <view
-              v-for="(item, index) in nearbyList"
-              :key="index"
-              class="nearby-item"
-              @click="selectNearbyAddress(item)"
-            >
-              <view class="nearby-item-name">{{ item.name }}</view>
-              <view class="nearby-item-address">{{ item.address }}</view>
-            </view>
-            <view v-if="nearbyList.length === 0" class="nearby-empty">暂无附近地址,请手动填写</view>
-          </scroll-view>
-        </view>
-      </bottom-popup>
+      <app-area-sel :show.sync="showRegion" :city="form.city" :initial-list="addressInitialList" @change="changeAreaFn" />
     </form>
   </view>
 </template>
@@ -135,8 +114,6 @@
 import TuiListCell from "@/components/plugin/list-cell";
 import AppAreaSel from "@/components/app-area-sel";
 import SimpleAddress from "@/components/plugin/simple-address";
-import BottomPopup from '@/components/plugin/bottom-popup'
-import AppClose from '@/components/module/app-close'
 import AppAvatarModule from "@/components/module/app-avatar";
 import AppUploader from "@/components/app-uploader";
 const form = require("@/utils/formValidation.js");
@@ -156,8 +133,6 @@ export default {
     TuiListCell,
     AppAreaSel,
     SimpleAddress,
-    BottomPopup,
-    AppClose,
     AppAvatarModule,
     AppUploader,
     htzImageUpload
@@ -187,8 +162,7 @@ export default {
       },
       cityPickerValueDefault: [0, 0],
       showRegion: false,
-      showNearbyPopup: false,
-      nearbyList: [],
+      addressInitialList: [],
       locating: false,
       hasMap: 0,
       adminName: "",
@@ -267,9 +241,6 @@ export default {
         requestLocation('gcj02')
       })
     },
-    closeNearbyPopup() {
-      this.showNearbyPopup = false
-    },
     modifyShow() {
       this.form.showAddress = (this.form.city || '') + (this.form.address || '') + (this.form.floor || '')
     },
@@ -289,18 +260,25 @@ export default {
       this.form.address = item.name || item.address || ''
       this.form.showAddress = item.showAddress || item.address || ''
       if (item.location) {
-        const parts = String(item.location).split(',').map(v => v.trim())
-        if (parts.length >= 2) {
-          this.form.longitude = parts[0]
-          this.form.latitude = parts[1]
+        let lng = ''
+        let lat = ''
+        if (typeof item.location === 'object') {
+          lng = item.location.lng || item.location.longitude || ''
+          lat = item.location.lat || item.location.latitude || ''
+        } else {
+          const parts = String(item.location).split(',').map(v => v.trim())
+          if (parts.length >= 2) {
+            lng = parts[0]
+            lat = parts[1]
+          }
+        }
+        if (lng && lat) {
+          this.form.longitude = lng
+          this.form.latitude = lat
         }
       }
       this.modifyShow()
     },
-    selectNearbyAddress(item) {
-      this.applyNearbyAddress(item)
-      this.closeNearbyPopup()
-    },
     async openNearbyAddress() {
       if (this.locating) {
         return false
@@ -319,8 +297,22 @@ export default {
           this.$msg('未获取到附近地址,请手动填写')
           return false
         }
-        this.nearbyList = res.data.list
-        this.showNearbyPopup = true
+        const list = res.data.list
+        const first = list[0]
+        if (first) {
+          if (first.province) {
+            this.form.province = first.province
+          }
+          if (first.city) {
+            this.form.city = first.city
+          }
+          if (first.district) {
+            this.form.dist = first.district
+          }
+          this.modifyShow()
+        }
+        this.addressInitialList = list
+        this.showRegion = true
         return true
       } catch (err) {
         console.log('openNearbyAddress fail', err)
@@ -401,6 +393,7 @@ export default {
     onCityConfirm (e) {
       this.form.province = e.provinceName;
       this.form.city = e.cityName;
+      this.addressInitialList = []
       this.modifyShow()
     },
     imgUploadSuccess(res) {
@@ -415,24 +408,13 @@ export default {
     },
     selectRegion() {
       if (!this.form.city) {
-        this.$msg('请先选择城市')
+        this.$msg('请先选择城市或点击定位图标')
         return false
       }
       this.showRegion = true
     },
     changeAreaFn(e) {
-      let locationStr = e.location
-      let fruits = locationStr.split(',').map(fruit => fruit.trim())
-
-      this.form.latitude = fruits[1]
-      this.form.longitude = fruits[0]
-      this.form.showAddress = e.address
-      this.form.address = e.name
-
-      const districtStr = e.district || ''
-      const cityIndex = districtStr.indexOf('市')
-      this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr
-      this.modifyShow()
+      this.applyNearbyAddress(e)
     },
     formSubmit (e) {
       let rules = [
@@ -661,62 +643,6 @@ export default {
   }
 }
 
-.nearby-popup-wrap {
-  ::v-deep .tui-popup-class {
-    border-top-left-radius: 20upx;
-    border-top-right-radius: 20upx;
-  }
-}
-
-.nearby-popup {
-  background: #fff;
-}
-
-.nearby-popup-head {
-  position: relative;
-  padding: 30upx 80upx 24upx;
-  text-align: center;
-}
-
-.nearby-popup-title {
-  color: #161819;
-  font-size: 34upx;
-  font-weight: 700;
-  line-height: 48upx;
-}
-
-.nearby-list {
-  max-height: 60vh;
-  padding: 0 24upx 40upx;
-  box-sizing: border-box;
-}
-
-.nearby-item {
-  padding: 24upx 8upx;
-  border-bottom: 1upx solid #f0f2f5;
-}
-
-.nearby-item-name {
-  color: #161819;
-  font-size: 30upx;
-  font-weight: 600;
-  line-height: 42upx;
-}
-
-.nearby-item-address {
-  margin-top: 8upx;
-  color: #8a9199;
-  font-size: 26upx;
-  line-height: 38upx;
-}
-
-.nearby-empty {
-  padding: 60upx 0;
-  text-align: center;
-  color: #8a9199;
-  font-size: 28upx;
-}
-
 .code-wrap {
   .tui-input--code {
     flex: 1;

+ 115 - 93
hdApp/src/components/app-area-sel.vue

@@ -3,26 +3,18 @@
 		<bottom-popup class="popup-wrap" :show="showPopup" @close="hidePopup">
 			<div class="map-wrap">
 				<div class="map-top-tit-wrap">
-					<div class="map-top-tit">搜索地址</div>
+					<div class="map-top-tit">选择地址</div>
+					<view v-if="city" class="map-city-tip">当前城市:{{ city }}</view>
 					<app-close icon="iconguanbi" @close="hidePopup" />
 				</div>
-				<!-- 搜索 -->
 				<div class="map-search">
 					<app-search-module ref="aaaaa" placeholder="请填写地址搜索" :focus="false" @input="searchFn"/>
-					<view style="width:100%;font-size:32upx;text-align:center;padding:10upx 0 15upx 0;color:green;font-weight:bold;">建议只搜索店名、建筑名、小区名、街道门牌号。例如:隆宇大厦、东昌小区、紫霞路70号</view>
+					<view class="search-hint">
+						<text class="search-hint-text">建议搜索:店名、建筑名、小区名、街道门牌号</text>
+						<text class="search-hint-example">例如:隆宇大厦、东昌小区、紫霞路70号</text>
+					</view>
 				</div>
-				<!-- 地图 -->
-				<!-- <div class="map-box">
-					<map id="myMap" style="width: 100%; height: 140upx;" :latitude="latitude" :longitude="longitude" @regionchange="mapChange">
-						<cover-image class="current-site-icon" src="../../static/images/common/localposition.png"></cover-image>
-						<cover-view class="reload" @click="reload">
-							<cover-view class="center1">
-								<cover-view class="center2"></cover-view>
-							</cover-view>
-						</cover-view>
-					</map>
-				</div>-->
-				<!-- 列表 -->
+				<view v-if="showNearbyTitle" class="near-section-title">附近地址</view>
 				<scroll-view class="near-list" scroll-y>
 					<view v-for="(item,index) in nearListData" :key="index" @click="switchAddress(item,index)" class="near-item">
 						<div class="current-site" :class="{'active' : currentSelectAddress === index}"></div>
@@ -31,6 +23,7 @@
 							<view class="add">{{item.address}}</view>
 						</view>
 					</view>
+					<view v-if="nearListData.length === 0 && !keyword" class="near-empty">暂无附近地址,请搜索选择</view>
 				</scroll-view>
 			</div>
 		</bottom-popup>
@@ -58,62 +51,101 @@
 			city: {
 				type: String,
 				default: ''
+			},
+			initialList: {
+				type: Array,
+				default: () => []
 			}
 		},
 		data() {
 			return {
 				showPopup: false,
 				keyword: '',
-				// 地图
-				// latitude: 24.44579,
-				// longitude: 118.08243,
-				// 列表
 				currentSelectAddress: null,
-				nearListData: [],
+				nearListData: []
+			}
+		},
+		computed: {
+			showNearbyTitle() {
+				return !this.keyword && this.initialList && this.initialList.length > 0
 			}
 		},
-		// onLoad(val) {
-		// 	this.mapCtx = uni.createMapContext('myMap')
-		// 	this.query = val
-		// 	this.reload()
-		// },
-
 		watch: {
 			show(val) {
 				this.showPopup = val
+				if (val) {
+					this.keyword = ''
+					this.$nextTick(() => {
+						if (this.$refs.aaaaa) {
+							this.$refs.aaaaa.search = ''
+						}
+						this.resetListFromInitial()
+					})
+				}
 				// #ifdef H5
-				this.$nextTick(function() {
-					setTimeout(() => {
-						this.$refs.aaaaa.$refs.searchInput._focusInput()
-					}, 1000)
-				})
+				if (val) {
+					this.$nextTick(function() {
+						setTimeout(() => {
+							if (this.$refs.aaaaa && this.$refs.aaaaa.$refs.searchInput) {
+								this.$refs.aaaaa.$refs.searchInput._focusInput()
+							}
+						}, 1000)
+					})
+				}
 				// #endif
 			},
 			city() {
-				this.nearListData = []
-				this.$refs.aaaaa.search = ''
+				this.keyword = ''
+				if (this.$refs.aaaaa) {
+					this.$refs.aaaaa.search = ''
+				}
+				this.resetListFromInitial()
+			},
+			initialList: {
+				handler() {
+					if (!this.keyword) {
+						this.resetListFromInitial()
+					}
+				},
+				deep: true
 			}
 		},
 		methods: {
+			resetListFromInitial() {
+				this.currentSelectAddress = null
+				this.nearListData = this.initialList && this.initialList.length ? [...this.initialList] : []
+			},
 			getAreaList() {
 				if (!this.keyword) {
+					this.resetListFromInitial()
+					return false
+				}
+				if (!this.city) {
+					uni.showToast({
+						title: '请先选择城市',
+						icon: 'none',
+						duration: 1800
+					})
 					return false
 				}
 				suggestion({ region: this.city, keyword: this.keyword }).then(res => {
-					this.nearListData = res.data.tips ? res.data.tips : []
+					let dataList = []
+					if (res && res.data) {
+						dataList = res.data.tips ? res.data.tips : []
+					}
+					this.nearListData = dataList
+					if (this.nearListData.length === 0) {
+						uni.showToast({
+							title: '未找到相关地址',
+							icon: 'none',
+							duration: 1800
+						})
+					}
 				})
 			},
-			// 搜索
 			searchFn(e) {
 				this.keyword = e
 				this.getAreaList()
-				// this.$emit('search', e)
-				// uni.reverseGeocode({
-				// 	latitude: 25.661333498914413,
-				// 	longitude: 117.5537109375
-				// }, (e) => {
-				// 	console.log(e)
-				// })
 			},
 			hidePopup() {
 				this.$emit('update:show', false)
@@ -121,58 +153,9 @@
 			},
 			switchAddress(item, index) {
 				this.currentSelectAddress = index
-				// this.latitude = item.location.lat
-				// this.longitude = item.location.lng
-				// if (!this.$util.isEmpty(item.province) && !this.$util.isEmpty(item.city)) {
-				// 	this.currentRegion = [item.province, item.city, item.district]
-				// }
 				this.$emit('change', item)
 				this.hidePopup()
 			}
-			// 地图操作
-			// reload() {
-			// 	uni.getLocation({
-			// 		type: 'wgs84',
-			// 		success: res => {
-			// 			this.latitude = res.latitude
-			// 			this.longitude = res.longitude
-			// 			// this.nearList()
-			// 		},
-			// 		// eslint-disable-next-line handle-callback-err
-			// 		fail: err => {
-			// 			this.$msg('定位失败')
-			// 			// setTimeout(function() {
-			// 			// 	uni.navigateBack({
-			// 			// 		delta: 1
-			// 			// 	})
-			// 			// }, 1500)
-			// 		}
-			// 	})
-			// },
-			// mapChange(e) {
-			// 	if (e.type == 'end' && (e.causedBy == 'scale' || e.causedBy == 'drag')) {
-			// 		this.mapCtx.getCenterLocation({
-			// 			success: res => {
-			// 				this.longitude = res.longitude
-			// 				this.latitude = res.latitude
-			// 				// this.nearList()
-			// 			}
-			// 		})
-			// 	}
-			// },
-			// 获取列表
-			// nearList() {
-			// 	geocoder({
-			// 		latitude: this.latitude,
-			// 		longitude: this.longitude
-			// 	}).then(res => {
-			// 		console.log(res)
-			// 		let data = res.result
-			// 		this.currentSelectAddress = 0
-			// 		this.nearListData = data.pois
-			// 		// this.currentRegion = [data.address_component.province, data.address_component.city, data.address_component.district]
-			// 	})
-			// },
 		}
 	}
 </script>
@@ -187,14 +170,48 @@
 	}
 	.map-wrap {
 		.map-top-tit-wrap {
-			padding: 30upx 0;
+			padding: 30upx 0 20upx;
 			text-align: center;
 			font-size: 34upx;
+			position: relative;
+		}
+		.map-city-tip {
+			margin-top: 8upx;
+			color: $fontColor3;
+			font-size: 26upx;
+			line-height: 36upx;
 		}
 		.map-search {
 			padding: 0 30upx;
 			margin-bottom: 20upx;
 		}
+		.search-hint {
+			margin-top: 16upx;
+			padding: 16upx 20upx;
+			border-radius: 12upx;
+			background: #f0faf5;
+			border: 1upx solid #d4eddf;
+		}
+		.search-hint-text {
+			display: block;
+			color: #3d8b6e;
+			font-size: 30upx;
+			font-weight: 600;
+			line-height: 44upx;
+		}
+		.search-hint-example {
+			display: block;
+			margin-top: 6upx;
+			color: #8a9199;
+			font-size: 30upx;
+			line-height: 40upx;
+		}
+		.near-section-title {
+			padding: 0 30upx 12upx;
+			color: $fontColor3;
+			font-size: 26upx;
+			line-height: 36upx;
+		}
 		.map-box {
 			.current-site-icon {
 				width: 63upx;
@@ -209,7 +226,6 @@
 		// 列表
 		.near-list {
 			height: 820upx;
-			// padding-bottom: 110upx;
 			box-sizing: border-box;
 			.near-item {
 				line-height: 40upx;
@@ -251,6 +267,12 @@
 			.near-item .add1 {
 				color: $mainColor;
 			}
+			.near-empty {
+				padding: 40upx 30upx;
+				text-align: center;
+				color: $fontColor3;
+				font-size: 28upx;
+			}
 		}
 	}
 </style>

+ 39 - 110
hdApp/src/pagesClient/official/apply.vue

@@ -119,28 +119,7 @@
       </view>
 
       <simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
-      <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
-
-      <bottom-popup class="nearby-popup-wrap" :show="showNearbyPopup" @close="closeNearbyPopup">
-        <view class="nearby-popup">
-          <view class="nearby-popup-head">
-            <text class="nearby-popup-title">选择附近地址</text>
-            <app-close icon="iconguanbi" @close="closeNearbyPopup" />
-          </view>
-          <scroll-view class="nearby-list" scroll-y>
-            <view
-              v-for="(item, index) in nearbyList"
-              :key="index"
-              class="nearby-item"
-              @click="selectNearbyAddress(item)"
-            >
-              <view class="nearby-item-name">{{ item.name }}</view>
-              <view class="nearby-item-address">{{ item.address }}</view>
-            </view>
-            <view v-if="nearbyList.length === 0" class="nearby-empty">暂无附近地址,请手动填写</view>
-          </scroll-view>
-        </view>
-      </bottom-popup>
+      <app-area-sel :show.sync="showRegion" :city="form.city" :initial-list="addressInitialList" @change="changeAreaFn" />
     </form>
   </view>
 </template>
@@ -149,8 +128,6 @@
 import TuiListCell from "@/components/plugin/list-cell";
 import AppAreaSel from "@/components/app-area-sel";
 import SimpleAddress from "@/components/plugin/simple-address";
-import BottomPopup from '@/components/plugin/bottom-popup'
-import AppClose from '@/components/module/app-close'
 import AppAvatarModule from "@/components/module/app-avatar";
 import AppUploader from "@/components/app-uploader";
 const form = require("@/utils/formValidation.js");
@@ -177,8 +154,6 @@ export default {
     TuiListCell,
     AppAreaSel,
     SimpleAddress,
-    BottomPopup,
-    AppClose,
     AppAvatarModule,
     AppUploader,
     htzImageUpload
@@ -207,8 +182,7 @@ export default {
       },
       cityPickerValueDefault: [0, 0],
       showRegion: false,
-      showNearbyPopup: false,
-      nearbyList: [],
+      addressInitialList: [],
       locating: false,
       hasMap: 0,
       adminName: "",
@@ -308,9 +282,9 @@ export default {
         requestLocation('gcj02')
       })
     },
-    closeNearbyPopup() {
-      this.showNearbyPopup = false
-    },
+    modifyShow(){
+			this.form.showAddress = this.form.city + this.form.address + this.form.floor
+		},
     applyNearbyAddress(item) {
       if (!item) {
         return false
@@ -327,18 +301,25 @@ export default {
       this.form.address = item.name || item.address || ''
       this.form.showAddress = item.showAddress || item.address || ''
       if (item.location) {
-        const parts = String(item.location).split(',').map(v => v.trim())
-        if (parts.length >= 2) {
-          this.form.longitude = parts[0]
-          this.form.latitude = parts[1]
+        let lng = ''
+        let lat = ''
+        if (typeof item.location === 'object') {
+          lng = item.location.lng || item.location.longitude || ''
+          lat = item.location.lat || item.location.latitude || ''
+        } else {
+          const parts = String(item.location).split(',').map(v => v.trim())
+          if (parts.length >= 2) {
+            lng = parts[0]
+            lat = parts[1]
+          }
+        }
+        if (lng && lat) {
+          this.form.longitude = lng
+          this.form.latitude = lat
         }
       }
       this.modifyShow()
     },
-    selectNearbyAddress(item) {
-      this.applyNearbyAddress(item)
-      this.closeNearbyPopup()
-    },
     async openNearbyAddress() {
       if (this.locating) {
         return false
@@ -357,8 +338,22 @@ export default {
           this.$msg('未获取到附近地址,请手动填写')
           return false
         }
-        this.nearbyList = res.data.list
-        this.showNearbyPopup = true
+        const list = res.data.list
+        const first = list[0]
+        if (first) {
+          if (first.province) {
+            this.form.province = first.province
+          }
+          if (first.city) {
+            this.form.city = first.city
+          }
+          if (first.district) {
+            this.form.dist = first.district
+          }
+          this.modifyShow()
+        }
+        this.addressInitialList = list
+        this.showRegion = true
         return true
       } catch (err) {
         console.log('openNearbyAddress fail', err)
@@ -471,6 +466,7 @@ export default {
     onCityConfirm (e) {
       this.form.province = e.provinceName;
       this.form.city = e.cityName;
+      this.addressInitialList = []
       this.modifyShow()
     },
     imgUploadSuccess(res) {
@@ -485,24 +481,13 @@ export default {
     },
     selectRegion() {
       if (!this.form.city) {
-        this.$msg('请先选择城市')
+        this.$msg('请先选择城市或点击定位图标')
         return false
       }
       this.showRegion = true
     },
     changeAreaFn(e) {
-      let locationStr = e.location
-      let fruits = locationStr.split(',').map(fruit => fruit.trim())
-
-      this.form.latitude = fruits[1]
-      this.form.longitude = fruits[0]
-      this.form.showAddress = e.address
-      this.form.address = e.name
-
-      const districtStr = e.district || ''
-      const cityIndex = districtStr.indexOf('市')
-      this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr
-      this.modifyShow()
+      this.applyNearbyAddress(e)
     },
     modifyShow(){
 			this.form.showAddress = this.form.city + this.form.address + this.form.floor
@@ -725,62 +710,6 @@ export default {
   }
 }
 
-.nearby-popup-wrap {
-  ::v-deep .tui-popup-class {
-    border-top-left-radius: 20upx;
-    border-top-right-radius: 20upx;
-  }
-}
-
-.nearby-popup {
-  background: #fff;
-}
-
-.nearby-popup-head {
-  position: relative;
-  padding: 30upx 80upx 24upx;
-  text-align: center;
-}
-
-.nearby-popup-title {
-  color: #161819;
-  font-size: 34upx;
-  font-weight: 700;
-  line-height: 48upx;
-}
-
-.nearby-list {
-  max-height: 60vh;
-  padding: 0 24upx 40upx;
-  box-sizing: border-box;
-}
-
-.nearby-item {
-  padding: 24upx 8upx;
-  border-bottom: 1upx solid #f0f2f1;
-}
-
-.nearby-item-name {
-  color: #161819;
-  font-size: 30upx;
-  font-weight: 600;
-  line-height: 42upx;
-}
-
-.nearby-item-address {
-  margin-top: 8upx;
-  color: #8a9199;
-  font-size: 26upx;
-  line-height: 38upx;
-}
-
-.nearby-empty {
-  padding: 60upx 0;
-  text-align: center;
-  color: #8a9199;
-  font-size: 28upx;
-}
-
 .line-cell {
   .tui-title {
     width: 180upx;