refactor(system): 优化系统模块接口命名和参数校验
- 重构了多个控制器的查询接口,统一命名规范 - 新增参数校验,提高接口健壮性 - 更新了前端 API调用,以适应后端接口变更 - 优化了部分前端组件的错误提示文案
This commit is contained in:
@@ -1,22 +1,28 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export function sendResetEmailCaptcha(data) {
|
export function sendResetEmailCaptcha(email) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/code/sendResetEmailCaptcha?email=' + data,
|
url: 'api/code/sendResetEmailCaptcha?email=' + email,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sendResetPasswordCaptcha(data) {
|
export function sendResetPasswordCaptcha(email) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/code/sendResetPasswordCaptcha?email=' + data,
|
url: 'api/code/sendResetPasswordCaptcha?email=' + email,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkEmailCaptcha(email, code, codeBi) {
|
export function checkEmailCaptcha(email, code, bizCode) {
|
||||||
|
const params = {
|
||||||
|
email: email,
|
||||||
|
code: code,
|
||||||
|
bizCode: bizCode
|
||||||
|
}
|
||||||
return request({
|
return request({
|
||||||
url: `api/code/checkEmailCaptcha?email=${email}&code=${code}&codeBi=${codeBi}`,
|
url: 'api/code/checkEmailCaptcha',
|
||||||
method: 'post'
|
method: 'post',
|
||||||
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user