Commit c39954a9 authored by 涂伟's avatar 涂伟

fix: '集成登录图片校验逻辑优化'

parent 0df988bc
Pipeline #72440 passed with stages
......@@ -280,6 +280,10 @@ const AddModal = props => {
});
}
console.log(obj.isMaster);
if (!obj.iconUrl) {
message.error('请选择图标!');
return;
}
if (type === 'add') {
AddIntegratedLogin({
systemName: obj.systemName,
......@@ -426,9 +430,16 @@ const AddModal = props => {
// setImageUrl(reader.result);
// };
// });
setImageUrl(getImg(info.file.response.data));
if (info.file.response.code === 0) {
setImageUrl(getImg(info.file.response.data));
setLoading(false);
} else {
message.error(info.file.response.msg);
setImageUrl('');
setLoading(false);
}
// getBase64(info.file.originFileObj, url => {
// setLoading(false);
// setLoading(false);
// setImageUrl(url);
// });
}
......
......@@ -160,6 +160,10 @@ const Master = props => {
}
console.log(obj.qrCodename || obj.qrCodeurl);
if (validate) {
if (!obj.logo) {
message.error('请选择登录Logo!');
return;
}
AddIntegratedloginSetting({
logo: obj.logo,
primaryColor: obj.primaryColor,
......@@ -230,7 +234,14 @@ const Master = props => {
return;
}
setImageUrl(getImg(info.file.response.data));
if (info.file.response.code === 0) {
setImageUrl(getImg(info.file.response.data));
setLoading(false);
} else {
message.error(info.file.response.msg);
setImageUrl('');
setLoading(false);
}
// if (info.file.status === 'done') {
// DownLoadFiles({ module: '图库\\第三方图标', filePath: info.file.response.data }).then(res => {
......@@ -240,10 +251,10 @@ const Master = props => {
// setImageUrl(reader.result);
// };
// });
// getBase64(info.file.originFileObj, url => {
// setLoading(false);
// setImageUrl(url);
// });
// getBase64(info.file.originFileObj, url => {
// setLoading(false);
// setImageUrl(url);
// });
};
const getBase64 = (img, callback) => {
......
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