You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
fetch('/user-info')
|
|
.then(response => {
|
|
if (!response.ok) {
|
|
throw new Error('未登录');
|
|
}
|
|
return response.json();
|
|
})
|
|
.then(data => {
|
|
})
|
|
.catch(error => {
|
|
alert('未登录')
|
|
window.location.href = 'welcome.html';
|
|
}); |