12345678910111213141516171819202122232425262728293031323334 |
- import fly from '@/utils/request'
- export function login(username, password) {
- const data = {
- username,
- password
- }
- return fly.post('/login', data,{headers:{isToken:false}}).then(res => res)
- }
- // 获取用户详细信息
- export function getInfo() {
- return fly.get('/getInfo').then(res=>res)
- }
- // 退出方法
- export function logout() {
- return request({
- url: '/logout',
- method: 'post'
- })
- }
- //修改用户信息
- export function saveUserInfo(data){
- return fly.put('/system/user/profile',data).then(res=>res)
- }
- //修改用户密码
- export function savePassword(oldPwd,newPwd){
- return fly.put('/system/user/profile/updatePwd',{
- oldPassword:oldPwd,
- newPassword:newPwd
- }).then(res=>res)
- }
- // export function logout(){
-
- // }
|