YZProjectCloud/yanzhu-ui-app/miniprogram/api/login.js

63 lines
925 B
JavaScript
Raw Normal View History

2024-10-13 11:24:45 +08:00
import {request} from '../utils/request'
// 获取验证码
export function getCodeImg() {
return request({
2024-10-15 00:32:25 +08:00
url: '/code',
2024-10-13 11:24:45 +08:00
method: 'get',
})
}
// 登录方法
export function login(data) {
return request({
url: '/wxApi/login',
method: 'post',
data: data,
})
}
2024-10-13 15:40:15 +08:00
// 获取授权
2024-10-15 00:32:25 +08:00
export function getMaOpenId(data) {
2024-10-13 15:40:15 +08:00
return request({
2024-10-15 00:32:25 +08:00
url: '/auth/getMaOpenId',
2024-10-13 15:40:15 +08:00
method: 'post',
data: data,
})
}
// 登录方法
export function maLogin(data) {
return request({
url: '/maLogin',
method: 'post',
data: data,
})
}
2024-10-13 11:24:45 +08:00
// 登录方法
export function updatePwd(data) {
return request({
url: '/wxApi/updatePwd',
method: 'post',
data: data,
})
}
// 用户退出方法
export function loginOut() {
return request({
'url': '/wxApi/loginOut',
'method': 'get'
})
}
// 刷线用户信息
export function refreshUser() {
return request({
'url': '/wxApi/refreshUserInfo',
'method': 'get'
})
}