import request from '@/utils/request' // 发送验证码 export function sendCode(data) { return request({ url: '/api/admin-auth/send-code', method: 'post', data }) } // 管理员密码登录 export function adminLogin(data) { return request({ url: '/api/admin-auth/login-by-password', method: 'post', data }) } // 查询账号可用的后台身份列表(登录页身份选择下拉框用) export function getAccountRoles(phone) { return request({ url: '/api/admin-auth/account-roles', method: 'post', data: { phone } }) } // 后台微信扫码登录:获取小程序码(返回 { state, qrImage }) export function adminWxScanQr() { return request({ url: '/api/admin-auth/wechat-scan-qr', method: 'post' }) } // 后台微信扫码登录:轮询扫码结果(返回 { status, token?, adminId?, role?, roles?, message? }) export function adminWxScanPoll(state) { return request({ url: '/api/admin-auth/wechat-scan-poll', method: 'post', data: { state } }) } // 获取管理员信息 export function getAdminInfo() { return request({ url: '/api/admin-auth/info', method: 'post' }) } // 修改密码 export function changePassword(data) { return request({ url: '/api/admin-auth/change-password', method: 'post', data }) }