Commit a1f272a9 authored by 涂伟's avatar 涂伟

fix: '集成登录网站配置图片上传逻辑优化'

parent 3614667c
Pipeline #74166 passed with stages
......@@ -62,6 +62,7 @@ const Master = props => {
const [radio, setRadio] = useState();
const [flag, setFlag] = useState(0);
const [keepSettings, setKeepSettings] = useState([]);
const [isFromLocal, setIsFromLocal] = useState(false);
useEffect(() => {
if (visible) {
......@@ -164,6 +165,13 @@ const Master = props => {
message.error('请选择登录Logo!');
return;
}
if (!isFromLocal) {
if (obj.logo.includes('CityTemp') && obj.logo.includes('图库')) {
obj.logo = obj.logo;
} else {
obj.logo = 'CityTemp\\图库\\' + obj.logo;
}
}
AddIntegratedloginSetting({
logo: obj.logo,
primaryColor: obj.primaryColor,
......@@ -235,6 +243,7 @@ const Master = props => {
}
if (info.file.response.code === 0) {
setIsFromLocal(false);
setImageUrl(getImg(info.file.response.data));
setLoading(false);
} else {
......@@ -286,6 +295,7 @@ const Master = props => {
setIm(props.path);
setKeepImgeUrl(props.path);
form.setFieldsValue({ logo: `${props.path}` });
setIsFromLocal(true);
}
};
......
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