import request from '../js/request'
import config from '../js/config'

export function queryPersonSet() {
    return request({
        url: '/appinfo/queryPersonSet',
        method: 'post',
        data: {},
    })
}

export function queryAppInfo(id) {
    return request({
        url: '/appinfo/queryAppInfo',
        method: 'post',
        data: {
            id,
        },
    })
}

/**
 * 查询app个人中心信息详情
 * @param id
 */

export const queryAppInfoByType = (type) => {
    return request({
        url: '/cs-system-boot/appinfo/queryAppInfoByType',
        method: 'post',
        data: {
            type,
        },
    })
}


/**
 * 查看用户消息推送配置
 */

export const queryUserPushConfig = () => {
    return request({
        url: '/user-boot/appInfoSet/queryByUserId',
        method: 'post',
        header: {
            'Content-Type': 'application/json',
        },
        data: {},
    })
}

/**
 * 更新消息推送配置
 */

export const updatePushConfig = (params) => {
    return request({
        url: '/user-boot/appInfoSet/update',
        method: 'post',
        header: {
            'Content-Type': 'application/json',
        },
        data: params,
    })
}
