user.ts 756 Bytes
Newer Older
duanledexianxianxian's avatar
duanledexianxianxian committed
1
import { get, put } from '@/utils/request';
2

3
export async function query(): Promise<any> {
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
4
  return get('/api/users');
5 6
}

7
export async function queryCurrent(): Promise<any> {
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
8
  return get('/api/currentUser');
9
}
10

11
export async function queryNotices(): Promise<any> {
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
12
  return get('/api/notices');
13
}
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
14 15 16 17

/**
 * ๆŸฅ็œ‹ๆ˜ฏๅฆๅทฒ็ป็™ปๅฝ•
 */
duanledexianxianxian's avatar
duanledexianxianxian committed
18 19 20 21 22 23 24 25 26
export const checkUserLoginStatus = async () => get(`/api/v1/login/status`);
/**
 * ๆŸฅ็œ‹ๅฝ“ๅ‰็”จๆˆทไฟกๆฏ
 */
export const getCurrentUserInfo = async () => get(`/api/v1/detail`);
/**
 * ่Žทๅ–็”จๆˆท้…็ฝฎไฟกๆฏ
 */
export const getCurrentUserSetting = async () => get(`/api/v1/profile/settings`);
duanledexianxianxian's avatar
duanledexianxianxian committed
27 28 29 30 31

/**
 * ไฟๅญ˜็”จๆˆท้…็ฝฎไฟกๆฏ
 */
export const saveCurrentUserSetting = data => put('/api/v1/profile/settings', data);