import $http from '../../utils/httpRequest'

// 修改密码
export const password = (password, newPassword) => {
    return $http({
        url: '/sys/user/password',
        method: 'post',
        data: $http.adornData({
            'password': password,
            'newPassword': newPassword
        })
    })
}

// 退出登录
export const logout = () => {
    return $http({
        url: '/merchant-api/auth/logout',
        method: 'post',
        data: $http.adornData()
    })
}

// 获取用户信息
export const getUserInfo=()=>{
    return $http({
        url: '/merchant-api/auth/info',
        method: 'get',
        params: $http.adornParams()
      })
}

//登录接口
export const login=(username,password,uuid,captcha)=>{
    return $http({
        url: '/auth/login',
        method: 'post',
        data: $http.adornData({
          'username': username,
          'password': password,
          'code':captcha,
          'uuid': uuid,
        //   'captcha': captcha
        })
      })
}
