feat 代码精简, 开发OpenId相关获取功能

This commit is contained in:
DaxPay
2024-09-24 19:59:53 +08:00
parent 2ba1318212
commit d49572f94c
22 changed files with 113 additions and 357 deletions

View File

@@ -1,60 +0,0 @@
import { http } from '@/utils/http/axios'
import type { Result } from '#/axios'
export interface BasicResponseModel<T = any> {
code: number
message: string
result: T
}
/**
* @description: 用户登录
*/
export function login(params: any) {
return http.request<Result<string>>(
{
url: '/token/login',
method: 'POST',
params,
},
{
isTransformResponse: false,
},
)
}
/**
* @description: 获取用户信息
*/
export function getUserInfo() {
return http.request({
url: '/getUserInfo',
method: 'get',
})
}
/**
* @description: 用户登出
*/
export function doLogout() {
return http.request({
url: '/token/logout',
method: 'POST',
})
}
/**
* @description: 用户修改密码
*/
export function changePassword(params: any, uid: any) {
return http.request(
{
url: `/user/u${uid}/changepw`,
method: 'POST',
params,
},
{
isTransformResponse: false,
},
)
}