|
|
|
@ -46,11 +46,11 @@ export default function IndexPage() {
|
|
|
|
|
const onFinish = async (data: any) => {
|
|
|
|
|
setLoading(true)
|
|
|
|
|
await getPlugCordResult(data).then(res => {
|
|
|
|
|
if (res?.result == 'success' && res?.data[0]?.data) {
|
|
|
|
|
if (res?.result == 'success' && JSON.parse(res?.data[0]).data) {
|
|
|
|
|
setIsAuth(true)
|
|
|
|
|
localStorage.setItem('is_auth', JSON.stringify(true));
|
|
|
|
|
message.success("系统连接检测成功!")
|
|
|
|
|
} else if (!res?.data[0]?.data) {
|
|
|
|
|
} else if (!JSON.parse(res?.data[0]).data) {
|
|
|
|
|
message.error("系统连接检测失败!")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|