|
|
@ -753,31 +753,37 @@ |
|
|
|
// type: 'wgs84', |
|
|
|
success: function (res) { |
|
|
|
|
|
|
|
console.log('当前位置的经度:' + res.longitude); |
|
|
|
console.log('当前位置的经度:', res); |
|
|
|
console.log('当前位置的纬度:' + res.latitude); |
|
|
|
const qqmapsdk = new QQMapWX({ |
|
|
|
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填 |
|
|
|
}); |
|
|
|
uni.showLoading({ |
|
|
|
title:"获取中...." |
|
|
|
}) |
|
|
|
qqmapsdk.reverseGeocoder({ |
|
|
|
location: { |
|
|
|
latitude: res.latitude, |
|
|
|
longitude: res.longitude |
|
|
|
}, |
|
|
|
success: function(response) { |
|
|
|
console.log('逆地理编码结果:', response); |
|
|
|
uni.hideLoading() |
|
|
|
that.form.longitude = response.result.location.lng |
|
|
|
that.form.latitude = response.result.location.lat |
|
|
|
that.form.address = response.result.address |
|
|
|
}, |
|
|
|
fail: function(error) { |
|
|
|
uni.hideLoading() |
|
|
|
console.error('逆地理编码失败:', error); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
that.form.longitude = res.longitude |
|
|
|
that.form.latitude = res.latitude |
|
|
|
that.form.address = res.address |
|
|
|
|
|
|
|
// const qqmapsdk = new QQMapWX({ |
|
|
|
// key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填 |
|
|
|
// }); |
|
|
|
// uni.showLoading({ |
|
|
|
// title:"获取中...." |
|
|
|
// }) |
|
|
|
// qqmapsdk.reverseGeocoder({ |
|
|
|
// location: { |
|
|
|
// latitude: res.latitude, |
|
|
|
// longitude: res.longitude |
|
|
|
// }, |
|
|
|
// success: function(response) { |
|
|
|
// console.log('逆地理编码结果:', response); |
|
|
|
// uni.hideLoading() |
|
|
|
// that.form.longitude = response.result.location.lng |
|
|
|
// that.form.latitude = response.result.location.lat |
|
|
|
// that.form.address = response.result.address |
|
|
|
// }, |
|
|
|
// fail: function(error) { |
|
|
|
// uni.hideLoading() |
|
|
|
// console.error('逆地理编码失败:', error); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.$refs.citySelectRef.open() |
|
|
@ -815,6 +821,7 @@ |
|
|
|
// remark:"" |
|
|
|
let that = this |
|
|
|
that.$refs.form.validate().then(res => { |
|
|
|
|
|
|
|
let params={ |
|
|
|
userId:"", |
|
|
|
id:that.form.id, |
|
|
@ -864,6 +871,17 @@ |
|
|
|
latitude:that.form.latitude, |
|
|
|
longitude:that.form.longitude |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.$utils.verificationAll(params, { |
|
|
|
image : '请上传房屋照片', |
|
|
|
homeImage : '产权证照片', |
|
|
|
address : '请选择房屋位置', |
|
|
|
})){ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// console.info(JSON.stringify(params)) |
|
|
|
// params = {"userId":"","classId":"1860389382874828802","commonClass":"1860387853019222017","address":"湖南省岳阳市湘阴县芙蓉北路","homeAge":"66666","homeAz":"1","homeBian":"11","homeBjsx":"11","homeCai":"11","homeCat":"11","homeGz":"1","homeHb":"11","homeBz":"aaaa","homeJg":"22","homeJl":"11","homeJt":"22","homeJtzy":"11","homeMi":"22","homeMj":"22","homeMoney":"11","homeNo":"11","homeNum":2,"homePay":"11","homePj":"11","homeSd":"11","homeShjl":"11","homeSw":"11","homeTf":"11","homeTime":"11","homeType":"666666","homeYs":"1","homeYzmj":"11","homeZy":"11","iconName":"","iconTitle":"11","num":"11","price":"6666","timeGo":"11","title":"66666","unit":"11","image":"https://tennis-oss.xzaiyp.top/2024-12-07/950752cc-2a22-4296-a8fa-f3c5718a60a1.png,https://tennis-oss.xzaiyp.top/2024-12-07/803308f0-06e1-482a-836c-2b500c281fdc.png","iconImage":"","homeImage":"https://tennis-oss.xzaiyp.top/2024-12-07/8e7e321d-8bf5-43d9-a9ff-de849d4d60fd.png,https://tennis-oss.xzaiyp.top/2024-12-07/024dbfc1-29ba-4dbe-8554-1d19feff220b.png","homeMp4":"https://tennis-oss.xzaiyp.top/2024-12-07/b9ebc286-b293-4ec0-8e1c-205cd1ea94b5.mp4","latitude":28.689608,"longitude":112.911421} |
|
|
|
saveOrUpdateHouse(params).then(response=>{ |
|
|
|