mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 20:03:26 +08:00
【优化】因系统地址库存在与腾讯小程序地图返回数据有差异,导致省市县反向解析获取失败,将省市县重置为下拉选取,地图保留作为获取精确坐标及地址详情的触发。
This commit is contained in:
@@ -25,26 +25,30 @@
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<u-input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||
<template slot="suffix">
|
||||
<u-button text="请选择" type="success" size="mini" @click="toMap"></u-button>
|
||||
<!--<u-button text="请选择" type="success" size="mini" @click="toMap"></u-button>-->
|
||||
<u-button text="请选择" type="success" size="mini" @click="show = true"></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<u--input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||
<template slot="suffix">
|
||||
<u-button text="请选择" type="success" size="mini" @click="toMap"></u-button>
|
||||
<!--<u-button text="请选择" type="success" size="mini" @click="toMap"></u-button>-->
|
||||
<u-button text="请选择" type="success" size="mini" @click="show = true"></u-button>
|
||||
</template>
|
||||
</u--input>
|
||||
<!-- #endif -->
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="地点" borderBottom>
|
||||
<u-form-item label="街道社区" borderBottom @click="toMap">
|
||||
<!-- 注意:由于兼容性差异,如果需要使用前后插槽,nvue下需使用u--input,非nvue下需使用u-input -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<u-input :value="form.street" type="text" disabled placeholder="请选择"></u-input>
|
||||
<u-input :value="form.street" type="text" disabled placeholder="请定位">
|
||||
</u-input>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<u--input :value="form.street" type="text" disabled placeholder="请选择"></u--input>
|
||||
<u--input :value="form.street" type="text" disabled placeholder="请定位">
|
||||
</u--input>
|
||||
<!-- #endif -->
|
||||
</u-form-item>
|
||||
|
||||
@@ -161,23 +165,23 @@
|
||||
this.form.street = location.name;
|
||||
this.form.address = location.address;
|
||||
|
||||
let postData = {
|
||||
countyName: location.district,
|
||||
cityName: location.city,
|
||||
provinceName: location.province,
|
||||
}
|
||||
this.$u.api.getAreaIdByName(postData).then(res => {
|
||||
if (res.status) {
|
||||
this.areaId = res.data.areaId;
|
||||
this.pickerValue = res.data.fullName;
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '地区选择出现问题,请重新选择地区',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
//let postData = {
|
||||
// countyName: location.district,
|
||||
// cityName: location.city,
|
||||
// provinceName: location.province,
|
||||
//}
|
||||
//this.$u.api.getAreaIdByName(postData).then(res => {
|
||||
// if (res.status) {
|
||||
// this.areaId = res.data.areaId;
|
||||
// this.pickerValue = res.data.fullName;
|
||||
// } else {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '地区选择出现问题,请重新选择地区',
|
||||
// showCancel: false
|
||||
// });
|
||||
// }
|
||||
//});
|
||||
console.log("location1:", location);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user