master_basic
鲁誉程 1 year ago
parent c251f909e5
commit d4297fa686

@ -46,8 +46,6 @@ 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));

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

@ -47,11 +47,10 @@ export function postRequest(url: string, data: object) {
body: JSON.stringify(data),
})
.then(response => {
message.info('response',url,response)
if (!response.ok) { throw new Error('请求失败'); }
return response.json();
})
.catch(error => {console.error(error), message.info('responerrorse',url,error)});
.catch(error => console.error(error));
}

Loading…
Cancel
Save