import { listMessage, myMessageList, delectRead } from '@/api/message'

const ticket = {
  actions: {
    /**
     *获取当前小区所有的待办消息
     */
    ListMessage({ commit }, data) {
      return new Promise((resolve, reject) => {
        listMessage(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    MyMessageList({ commit }, data) {
      return new Promise((resolve, reject) => {
        myMessageList(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    DelectRead({ commit }, data) {
      return new Promise((resolve, reject) => {
        delectRead(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}
export default ticket
