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.
13 lines
245 B
13 lines
245 B
8 months ago
|
fetch('/user-info')
|
||
|
.then(response => {
|
||
|
if (!response.ok) {
|
||
|
throw new Error('未登录');
|
||
|
}
|
||
|
return response.json();
|
||
|
})
|
||
|
.then(data => {
|
||
|
})
|
||
|
.catch(error => {
|
||
|
alert('未登录')
|
||
|
window.location.href = 'welcome.html';
|
||
|
});
|