mirror of
https://gitee.com/bootx/dax-pay-h5
synced 2026-08-11 15:15:34 +08:00
feat 代码精简, 开发OpenId相关获取功能
This commit is contained in:
@@ -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,
|
||||
},
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user