Kaynağa Gözat

添加门店新增经纬度、修改详细地址字段

jf 5 yıl önce
ebeveyn
işleme
949a994f05

+ 2 - 1
ghsApp/src/admin/shop/add.vue

@@ -146,7 +146,7 @@
 			},
 			},
 			changeAreaFn(e) {
 			changeAreaFn(e) {
 				console.log('changeAreaFn', e)
 				console.log('changeAreaFn', e)
-				this.form.address = e.address
+				this.form.address = e.title
 				this.region.lat = e.location.lat
 				this.region.lat = e.location.lat
 				this.region.long = e.location.lng
 				this.region.long = e.location.lng
 			},
 			},
@@ -168,6 +168,7 @@
 				if (this.option.id) {
 				if (this.option.id) {
 					this.form.id = this.option.id
 					this.form.id = this.option.id
 				}
 				}
+				this.form = {...this.form,...this.region}
 				hostFn(this.form).then(res => {
 				hostFn(this.form).then(res => {
 					this.setUserShopAll();
 					this.setUserShopAll();
 					let promptText = this.option.id ? '修改成功!' : '添加成功!'
 					let promptText = this.option.id ? '修改成功!' : '添加成功!'

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

@@ -148,7 +148,7 @@
       },
       },
 			changeAreaFn(e) {
 			changeAreaFn(e) {
 				console.log('changeAreaFn', e)
 				console.log('changeAreaFn', e)
-				this.form.address = e.address
+				this.form.address = e.title
 				this.region.lat = e.location.lat
 				this.region.lat = e.location.lat
 				this.region.long = e.location.lng
 				this.region.long = e.location.lng
 			},
 			},
@@ -170,6 +170,7 @@
 				if (this.option.id) {
 				if (this.option.id) {
 					this.form.id = this.option.id
 					this.form.id = this.option.id
 				}
 				}
+				this.form = {...this.form,...this.region}
 				hostFn(this.form).then(res => {
 				hostFn(this.form).then(res => {
           this.setUserShopAll();
           this.setUserShopAll();
 					let promptText = this.option.id ? '修改成功!' : '添加成功!'
 					let promptText = this.option.id ? '修改成功!' : '添加成功!'