import request from '@/utils/request'

// 查询移动端用户信息列表
export function listAppUser(query) {
    return request({
        url: '/system/appUser/list',
        method: 'get',
        params: query
    })
}

// 查询移动端用户信息列表
export function staticAppUser(query) {
    return request({
        url: '/system/appUser/static/data',
        method: 'get',
        params: query
    })
}

// 查询移动端用户信息详细
export function getAppUser(userId) {
    return request({
        url: '/system/appUser/' + userId,
        method: 'get'
    })
}

// 新增移动端用户信息
export function addAppUser(data) {
    return request({
        url: '/system/appUser',
        method: 'post',
        data: data
    })
}

// 修改移动端用户信息
export function updateAppUser(data) {
    return request({
        url: '/system/appUser',
        method: 'put',
        data: data
    })
}

// 删除移动端用户信息
export function delAppUser(userId) {
    return request({
        url: '/system/appUser/' + userId,
        method: 'delete'
    })
}

// 解除黑名单
export function unblockAppUser(data) {
    return request({
        url: '/system/appUser/unblock',
        method: 'put',
        data: data
    })
}

// 用户密码重置
export function resetUserPwd(userId, password) {
    const data = {
        userId,
        password
    }
    return request({
        url: '/system/appUser/resetPwd',
        method: 'put',
        data: data
    })
}