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 => { ...@@ -38,7 +38,9 @@ export default props => {
geocoder.getLocation(addrInfo.address, (status, result) => { geocoder.getLocation(addrInfo.address, (status, result) => {
if (status === 'complete' && result.geocodes.length) { if (status === 'complete' && result.geocodes.length) {
const { lng, lat } = result.geocodes[0].location; const { lng, lat } = result.geocodes[0].location;
console.log(result.geocodes[0].location);
setLnglat([lng, lat]); setLnglat([lng, lat]);
setLnglatText(`${lng},${lat}`);
} else { } else {
console.error('根据地址查询位置失败'); console.error('根据地址查询位置失败');
// setLnglat([116.397561,39.909063]) // setLnglat([116.397561,39.909063])
......
...@@ -81,6 +81,12 @@ const StoreModal = props => { ...@@ -81,6 +81,12 @@ const StoreModal = props => {
const values = getFieldsValue(); const values = getFieldsValue();
let provice = '北京市'; let provice = '北京市';
if (!values.addr) { if (!values.addr) {
notification.warning({ message: '请先选择店铺区域' });
return;
}
if (!values.address) {
notification.warning({ message: '请先填写完整的详细地址' });
return; return;
} }
if (values.addr.length > 0) { if (values.addr.length > 0) {
...@@ -280,7 +286,7 @@ const StoreModal = props => { ...@@ -280,7 +286,7 @@ const StoreModal = props => {
{getFieldDecorator('address', { {getFieldDecorator('address', {
rules: [{ required: true, message: '请输入详细地址!' }], rules: [{ required: true, message: '请输入详细地址!' }],
initialValue: formData.address, initialValue: formData.address,
})(<Input placeholder="请输入详细地址" allowClear maxLength={100} />)} })(<Input placeholder="请输入详细地址" allowClear maxLength={50} />)}
</FormItem> </FormItem>
<FormItem label="经纬度"> <FormItem label="经纬度">
{getFieldDecorator('lnglat', { {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