mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-19 17:56:39 +08:00
21 lines
500 B
JavaScript
21 lines
500 B
JavaScript
import {httpGet} from "@/utils/http";
|
|
|
|
export function checkSession() {
|
|
return new Promise((resolve, reject) => {
|
|
httpGet('/api/user/session').then(res => {
|
|
resolve(res.data)
|
|
}).catch(err => {
|
|
reject(err)
|
|
})
|
|
})
|
|
}
|
|
|
|
export function checkAdminSession() {
|
|
return new Promise((resolve, reject) => {
|
|
httpGet('/api/admin/session').then(res => {
|
|
resolve(res)
|
|
}).catch(err => {
|
|
reject(err)
|
|
})
|
|
})
|
|
} |