master_basic
鲁誉程 1 year ago
parent e0e3e7a9e7
commit 5b474e4bb8

@ -45,17 +45,34 @@ export default function IndexPage() {
const onFinish = async (data: any) => {
setLoading(true)
await getPlugCordResult(data).then(res => {
message.info("Res",res);
if (res?.result == 'success' && res?.data[0]?.data) {
setIsAuth(true)
localStorage.setItem('is_auth', JSON.stringify(true));
message.success("系统连接检测成功!")
} else if (!res?.data[0]?.data) {
message.error("系统连接检测失败!")
}
fetch('http://127.0.0.1:8088/xgd/pcd/getPlugCordResult', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
.then(response => {
if (response.ok) {
message.info("接口调通!");
} else {
message.warning("接口无法访问,状态码:" + response.status);
}
})
.catch(function(error) {
message.error("发生错误:", error);
});
// await getPlugCordResult(data).then(res => {
// message.info("Res",res);
// if (res?.result == 'success' && res?.data[0]?.data) {
// setIsAuth(true)
// localStorage.setItem('is_auth', JSON.stringify(true));
// message.success("系统连接检测成功!")
// } else if (!res?.data[0]?.data) {
// message.error("系统连接检测失败!")
// }
// })
setLoading(false)
};

@ -1,6 +1,6 @@
export const DEV = {
PROXY_SERVER: 'http://localhost:8088',
// PROXY_SERVER: 'http://127.0.0.1:8088',
// PROXY_SERVER: 'http://localhost:8088',
PROXY_SERVER: 'http://127.0.0.1:8088',
};
export default DEV;

Loading…
Cancel
Save