Files
device-voice-h5/api/modules/auth.js
luo 4f281da778
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m11s
feat: 7月迭代
2026-07-27 18:13:19 +08:00

52 lines
948 B
JavaScript

import request from '@/utils/request.js';
export const authApi = {
verifyAsset(identifier) {
return request({
url: '/api/c/v1/auth/verify-asset',
method: 'POST',
data: { identifier },
showError: false
});
},
wechatLogin(asset_token, code) {
return request({
url: '/api/c/v1/auth/wechat-login',
method: 'POST',
data: { asset_token, code }
});
},
sendCode(phone, scene) {
return request({
url: '/api/c/v1/auth/send-code',
method: 'POST',
data: { phone, scene }
});
},
bindPhone(phone, code) {
return request({
url: '/api/c/v1/auth/bind-phone',
method: 'POST',
data: { phone, code }
});
},
changePhone(old_phone, old_code, new_phone, new_code) {
return request({
url: '/api/c/v1/auth/change-phone',
method: 'POST',
data: { old_phone, old_code, new_phone, new_code }
});
},
logout() {
return request({
url: '/api/c/v1/auth/logout',
method: 'POST'
});
}
};