jhwxapp/miniprogram/api/login.js

73 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-05-03 10:37:27 +08:00
import {
request
} from '../utils/request'
2024-03-17 16:19:31 +08:00
// 获取验证码
export function getCodeImg() {
return request({
url: '/wechat/captchaImage',
method: 'get',
})
}
2024-05-03 10:37:27 +08:00
// 用户登录
2024-03-17 16:19:31 +08:00
export function login(data) {
return request({
2024-05-03 10:37:27 +08:00
url: '/wechat/login',
2024-03-17 16:19:31 +08:00
method: 'post',
data: data,
})
}
2024-05-03 10:37:27 +08:00
// 修改密码
2024-03-17 16:19:31 +08:00
export function updatePwd(data) {
return request({
2024-05-03 10:37:27 +08:00
url: '/wechat/v1/updatePassword',
method: 'post',
data: data,
})
}
// 修改密码
export function codeUpdatePwd(data) {
return request({
url: '/wechat/v1/codeUpdatePwd',
2024-03-17 16:19:31 +08:00
method: 'post',
data: data,
})
}
// 用户退出方法
export function loginOut() {
return request({
2024-04-08 00:58:58 +08:00
'url': '/wechat/loginOut',
2024-03-17 16:19:31 +08:00
'method': 'get'
})
}
2024-04-14 21:28:11 +08:00
2024-05-03 10:37:27 +08:00
// 发送短信验证码
export function sendPhoneMessage(phoneNumber) {
return request({
url: '/wechat/v1/sendPhoneMessage',
method: 'post',
data: {
'phoneNumber': phoneNumber
}
})
}
2024-04-14 21:28:11 +08:00
// 查询公众号消息授权
export function findOpenUserMsgId(openId) {
return request({
2024-05-03 10:37:27 +08:00
'url': '/wechat/findOpenUserMsgId/' + openId,
2024-04-14 21:28:11 +08:00
'method': 'get'
})
}
// 删除公众号消息授权
export function delOpenUserMsgId(openId) {
return request({
2024-05-03 10:37:27 +08:00
'url': '/wechat/delOpenUserMsgId/' + openId,
2024-04-14 21:28:11 +08:00
'method': 'get'
})
}