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 -->
|
<!-- #ifndef APP-NVUE -->
|
||||||
<u-input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
<u-input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||||
<template slot="suffix">
|
<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>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef APP-NVUE -->
|
<!-- #ifdef APP-NVUE -->
|
||||||
<u--input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
<u--input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||||
<template slot="suffix">
|
<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>
|
</template>
|
||||||
</u--input>
|
</u--input>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="地点" borderBottom>
|
<u-form-item label="街道社区" borderBottom @click="toMap">
|
||||||
<!-- 注意:由于兼容性差异,如果需要使用前后插槽,nvue下需使用u--input,非nvue下需使用u-input -->
|
<!-- 注意:由于兼容性差异,如果需要使用前后插槽,nvue下需使用u--input,非nvue下需使用u-input -->
|
||||||
<!-- #ifndef APP-NVUE -->
|
<!-- #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 -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef APP-NVUE -->
|
<!-- #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 -->
|
<!-- #endif -->
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
@@ -161,23 +165,23 @@
|
|||||||
this.form.street = location.name;
|
this.form.street = location.name;
|
||||||
this.form.address = location.address;
|
this.form.address = location.address;
|
||||||
|
|
||||||
let postData = {
|
//let postData = {
|
||||||
countyName: location.district,
|
// countyName: location.district,
|
||||||
cityName: location.city,
|
// cityName: location.city,
|
||||||
provinceName: location.province,
|
// provinceName: location.province,
|
||||||
}
|
//}
|
||||||
this.$u.api.getAreaIdByName(postData).then(res => {
|
//this.$u.api.getAreaIdByName(postData).then(res => {
|
||||||
if (res.status) {
|
// if (res.status) {
|
||||||
this.areaId = res.data.areaId;
|
// this.areaId = res.data.areaId;
|
||||||
this.pickerValue = res.data.fullName;
|
// this.pickerValue = res.data.fullName;
|
||||||
} else {
|
// } else {
|
||||||
uni.showModal({
|
// uni.showModal({
|
||||||
title: '提示',
|
// title: '提示',
|
||||||
content: '地区选择出现问题,请重新选择地区',
|
// content: '地区选择出现问题,请重新选择地区',
|
||||||
showCancel: false
|
// showCancel: false
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
console.log("location1:", location);
|
console.log("location1:", location);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user