Commit e2eb48fd authored by 李腾's avatar 李腾

Merge branch 'fix/StoreManageMap20221009' into 'master'

Fix/store manage map20221009

See merge request !60
parents 08f4062b ca00e538
......@@ -38,7 +38,9 @@ export default props => {
geocoder.getLocation(addrInfo.address, (status, result) => {
if (status === 'complete' && result.geocodes.length) {
const { lng, lat } = result.geocodes[0].location;
console.log(result.geocodes[0].location);
setLnglat([lng, lat]);
setLnglatText(`${lng},${lat}`);
} else {
console.error('根据地址查询位置失败');
// setLnglat([116.397561,39.909063])
......
......@@ -81,6 +81,12 @@ const StoreModal = props => {
const values = getFieldsValue();
let provice = '北京市';
if (!values.addr) {
notification.warning({ message: '请先选择店铺区域' });
return;
}
if (!values.address) {
notification.warning({ message: '请先填写完整的详细地址' });
return;
}
if (values.addr.length > 0) {
......@@ -280,7 +286,7 @@ const StoreModal = props => {
{getFieldDecorator('address', {
rules: [{ required: true, message: '请输入详细地址!' }],
initialValue: formData.address,
})(<Input placeholder="请输入详细地址" allowClear maxLength={100} />)}
})(<Input placeholder="请输入详细地址" allowClear maxLength={50} />)}
</FormItem>
<FormItem label="经纬度">
{getFieldDecorator('lnglat', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment