<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body> </body>
<script>
const func1 = async () => {
try {
const res = await window.fetch(
'https://test.wistore.net/ovopark-organize/enterprise/getMyInfo',
);
console.log(res);
console.log(11111);
const data = func2();
console.log(3333);
} catch (error) {
console.log(error);
}
};
const func2 = () => {
console.log(222);
window.fetch('https://test.wistore.net/ovopark-organize/enterprise/getMyInfo').then((res) => {
console.log(res);
});
};
func1();
</script>
</html>
结果: