2025-09-28
This commit is contained in:
10
api/auth.js
10
api/auth.js
@@ -2,19 +2,21 @@ import {
|
||||
http
|
||||
} from "../util/api"
|
||||
|
||||
const baseURL = "http://192.168.0.4:3005"
|
||||
|
||||
// 认证相关API
|
||||
export const authAPI = {
|
||||
// 登录
|
||||
login: (data) => http.post('/auth/login', data),
|
||||
login: (data) => http.post(baseURL + '/auth/login', data),
|
||||
|
||||
// 注册
|
||||
register: (data) => http.post('/auth/register', data),
|
||||
register: (data) => http.post(baseURL + '/auth/register', data),
|
||||
|
||||
// 获取当前用户信息
|
||||
me: () => http.get('/auth/me'),
|
||||
me: () => http.get(baseURL + '/auth/me'),
|
||||
|
||||
// 修改密码
|
||||
changePassword: (data) => http.put('/auth/change-password', data)
|
||||
changePassword: (data) => http.put(baseURL + '/auth/change-password', data)
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@@ -2,16 +2,18 @@ import {
|
||||
http
|
||||
} from "../util/api"
|
||||
|
||||
const baseURL = "http://192.168.0.4:3005"
|
||||
|
||||
// 验证码相关API
|
||||
export const captchaAPI = {
|
||||
// 生成验证码
|
||||
generate: () => http.get('/captcha/generate'),
|
||||
generate: () => http.get(baseURL + '/captcha/generate'),
|
||||
|
||||
// 验证验证码
|
||||
verify: (data) => http.post('/captcha/verify', data),
|
||||
verify: (data) => http.post(baseURL + '/captcha/verify', data),
|
||||
|
||||
// 发送手机验证码
|
||||
smsSend: (phone) => http.post('/sms/send', {
|
||||
smsSend: (phone) => http.post(baseURL + '/sms/send', {
|
||||
phone
|
||||
})
|
||||
}
|
||||
|
||||
7
api/group.js
Normal file
7
api/group.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import {
|
||||
http
|
||||
} from "../util/api";
|
||||
|
||||
export const groupAPI = {
|
||||
getList: (params) => http.get('/group/list', params)
|
||||
}
|
||||
17
api/program.js
Normal file
17
api/program.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
http
|
||||
} from "../util/api"
|
||||
|
||||
const baseURL = "http://192.168.0.15:3006"
|
||||
|
||||
// 项目相关API
|
||||
export const programAPI = {
|
||||
// 列表
|
||||
getList: (params) => http.get(baseURL + '/program/list', params),
|
||||
isChat: (params) => http.get(baseURL + "/program/isChat", params),
|
||||
getProgram: (id) => http.get(baseURL + "/program/" + id)
|
||||
}
|
||||
|
||||
export default {
|
||||
programAPI
|
||||
}
|
||||
Reference in New Issue
Block a user