Просмотр исходного кода

修改添加门店选择城市的一些问题

wangn 5 лет назад
Родитель
Сommit
c5af347d76

+ 2 - 0
hdApp/src/admin/shop/add.vue

@@ -161,6 +161,8 @@
 				this.form.province = e.provinceName
 				this.form.city = e.cityName
         this.form.address = ''
+        this.region.lat = 0
+				this.region.long = 0
 				// this.pickerText = JSON.stringify(e)
 			},
 			confirmFn() {

+ 7 - 11
hdApp/src/components/app-area-sel.vue

@@ -8,7 +8,7 @@
 				</div>
 				<!-- 搜索 -->
 				<div class="map-search">
-					<app-search-module ref="aaaaa" placeholder="请输入你的收货地址" :focus="false" @input="searchFn" />
+					<app-search-module ref="aaaaa" placeholder="请输入你的收货地址" :focus="false" @input="searchFn"/>
 				</div>
 				<!-- 地图 -->
 				<!-- <div class="map-box">
@@ -68,7 +68,7 @@
 				// longitude: 118.08243,
 				// 列表
 				currentSelectAddress: null,
-				nearListData: []
+				nearListData: [],
 			}
 		},
 		// onLoad(val) {
@@ -80,10 +80,6 @@
 		watch: {
 			show(val) {
 				this.showPopup = val
-        if(val){
-          this.keyword = ''
-          this.nearListData = []
-        }
 				// #ifdef H5
 				this.$nextTick(function() {
 					setTimeout(() => {
@@ -91,11 +87,11 @@
 					}, 1000)
 				})
 				// #endif
-
-				// if (val) {
-				// 	this.getAreaList()
-				// }
-			}
+			},
+      city() {
+        this.nearListData = []
+        this.$refs.aaaaa.search = ''
+      }
 		},
 		methods: {
 			getAreaList() {

+ 1 - 1
hdApp/src/components/module/app-search.vue

@@ -92,7 +92,7 @@ export default {
 		focus: {
 			type: Boolean,
 			default: false
-		}
+		},
 	},
 	data() {
 		return {