Commit bdf9bd9d authored by 皮倩雯's avatar 皮倩雯

fix: '集成登录地区选择优化'

parent 5be3b9d8
Pipeline #57221 waiting for manual action with stages
......@@ -106,6 +106,7 @@ const AddModal = props => {
let list = [];
let listSecord = [];
let fff = 0;
res.data.mapSettings.map(i => {
list.push(i[0]);
if (i[1]) {
......@@ -114,7 +115,9 @@ const AddModal = props => {
});
console.log(list);
console.log(listSecord);
if (list.indexOf('100000') != -1) {
fff = 1;
}
setShow(1);
// 获取城市选择器列表
window.AMap.plugin('AMap.DistrictSearch', () => {
......@@ -158,6 +161,8 @@ const AddModal = props => {
});
}
});
console.log(fff);
if (fff == 0) {
data.map(i => {
let aa = [];
i.districtList.map(j => {
......@@ -169,6 +174,11 @@ const AddModal = props => {
});
console.log(result.districtList[0].districtList);
setOptionsList(data);
} else {
console.log(result.districtList[0].districtList);
setOptionsList(result.districtList[0].districtList);
}
if (type == 'edit') {
form.setFieldsValue({
mapSetting: pickItem.MapSetting,
......@@ -384,12 +394,8 @@ const AddModal = props => {
];
const onChangeField = (value, selectedOptions) => {
console.log(value);
console.log(value[value.length - 1]);
let aa = value[value.length - 1].split(',');
form.setFieldsValue({ coordinate1: aa[0], coordinate2: aa[1] });
console.log(aa);
console.log(selectedOptions);
};
return (
<Modal
......
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