// 引入封装的请求
import { getData, postData, getIdData,getIddData,getcIdData,deleteData } from "./http";

let apiServe = {
    // 登录接口
    login: (data) => getData("login", "get", data),
    // 注册登录
    register: (data) => postData("register", "post", data),
    // 获取用户信息
    admin:(data) => getData("user", "get", data),
    // 编辑用户
    editAdmin: (data) => postData('updateUserInfor', 'post', data),
    // 文化长廊列表
    Cllist: (data) => getData('culture/list', "get", data),
    // 文化长廊详情
    Clwh: (id) => getIdData('culture/detail', 'get', id),
    // 获取问题列表
    getWishData: (data) => getData('question/questionList', 'get', data),
    // 添加问题
    getWish: (data) => postData('question/addQuestion', 'post', data),
    // 问题选项
    getwishxx:(id) => getIddData('question/questionOptions', 'get', id),
    // 答题
    getwishdt:(id) => getIddData('question/answerQuestion', 'get', id),
    // 获取留言列表
    getliuyan:(data) => getData("message/list", "get", data),
    // 添加留言列表
    addliuyan:(data) => postData("message/add", "post", data),
    // 查看评论
    pinglun:(data) => getcIdData("culture/comment", "get", data),
    // 添加评论
    addpinglun:(data) => postData("culture/addComment", "post", data),
    // 删除留言
    delliuyan:(data) => deleteData("message", "delete", data),
}

export { apiServe };