master_basic
鲁誉程 1 year ago
parent c251f909e5
commit d4297fa686

@ -46,8 +46,6 @@ export default function IndexPage() {
const onFinish = async (data: any) => { const onFinish = async (data: any) => {
setLoading(true) setLoading(true)
await getPlugCordResult(data).then(res => { await getPlugCordResult(data).then(res => {
message.info("res---",res);
if (res?.result == 'success' && res?.data[0]?.data) { if (res?.result == 'success' && res?.data[0]?.data) {
setIsAuth(true) setIsAuth(true)
localStorage.setItem('is_auth', JSON.stringify(true)); localStorage.setItem('is_auth', JSON.stringify(true));

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

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

Loading…
Cancel
Save