import { msgApi } from '@services'

export default class MsgAction {
  /* 获取我的消息信息 */
  getMyMsg () {
    return msgApi.getMyMsg().then(res => {
      let json = res.map(function (_, i) {
        return {
          isRead: false,
          id: _.id,
          text: _.message_body,
          time: _.created_time,
          isShow: false // 该字段用来做 每条信息的打开、关闭
        }
      })
      return json
    })
  }
}
