Signed-off-by: 吴文峰 <kevin@lmve.net>
This commit is contained in:
2026-04-17 20:46:21 +08:00
parent 3bb51d0794
commit 8dce0346a7
10 changed files with 370 additions and 78 deletions
+23 -16
View File
@@ -4,21 +4,28 @@
*/
// 用户相关
export const user = {
login: (data) => post('/api/user/login', data),
logout: () => post('/api/user/logout'),
info: () => get('/api/user/info')
export const api = {
/**
* GET 请求(一般不需要认证)
*/
get(path) {
},
/**
* POST JSON
*/
post(path, data = {},callback) {
console.log("post")
},
/**
* POST FormData(文件上传)
*/
upload(path, file) {
},
}
// 订单相关
export const order = {
list: (data) => get('/api/order/list', data),
detail: (id) => get('/api/order/detail', { id }),
create: (data) => post('/api/order/create', data)
}
// 消息相关
export const message = {
list: (data) => get('/api/message/list', data),
read: (id) => post('/api/message/read', { id })
}
export default api