import request from "@/utils/request";
import { useUserStore } from "@/store/user";
const { userInfo } = useUserStore(); // store 用户

export default {
    get: function (params) {
        return request({
            url: "/qdport-zcgx/message/page",
            method: "get",
            params
        })
    },

    add: function (data) {
        return request({
            url: "/qdport-zcgx/message/save",
            method: "post",
            data: {
                ...data,
                createId: userInfo.id,
                createName: userInfo.name
            }
        })
    },

    del: function (data) {
        return request({
            headers: {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            url: "/qdport-zcgx/message/remove",
            method: "post",
            data
        })
    },
}