| | |
| | | |
| | | /** 退出登录 */ |
| | | export const logout = () => post("/user/logout") |
| | | // 工单用户登录接口 |
| | | export const ticketLoginInterfaceApi = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | | return request({ |
| | | url: '/blade-auth/oauth/token', |
| | | method: 'post', |
| | | header: { |
| | | 'Tenant-Id': tenantId, |
| | | 'Dept-Id': website.switchMode ? deptId : '', |
| | | 'Role-Id': website.switchMode ? roleId : '', |
| | | 'Captcha-Key': key, |
| | | 'Captcha-Code': code, |
| | | }, |
| | | params: { |
| | | tenantId, |
| | | username, |
| | | password, |
| | | grant_type: 'password', |
| | | scope: 'all', |
| | | type, |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | // 用户登录接口 |
| | | export const loginByUsername = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | |
| | | }); |
| | | }; |
| | | |
| | | /** 发送重置密码验证码 */ |
| | | export const sendResetCode = (phone) => { |
| | | return request({ |
| | | url: `/system/verificationCode/resetCode/${phone}`, |
| | | method: 'get', |
| | | }); |
| | | }; |
| | | |
| | | /** 根据验证码重置密码 */ |
| | | export const resetPassword = (data) => { |
| | | return request({ |
| | | url: '/system/user/retrievePassword', |
| | | method: 'post', |
| | | data: data, |
| | | }); |
| | | }; |
| | | |
| | | // 微信登录接口 |
| | | export const loginByWechat = (code) => { |
| | | return request({ |